579 views
0 0 votes

L1 = {anbn / n>=0} 

L2 = {anbn / n >=1} here both are DCFL but L1 is not be accepted by stack  but L2,L1 is accepted by final state right or wrong??

1 Answer

Best answer
1 1 vote

PDA, where acceptance is by an empty stack, is as powerful as PDA with a final state (Acceptance by final state). Means a CFL can be accepted by both PDA with empty stack and PDA with final state. But this is not true with DPDA. (Deterministic Push Down Automata).

The set of languages accepted by DPDA with an empty stack is the proper subset of the set of languages accepted by DPDA with final state.

A language which doesn't have the prefix property, can't be accepted using DPDA with an empty stack.

L = {a, aa}, this don't possess prefix property because 'a' is the prefix of 'aa'. Hence it can't be accepted using DPDA with an empty stack.

L = {$a^n$$b^n$ , n >= 0} also don't possess the prefix property because $\epsilon$ will be the prefix of every other string. Hence it is also not accepted by DPDA with an empty stack.

But L = {$a^n$$b^n$, n>=1} possess the prefix property. Here no string is the prefix of any other string. So it can be accepted by both DPDA with empty stack and DPDA with final state.

• selected by
Position:
Show:

No related questions found