Automata GATE previous year questions with answer
Ques 40 Gate 2017 Set-1
Consider the following grammar over the alphabet {a,b,c} given below, S and T are non-terminals.
T--> cT|∈
G2: S-->bSa|T
T--> cT|∈
The language L1(G1) ∩ L2(G2).
Ques 41 Gate 2017 Set-1
Consider the following context-free grammar over the alphabet ∑ = {a, b, c} with S as the start symbol:
T → bT | b
Which of the following represents the language generated by the above grammar?
Ques 42 Gate 2017 Set-1
Consider the following grammar
Q→yz|z
R→ w|∈
S→y
Ques 43 Gate 2016 Set-2
The number of states in the minimum sized DFA that accepts the language defined by the regular expression
(0+1)*(0+1)(0+1)*
is __________________
Ques 44 Gate 2016 Set-2
A student wrote two context-free grammars G1 and G2 for generating a single C-like array declaration. The dimension of the array is at least one. For example,
int a[10][3];
The grammars use D as the start symbol, and use six terminal symbols int ; id [ ] num.
Grammar G1
D → int L;
L → id [E
E → num]
E → num] [E
Grammar G2
D → int L;
L → id E
E → E[num]
E → [num]
Which of the grammars correctly generate the declaration mentioned above?
PROCESSED
Ques 45 Gate 2016 Set-2
Which one of the following grammars is free from left recursion?
PROCESSED
Ques 46 Gate 2016 Set-2
Consider the following languages.
L1 = {(M) | M takes at least 2016 steps on some input},
L2 = {(M) | M takes at least 2016 steps on all inputs} and
L3 = {(M) | M accepts ε},
where for each Turing machine M, denotes a specific encoding of M. Which one of the following is TRUE?
PROCESSED
Ques 47 Gate 2016 Set-2
Consider the following languages:
L1= {anbmcn+m : m, n >= 1}
L2= {anbnc2n : n >= 1}
Which one of the following is TRUE?
PROCESSED
Ques 48 Gate 2016 Set-2
Consider the following two statements:
I. If all states of an NFA are accepting
states then the language accepted by
the NFA is Σ* .
II. There exists a regular language A such
that for all languages B, A ∩ B is regular.
Which one of the following is CORRECT?
PROCESSED
Ques 49 Gate 2016 Set-2
Consider the following types of languages:
L1 Regular,
L2: Context-free,
L3: Recursive,
L4: Recursively enumerable.
Which of the following is/are TRUE?
I. L3' U L4 is recursively enumerable
II. L2 U L3 is recursive
III. L1* U L2 is context-free
IV. L1 U L2' is context-free
Given:
L1 is a Regular language.
L2 is a Context-free language.
L3 is a Recursive language.
L4 is a Recursively enumerable language.
To find:
Which of the given statements (I, II, III, IV) is/are TRUE.
Solution:
Let me check statement I: L3' ∪ L4 is recursively enumerable.
L3 is recursive, and recursive languages are closed under complementation.
So, L3' is also recursive.
Every recursive language is also recursively enumerable, so L3' is recursively enumerable.
Since recursively enumerable languages are closed under union, L3' ∪ L4 must be recursively enumerable.
So, statement I is TRUE.
Now let me check statement II: L2 ∪ L3 is recursive.
L2 is context-free, and every context-free language is recursive.
L3 is already given as recursive.
Since recursive languages are closed under union, the union of two recursive languages is recursive.
So, statement II is TRUE.
Next, let me check statement III: L1* ∪ L2 is context-free.
L1 is regular, and regular languages are closed under Kleene star.
So, L1* is regular.
Every regular language is context-free, which means L1* is also context-free.
Since context-free languages are closed under union, L1* ∪ L2 is context-free.
So, statement III is TRUE.
Now let me check statement IV: L1 ∪ L2' is context-free.
Context-free languages are not closed under complementation, so L2' need not be context-free.
Therefore, L1 ∪ L2' is not necessarily context-free.
So, statement IV is FALSE.
Thus, statements I, II, and III are TRUE.
Answer:
(D) I, II and III only
Total Unique Visitors