retagged by
5,410 views
8 votes
8 votes

a) A DPDA which accepts by empty stack cannot accept all Regular Languages?

b) All Regular Languages doesn't satisfy prefix property?

retagged by

3 Answers

Best answer
24 votes
24 votes

a. True. Reason explained later.
b. True. Simple example $L = \{a, aa\}$. 

Prefix property requires that if a string $w$ is in $L$, then no prefix of $w$ is in $L$.

So, for above language, $a$ is a prefix of $aa$ and both are in $L$ violating the prefix property. And $L$ is a regular as well as finite language. 

Now, a language is DCFL and accepted by a DPDA with empty stack it must have the prefix property. This is because to accept a string stack must become empty. Now, when the stack becomes empty it must accept the string and due to determinism, it cannot have another move possible. So, no more characters from the input can be accepted. This is the reason why 'a' is TRUE. But the same property is not relevant for DPDA which accepts by final state. So, 

  1. Power of DPDA which accept by final state is more than that which accepts by empty stack
  2. Power of PDA (which includes non-deterministic) which accept by final state is same as that which accepts by empty stack.
selected by
0 votes
0 votes
1. False as every regular language is DCFL , hence a DPDA accepting DCFL by empty stack can also accept regular language .

2. The prefix property for a language is defined as ,

 for all x,y belongs to L, either  x is a prefix of y or y is a prefix of x.

the statement is true as all regular languages does not satisfy prefix property.

ex:  L = (a+b)* ,

a is not prefix of b but a,b belongs to L.

correct me if I’m wrong.
0 votes
0 votes

Both statements are TRUE.

prerequisite : prefix property. 

Stmt 1DPDA with empty stack method, accepts those languages which satisfies prefix property. 

Consider a Regular Expression a*, the language corresponds to this regular expression is L={null, a, aa,aaa...},

here, does not satisfy prefix property and hence cannot be accepte by DPDA with empty stach method.

Stmt 2   Consider the language L in above explanation.

Related questions

2 votes
2 votes
0 answers
2
Shubhanshu asked Aug 28, 2017
2,599 views
Construct the DPDA with empty stack and final state method for the language L = ${ a^n b^n / n>= 0}$.
1 votes
1 votes
0 answers
3
Matrix asked Jul 28, 2018
1,544 views
Is this approach of acceptance by empty stack correct ?I am confused because i have read that acceptance by empty stack may not be able to accept all regular languages.
3 votes
3 votes
1 answer
4
AskHerOut asked Oct 22, 2017
737 views
1) Can a Deterministic PDA has two epsilon transition each reading different Stack symbol to perform a transition?2) Can a transition be performed without reading Stack s...