PDA (Pushdown Automata)
  • GATE Crash CourseExplore
  • Regular languages and finite automata

    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

    Consider the languages L1 = [Tex]\\phi [/Tex]and L2 = {a}. Which one of the following represents L1 L2* U L1*

     
    • A

      {[Tex]\epsilon [/Tex]}

    • B

      [Tex]\phi [/Tex]

    • C

      a*

    • D

      {[Tex]\epsilon [/Tex],a}

    Question 3

    Consider the DFA given. 

     

     Which of the following are FALSE?

    • Complement of L(A) is context-free.

    • L(A) = L((11*0+0)(0 + 1)*0*1*).

    • For the language accepted by A, A is the minimal DFA.

    • A accepts all strings over {0, 1} of length at least 2.

    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

    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 6

    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 7

    Which one of the following languages over the alphabet {0,1} is described by the regular expression: (0+1)*0(0+1)*0(0+1)* ?

    • A

      The set of all strings containing the substring 00.

    • B

      The set of all strings containing at most two 0’s.

    • C

      The set of all strings containing at least two 0’s.

    • D

      The set of all strings that begin and end with either 0 or 1.

    Question 8

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

    (GATE 2004 | MCQ | 1-mark)

    • A

      regular

    • B

      context-free but not regular

    • C

      context-sensitive but not context-free

    • D

      type-0 but not context-sensitive

    Question 9

    Given the following state table of an FSM with two states A and B, one input and one output:

    Present State A      Present State B        Input         Next State A         Next State B      Output         
    0
    0
    0
    0
    0
    1
    0
    1
    0
    1
    0
    0
    1
    0
    0
    0
    1
    0
    1
    1
    0
    1
    0
    0
    0
    0
    1
    0
    1
    0
    0
    1
    1
    0
    0
    1
    1
    0
    1
    0
    1
    1
    1
    1
    1
    0
    0
    1

    If the initial state is A=0, B=0, what is the minimum length of an input string which will take the machine to the state A=0, B=1 with Output = 1?

    • A

      3

    • B

      4

    • C

      5

    • D

      6

    Question 10

    Given the language L = {ab, aa, baa}, which of the following strings are in L*?

    • abaabaaabaa

    • aaaabaaaa

    • baaaaabaaaab

    •  baaaaabaa

    There are 154 questions to complete.

    Take a part in the ongoing discussion