Which among the following is true for the given statement? Statement :If there are strings R and T in a language L so that R is prefix

Which among the following is true for the given statement?
Statement :If there are strings R and T in a language L so that R is prefix of T and R is not equivalent to T.
A. No DPDA can accept L by empty stack
B. DPDA can accept L by an empty stack
C. L is regular
D. None of the mentioned
 
Answer: A
Explanation: If M is a DPDA accepting L by an empty stsck, R and T are distinct strings in L, and R is a prefix of T, then the sequence of moves M must make in order to accept R leaves the stack empty, since R∈L. But then T cannot be accepted, since M cant move with an empty stack.
 

Tìm kiếm

Back
Top