Which one of the following statements is FALSE?a)There exist context-f...
A) For real-world programming languages, the reference CFG is often ambiguous, due to issues such as the dangling else problem. //Wikipedia
B) A string is ambiguous if it has two distinct parse trees;The grammar is unambiguous,if a string has distinct parse trees.
C) Deterministic pushdown automata can recognize all deterministic context-free languages while nondeterministic ones can recognize all context-free languages
Therefore it's FALSE
D)Properties of Regular Language:
- The set of regular languages over an alphabet ∑ is closed under operations union, concatenation and Kleene star.
- Finite languages are regular
So Answer is C
View all questions of this test
Which one of the following statements is FALSE?a)There exist context-f...
False Statement: Both deterministic and non-deterministic pushdown automata always accept the same set of languages.
Explanation:
Deterministic Pushdown Automata (DPDA) and Non-deterministic Pushdown Automata (NPDA) are two types of pushdown automata. DPDA has a deterministic transition function, while NPDA has a non-deterministic transition function.
DPDA and NPDA accept different sets of languages. Some languages accepted by NPDA cannot be accepted by DPDA, and vice versa. This is because NPDA can explore multiple paths at the same time and accept a string if any of the paths lead to an accepting state, while DPDA can only follow one path at a time.
For example, the language {0^n 1^n | n ≥ 0} can be accepted by an NPDA but not by a DPDA. In an NPDA, we can push all the 0s onto the stack, and then pop them off as we read the 1s. However, in a DPDA, we cannot keep track of the number of 0s we have seen and match them with the same number of 1s later.
Therefore, option C is false because DPDA and NPDA do not always accept the same set of languages.
Summary:
- DPDA and NPDA are two types of pushdown automata.
- DPDA has a deterministic transition function, while NPDA has a non-deterministic transition function.
- DPDA and NPDA accept different sets of languages.
- NPDA can explore multiple paths at the same time and accept a string if any of the paths lead to an accepting state, while DPDA can only follow one path at a time.
- Option C is false because DPDA and NPDA do not always accept the same set of languages.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).