Theory of Computation
Push Down Automata DPP10
Theory of Computation
Push Down Automata
DPP 10
Theory of Computation
Push Down Automata DPP10
1. Let A be a finite language and B be a non-regular language. Then, A ∩ B will be:
(A) Regular but infinite.
(B) Non-regular.
(C) Finite and regular.
(D) None of these.
ANSWER: C
Theory of Computation
Regular Expressions DPP2
2. Consider the following statements:
All finite languages are context-free.
1. Some regular languages are finite.
2. All deterministic context-free languages (DCFLs) are finite.
3. All regular languages are DCFLs.
4. There exists some language that is finite but not regular.
The number of correct statements is:
ANSWER: 3
Theory of Computation
Regular Expressions DPP2
3.The intersection of a context-free language (CFL) and a regular language is:
• (A) Always regular
• (B) Sometimes a CFL
• (C) Always non-regular
• (D) None of these
ANSWER: D
Theory of Computation
Regular Expressions DPP2
4. Which of the following grammars generates a DCFL but not a regular language?
• (A) S → aaSbb | ε
• (B) S → aSbb | ε
• (C) S → aaSb | ε
• (D) S → abS | ε
Answer: A,B,C
Theory of Computation
Regular Expressions DPP2
5. Which of the following are valid string acceptance mechanisms for a Pushdown
Automaton (PDA)?
(a) Acceptance by final state.
(b) Acceptance by empty stack.
(c) Acceptance by both final state and empty stack.
(d) Acceptance by transition state.
Answer: A,B,C
Theory of Computation
Regular Expressions DPP2
6. Consider the following statements:
Every Deterministic PDA (DPDA) is a Non-deterministic PDA (NPDA).
Every NPDA is a DPDA.
NPDAs and DPDAs are equivalent in power.
All context-free languages (CFLs) are regular.
The number of correct statements is:
ANSWER: 1
Theory of Computation
Regular Expressions DPP2
7. Consider the grammar:
S → PQ, P → QaQ | a , Q → bbP
Which statement is true about strings generated by this grammar?
(a) Every string has at least two a’s.
(b) Every string has three consecutive a’s.
(c) Every string alternates between a and b.
(d) Every string has b’s in multiples of 2.
ANSWER: a
Theory of Computation
Regular Expressions DPP2
8. Which of the following languages are accepted by a PDA?
(a) L = {aⁿ bⁿ cᵐ | m, n ≥ 1}
(b) L = {aⁿ bⁿ cᵐ | m ≤ n}
(c) L = {aⁿ bⁿ cⁿ | n ≥ 0}
(d) L = {aⁿ bⁿ cⁿ dⁿ | n ≥ 0}
ANSWER: a