retagged by
28,464 views
72 72 votes

Let $L_1$ be the set of all languages accepted by a PDA by final state and $L_2$ the set of all languages accepted by empty stack. Which of the following is true?

  1. $L_1 = L_2$
  2. $L_1 \supset L_2$
  3. $L_1 \subset L_2$
  4. None

2 Answers

Best answer
146 146 votes

Answer to the question is (A) $L_1 = L_2$.
Reason is for any PDA which accepts by final state there is an equivalent PDA (equivalent means that accepts the same language) which accepts by empty stack and vice-verse. 

Now, this is not the case for DPDAs.

The set of languages accepted by a DPDA by empty stack is a strict subset of the set of languages accepted by a DPDA by final state. 

It can also be said that set of languages accepted by a DPDA by empty stack is the set of languages accepted by a DPDA by final state and which has the prefix property. 

A language has prefix property means if $w \in L$, then no proper prefix of $w \in L$. 

From the above definition of prefix property it must be clear why DPDA by empty stack has this property. If any prefix of a word $w$ ($w$ in $L$) is in $L$ means the stack should have been empty even before completely processing $w$. But, being a deterministic PDA, once the stack becomes empty, the DPDA accepts and halts. So, in no way can a DPDA accepts $w$ and its prefix. 

PS: A DPDA with acceptance by empty stack cannot even accept all regular languages- example $a^*$. 

Good read: http://www.cs.ucr.edu/~jiang/cs150/slides4week7_PDA+EquivToCFG.pdf

edited by
3 3 votes

The point of confusion hear is the word PDA.

When we say PDA with generally refers to NDPA. Now ndpa has two ways of acceptance either by empty stack or by final state. In both the cases language accepted by any one of them will be accepted by the other. But if it is specifically mention that it's a DPDA then the answer will be changed as in DPDA, there are some languages which are accepted by final state but not by empty stack.​​​​​

Answer:
Position:
Show:

Related questions

43 43 votes
6 answers 6 answers
16.7k
16.7k views
Kathleen asked Sep 23, 2014
16,690 views
The number of binary strings of $n$ zeros and $k$ ones in which no two ones are adjacent is$^{n-1}C_k$$^nC_k$$^nC_{k+1}$None of the above
35 35 votes
5 answers 5 answers
7.4k
7.4k views
Kathleen asked Sep 23, 2014
7,371 views
Given that $A$ is regular and $(A \cup B)$ is regular, does it follow that $B$ is necessarily regular? Justify your answer.Given two finite automata $M1, M2$, outline an ...
46 46 votes
2 answers 2 answers
10.3k
10.3k views
Kathleen asked Sep 23, 2014
10,335 views
Show that the language $$L = \left\{ xcx \mid x \in \left\{0,1\right\}^* \text{ and }c\text{ is a terminal symbol}\right\}$$ is not context free. $c$ is not $0$ or $1$.
37 37 votes
3 answers 3 answers
16.2k
16.2k views
Kathleen asked Sep 23, 2014
16,228 views
If $L1$ is context free language and $L2$ is a regular language which of the following is/are false?$L1-L2$ is not context free$L1 \cap L2$ is context free$\sim L1$ is co...