in Theory of Computation retagged by
337 views
0 votes
0 votes

What language is accepted by the npda below if we make F = {q0, qf }, where F denotes set of final states.

Answer is L = $\sum$* ...........right ???

in Theory of Computation retagged by
337 views

1 Answer

1 vote
1 vote

It's Simple,

$ L = \{ w | n_a (w) = n_b (w) \} $

Its pushing $0$ for each $a$, and $1$ for each $b$. If its getting $b$ and at the top of stack we have $0$ then its performing pop operation. Similarly, If its getting $a$ and at the top of stack we have $1$ then its performing pop operation.

And Yes, If we make both the states final state then language will be $ {(a + b)}^* $.

edited by
by

2 Comments

@rude my question is "what if we make both q0,qf as final states ....
0
0
Yes, edited. check that.
0
0