0

DFA that accepts strings over {b} of length 2i+5k for any non-negative values of i and k?

What will be the solution to this?

akkk
  • 1,457
  • 4
  • 23
  • 41

1 Answers1

1

Start with finding all words that this DFA accepts. First, there is an empty string (i=0, k=0), then bb (i=1, k=0), bbbb (i=2, k=0) and bbbbb (i=0, k=1). From this point you can generate all words that have more than five bs - even are of the form 2*i, and odd are of the form 5 + 2*i.

This is the desired DFA: enter image description here

Miljen Mikic
  • 14,765
  • 8
  • 58
  • 66