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 

  •  
  •  
  •  
  •  

Question 2

Which of the following problems are decidable?

gatecs2012automata2
  • 1, 2, 3, 4

  • 1, 2

  • 2, 3, 4

  • 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

  • B

  • C

  • 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?

  • k+1

  • n+1

  • 2(n+1)

  • 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?

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

  • L1 is a regular language

  • All the three languages are context free

  • 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

  • B

  • C

  • D

Question 7

Which of the following pairs have DIFFERENT expressive power?

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

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

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

  • 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?

  • n-1

  • n

  • n+1

  • 2n-1

Question 9

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

  • Only L2 is context free

  • Only L2 and L3 are context free

  • Only L1 and L2 are context free

  • 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?

  • (0*10*1)*

  • 0*(10*10*)*

  • 0*(10*1*)*0*

  • 0*1(10*1)*10*

There are 112 questions to complete.

Take a part in the ongoing discussion