Hi.

I am looking for a DFA that accepts the language that consist of an even number of 0's and an even number of 1's. Any ideas?

Thanks.

I am looking for a DFA that accepts the language that consist of an even number of 0's and an even number of 1's. Any ideas?

Since you can't track a count of zeros and ones in a DFA, try looking at having a state for each possible outcome as you run through the input string--so your states would represent combinations of even/odd zeros and even/odd ones.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.