-1

I am trying to construct this problem:

A fair coin is tossed until two heads appear in a row. What is the expected number of coin tosses? Design a DFA for the language L+ {w|w has 11 as a substring}

Use this DFA as a Markov chain to calculate the required probability. (Specifically for each state q,let P(q) be the probability of reaching the accepting state, if q is the start state.)

I'm having trouble designing the DFA and need some help.

Zach
  • 119
  • 3
  • 17
  • This is not a DFA, it's just a Markov chain. Perhaps you can change the title to reflect that. – blazs May 17 '16 at 18:45

1 Answers1

1

A hint:

I take the language to consist of all binary strings which have 11 as a substring. For example, 01001101 is in the language but 10100010 isn't. You can do this with just 3 states. Think of the states as corresponding to distance from the goal (accepting state) of having 2 ones in a row. You start far from that state. If you read a 0 you stay far from that state. If you read a 1 then you transition to the state of being almost there. If you are in this almost there state -- what happens when you read a 0? What happens when you read a 1? Finally -- once you get there, you are in the happy state of being done and no input will bump you back to an earlier state.

John Coleman
  • 51,337
  • 7
  • 54
  • 119