The Gateway to Computer Science Excellence
+1 vote
1k views
Construct a DFA to accept all strings (1+0)^ with an equal no of zeros and 1's ,such that each prefix has atmost one more zero then 1's and at most one more 1's then zeros .
in Theory of Computation by Active (1.4k points) | 1k views

1 Answer

+4 votes
Best answer

Start & Final State =q0

by Boss (45.4k points)
selected by
0
Why do we have separate q1 and q2 states? The transitions look the same.
0
There is a slight mistake here , at state  q2 transition from q2 to q0 is 0 and from q0 to q2 is 1.
0

strings like 001 and 110 are in the language but not accepted by finite automata why?

+1
we need here same no of 0's and 1's .in your string we have both different.
0
100, 011 is not accepted by your DFA.
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,365 answers
198,493 comments
105,260 users