Reputation: 1807
I need to make an 8-state DFA that takes 0s and 1s and has an even number of 1s and a substring of ...000... somewhere in it. So I know how to find a substring of 000 and I know how to find an even number of 1s, but I'm not sure how to put this together. Is there like a formula or something to follow for this, I just started DFAs and NFAs so I'm not quite sure how to solve this besides drawing it out with trial and error. Any help would be great
Upvotes: 0
Views: 361
Reputation: 5074
For the testing even number of ones:
Then for testing the 000 substring:
Then we can compute the intersection of these DFA using the classical cross-product construction and get the (minimal) DFA:
Upvotes: 1