VOOZH about

URL: https://www.geeksforgeeks.org/quizzes/push-down-automata-pyq-quiz-gate-cs/

⇱ Quiz about Push Down Automata & Pumping lemma PYQ QUIZ GATE CS


Last Updated :
Discuss
Comments

Question 1

The language [Tex]L=\{a^n b^n \mid n \geq 1\}[/Tex] is:

(GATE 2004 | MCQ | 1-mark)

  • regular

  • context-free but not regular

  • context-sensitive but not context-free

  • type-0 but not context-sensitive

Question 2

In a pushdown automaton P=(Q,Σ,Γ,δ,q0,F), a transition of the form,

👁 Image

where p,q∈Q, a∈σ∪{ϵ}, X,Y,∈Γ∪{ϵ}, represents

(q,Y) ∈ δ(p,a,X) 

Consider the following pushdown automaton over the input alphabet Σ={a,b} and stack alphabet Γ={#,A}.

👁 Image

The number of strings of length 100 accepted by the above pushdown automaton is ___________ .

  • 50

  • 100

  • 55

  • 45

Question 3

According to the formal 7-tuple definition of a Pushdown Automaton [Tex]M=(Q,\Sigma,\Gamma,\delta,q_0,Z,F)[/Tex], the transition function $\delta$ determines the machine's next move based on exactly three input parameters. What are these three parameters?

  • Current state, next input symbol, and the entire stack contents

  • Current state, next input symbol (or ϵ), and the symbol at the top of the stack

  • Current state, next input symbol, and the initial stack symbol Z

  • Initial state, next input symbol (or ϵ), and the top of the stack

Question 4

Consider the NPDA 〈Q = {q0, q1, q2}, Σ = {0, 1}, Γ = {0, 1, ⊥}, δ, q0, ⊥, F = {q2}〉, where (as per usual convention) Q is the set of states, Σ is the input alphabet, Γ is stack alphabet, δ is the state transition function, q0 is the initial state, ⊥ is the initial stack symbol, and F is the set of accepting states, The state transition is as follows:
👁 Q60

Which one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton?

  • 10110

  • 10010

  • 01010

  • 01001

Question 5

The language {am bn Cm+n | m, n ≥ 1} is

  • regular

  • context-free but not regular

  • context sensitive but not context free

  • type-0 but not context sensitive

Question 6

👁 GATECS2006Q18

Which is correct ?

  • L1 only

  • L3 Only

  • L1 and L2

  • L2 and L3

Question 7

Let fsa and pda be two predicates such that fsa(x) means x is a finite state automaton, and pda(y) means that y is a pushdown automaton. Let equivalent be another predicate such that equivalent (a, b) means a and b are equivalent. Which of the following first order logic statements represents the following:

Each finite state automaton has an equivalent pushdown automaton.

👁 q31

  • A

  • B

  • C

  • D

Question 8

Consider the transition diagram of a PDA given below with input alphabet ∑ = {a, b}and stack alphabet Γ = {X, Z}. Z is the initial stack symbol. Let L denote the language accepted by the PDA.

  • A

  • B

  • C

  • D

Question 9

Consider the following languages:
L1 = {anbmcn : m, n >= 1}
L2 = {anbnc2n : n >= 1}
Which one of the following is TRUE?

  • Both L1 and L2 are context-free.

  • L1 is context-free while L2 is not context-free.

  • L2 is context-free while L1 is not context-free.

  • Neither L1 nor L2 is context-free.

Question 10

For Σ = {a, b}, let us consider the regular language

L = {x ∣ x = a2 + 3k or x = b10 + 12k, k ≥ 0} 

Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for L?

  • 3

  • 5

  • 9

  • 24

There are 10 questions to complete.

Take a part in the ongoing discussion