PDA (Pushdown Automata)
  • GATE Crash CourseExplore
  • Theory of Computation GATE CS PYQ Quiz

    Last Updated :
    Discuss
    Comments

    Question 1

    Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below. 

     

     The missing arcs in the DFA are 

    • A
       
    • B
       
    • C
       
    • D
       

    Question 2

    Which of the following problems are decidable?

    gatecs2012automata2
    • A

      1, 2, 3, 4

    • B

      1, 2

    • C

      2, 3, 4

    • D

      3, 4

    Question 3

    A deterministic finite automation (DFA)D with alphabet {a,b} is given below

    GATE2011AT1

    Which of the following finite state machines is a valid minimal DFA which accepts the same language as D?

    GATE2011AT2
    GATE2011AT3

    • A

      A

    • B

      B

    • C

      C

    • D

      D

    Question 4

    Definition of a language L with alphabet {a} is given as following.

                 L={|ank|k>0, and n is a positive integer constant}

    What is the minimum number of states needed in DFA to recognize L?

    • A

      k+1

    • B

      n+1

    • C

      2(n+1)

    • D

      2[Tex](k+1)[/Tex]

    Question 5

    Consider the languages L1, L2 and L3 as given below.

    LI= {0P1q |p, q∈N}

    L2={0p1q |p, q∈ N and p=q} and

    L3= {0P1q0r |p, q, r∈ N and p =q = r}

    Which of the following statements is NOT TRUE?

    [GATE | CS | 2011 |]

    • A

      Push Down Automata (PDA) can be used to recognize L1 and L2

    • B

      L1 is a regular language

    • C

      All the three languages are context free

    • D

      Turing machine can be used to recognize all the three languages

    Question 6

    Let P be a regular language and Q be context-free language such that Q âІ P. (For example, let P be the language represented by the regular expression p*q* and Q be {pn qn  | n âˆˆ N}). Then which of the following is ALWAYS regular? 

    (A) P âˆ© Q 

    (B) P - Q 

    (C) âˆ‘* - P 

    (D) âˆ‘* - Q

    • A

      A

    • B

      B

    • C

      C

    • D

      D

    Question 7

    Which of the following pairs have DIFFERENT expressive power?

    • A

      Deterministic finite automata(DFA) and Non-deterministic finite automata(NFA)

    • B

      Deterministic push down automata(DPDA)and Non-deterministic push down automata(NPDA)

    • C

      Deterministic single-tape Turing machine and Non-deterministic single-tape Turing machine

    • D

      Single-tape Turing machine and multi-tape Turing machine

    Question 8

    Let w be any string of length n is {0,1}*. Let L be the set of all substrings of w. What is the minimum number of states in a non-deterministic finite automaton that accepts L?

    • A

      n-1

    • B

      n

    • C

      n+1

    • D

      2n-1

    Question 9

    Consider the languages - 
    L1 = {0i1j | i != j}. 
    L2 = {0i1j | i = j}. 
    L3 = {0i1j | i = 2j+1}. 
    L4 = {0i1j | i != 2j}.

    • A

      Only L2 is context free

    • B

      Only L2 and L3 are context free

    • C

      Only L1 and L2 are context free

    • D

      All are context free

    Question 10

    Let L={w in (0 + 1)*|w has even number of 1s}, i.e. L is the set of all bit strings with even number of 1s. Which one of the regular expression below represents L?

    • A

      (0*10*1)*

    • B

      0*(10*10*)*

    • C

      0*(10*1*)*0*

    • D

      0*1(10*1)*10*

    There are 112 questions to complete.

    Take a part in the ongoing discussion