Automata GATE CS and IT previous year questions with answer


Ques 11 Gate 2020


Consider the following languages.

L1 = { wxyx ∣ w,x,y ∈ (0+1)+ }
L2 = { xy ∣ x,y ∈ (a+b)*, ∣x∣=∣y∣, x≠y }

Which one of the following is TRUE ?

A

L1 is regular and L2 is context- free

B

L1 context- free but not regular and L2 is context-free

C

Neither L1 nor L2 is context- free

D

L1 context- free but L2 is not context-free



Ques 12 Gate 2020


Which of the following languages are undecidable? Note that ⟨M⟩ indicates encoding of the Turing machine M.

L1 = { ⟨M⟩ ∣ L(M)=∅ }
L2 = { ⟨M,w,q⟩ ∣ M on input w reaches state q in exactly 100 steps }
L3 = { ⟨M⟩ ∣ L(M) is not recursive }
L4 = { ⟨M⟩ ∣ L(M) contains at least 21 members }

A

L1, L3, and L4 only

B

L1, and L3 only

C

L2, and L3 only

D

L2, L3 and L4 only



Ques 13 Gate 2020


Consider the language L = { an ∣ n≥0 }∪{ anbn∣ n≥0 } and the following statements.
I. L is deterministic context-free.
II. L is context-free but not deterministic context-free.
III. L is not LL(k) for any k.
Which of the above statements is/are TRUE ?

A

Ⅰ only

B

Ⅱ only

C

Ⅰ and Ⅲ only

D

Ⅲ only



Ques 14 Gate 2020


Consider the following statements
I. If L1∪L2 is regular, then both L1 and L2 must be regular.
II. The class of regular languages is closed under infinite union.
Which of the above statements is/are TRUE ?

A

Ⅰ only

B

Ⅱ only

C

Both Ⅰ and Ⅱ

D

Neither Ⅰ nor Ⅱ



Ques 15 Gate 2020


Which one of the following regular expressions represents the set of all binary strings with an odd number of 1′s ?

A

((0+1)*1(0+1)*1)*10*

B

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

C

10*(0*10*10*)*

D

None



Ques 16 Gate 2020


Consider the following language.

L = { x∈{a,b}* ∣ number of a’s in x divisible by 2 but not divisible by 3 }


The minimum number of states in DFA that accepts L is _________ .


6 is the correct answer.


Ques 17 Gate 2020


Consider the following language.
L = { x∈{a,b}* ∣ number of a’s in x divisible by 2 but not divisible by 3 }
The minimum number of states in DFA that accepts L is _________ .


6 is the correct answer.


Ques 18 Gate 2019


Let Σ be the set of all bijections from {1, ..., 5} to {1, ..., 5}, where id denotes the identity function, i.e. id(j) = j,∀ j. Let ° denote composition on functions. For a string x = x1 x2 ... xn ∈ Σn, n ≥ 0, let π(x) = x1°x2° ... °xn. Consider the language L = {x ∈ Σ* ⏐ π(x) = id}. The minimum number of states in any DFA accepting L is _________ .


120 is the correct answer.


Ques 19 Gate 2019


Consider the following sets:

S1: Set of all recursively enumerable languages over the alphabet {0, 1}.
S2: Set of all syntactically valid C programs.
S3: Set of all languages over the alphabet {0, 1}.
S4: Set of all non-regular languages over the alphabet {0, 1}.


Which of the above sets are uncountable?

A

S1 and S2

B

S3 and S4

C

S1 and S4

D

S2 and S3



Ques 20 Gate 2019


Which one of the following languages over ∑ = {a, b} is NOT context-free?

A

{wwR ⏐ w ∈ {a, b}*}

B

{wwR ⏐ w ∈ {a, b}*}

C

{wanwRbn ⏐ w ∈ {a, b}*, n≥ 0}

D

{anbii⏐ i ∈ {n, 3n, 5n}, n≥ 0}