Automata GATE CS and IT previous year questions with answer


Ques 41 Gate 2016 Set-2


Language L1 is defined by the grammar:
S1 -> aS1b | ε
Language L2 is defined by the grammar:
S2 -> abS2 | ε
Consider the following statements:

P: L1 is regular
Q: L2 is regular

Which one of the following is TRUE?

A

Both P and Q are true

B

P is true and Q is false

C

P is false and Q is true

D

Both P and Q are false



Ques 42 Gate 2016 Set-1


Let X be a recursive language and Y be a recursively enumerable but not recursive language. Let W and Z be two languages such that Y reduces to W, and Z reduces to X (reduction means the standard many-one reduction). Which one of the following statements is TRUE?

A

W can be recursively enumerable and Z is recursive.

B

W an be recursive and Z is recursively enumerable.

C

W is not recursively enumerable and Z is recursive.

D

W is not recursively enumerable and Z is not recursive



Ques 43 Gate 2016 Set-1


Consider the following context-free grammars:

G1: S → aS|B, B → b|bB
G2: S → aA|bB, A → aA|B|ε, B → bB|ε

Which one of the following pairs of languages is generated by G1 and G2, respectively?

A

{ambn |m > 0 or n > 0} and {ambn |m > 0 and n > 0}

B

{ambn |m > 0 and n > 0} and {ambn |m > 0 or n ≥ 0}

C

{ambn |m ≥ 0 or n > 0} and {ambn |m > 0 and n > 0}

D

{ambn |m ≥ 0 and n > 0} and {a mbn |m > 0 or n > 0}



Ques 44 Gate 2016 Set-1


Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?

A

(0+1)*0011(0+1)* + (0+1)*1100(0+1)*

B

(0+1)* (00(0+1) *11+11(0+1)*00)(0+1)*

C

(0+1)*00(0+1) *+ (0+1) *11(0+1) *

D

00(0+1) *11+11(0+1)*00



Ques 45 Gate 2016 Set-1


Which of the following decision problems are undecidable?

I. Given NFAs N1 and N2, is L(N1)∩L(N2) = Φ?
II. Given a CFG G = (N,Σ,P,S) and a string x ∈ Σ*, does x ∈ L(G)?
III. Given CFGs G1 and G2, is L(G1) = L(G2)?
IV. Given a TM M, is L(M) = Φ?

A

I and IV only

B

II and III only

C

III and IV only

D

II and IV only



Ques 46 Gate 2016 Set-1


Which of the following languages is generated by the given grammar?

S → aS|bS| ε

A

{anbm | m,n >= 0}

B

{w∈{a,b}* | w has equal number of a's and b's}

C

{an | n>=0} U {anbn | n>=0}

D

{a,b}*



Ques 47 Gate 2015 Set-1


For any two languages L1 and L2 such that L1 is context free and L2 is recursively enumerable but not recursive, which of the following is/are necessarily true?

I. L1' (complement of L1) is recursive
II. L2' (complement of L2) is recursive
III. L1' is context-free
IV. L1' ∪ L2 is recursively enumerable

A

I only

B

III only

C

III and IV only

D

I and IV only



Ques 48 Gate 2014 Set-1


Which one of the following is TRUE?

A

The Language L={ an bn | n≥ is regular }

B

The Language L={ an | n is prime }

C

The Language L={ w | w has 3k+1 b's for some k ∈ N with Σ ={a,b}} is regular

D

The Language L={ww | w ∈ Σ with Σ ={0,1}} is regular