3

I have to draw a DFA that accepts set of all strings containing 1101 as a substring in it. I tried one by myself but wanted to make sure if it's correct but can't attach the image as I'm a new user.

Thanks

Waqar Danish
  • 83
  • 1
  • 2
  • 9
  • Can you describe your DFA? For example, can you give us its transition table? – Welbog Aug 30 '17 at 13:47
  • It would've been easy to construct a transition diagram from a transition table but the problem is that i can't figure out transition tablr too.. The accepted strings should be like {1101001,0101101,001101001 and so on} – Waqar Danish Aug 30 '17 at 13:57
  • Show us what you have come up with so far, and elaborate on what is wrong with your current solution. – Welbog Aug 30 '17 at 14:14
  • @WaqarDanish please check my answer below. Please accept it and upvote if it helps you. Please respond to every reply you receive because behind each answer there is someones time and effort. – Mathews Sunny Sep 02 '17 at 03:24

1 Answers1

2

Its an easy DFA. It requires 5 states.

  1. state 0 :
    • On receiving 1 move from state 0 to state 1
    • On receiving 0 stay on state 0
  2. state 1 :
    • On receiving 1 move from state 1 to state 2
    • On receiving 0 move from state 1 to state 0
  3. state 2 :
    • On receiving 0 move from state 2 to state 3
    • On receiving 1 stay on state 2
  4. state 3 :
    • On receiving 1 move from state 3 to state 4
    • On receiving 0 move from state 3 to state 0
  5. state 4 :
    • On receiving 1 stay on state 4
    • On receiving 0 stay on state 4

So it will look like

Mathews Sunny
  • 1,796
  • 7
  • 21
  • 31