WorksheetsTOC Gate questions SET-2
Total questions: 56
Worksheet time: 56mins
Obtaining the final string by concatenating the labels of the tree from left to right is called yield of a _____ tree.
Perfect
Concatenation
Leaves crafting
Parse
Given the grammar G = {{S, B}, {0,1}, {S}, P}, what are {0,1}?
Non terminals
Production
Starting Symbol
Terminals
What is an approach in CFG that starts derivation from the tree leaves?
Bottom-down approach
Top-up Approach
Bottom-less Approach
Bottom-up Approach
Which among the two approaches reduces an input string back to the start symbol?
Top down
Bottom up
What is an approach that draws the derivation tree from the start symbol to the tree leaves?
Topping approach
Top gearing approach
Top down approach
Derivation down approach
A (a) form is a tree wherein if the partial derivation tree contains the root vertex.
What is a type of derivation tree that is obtained by applying production to the rightmost variable in each step?
Right part tree
Right derivation tree
Production processing rightly
Rightly derivation tree
A left recursive production has a form of X --> aX. True or False
True
False
A grammar G is said to be ________ if there exists two or more derivation tree for some sting in a L(G).
Ambitions
Ambigious
Ambiguous
Ambitious
The set of all CFL is identical to the set of languages accepted by (a) Automata.
Which of the following is NOT considered closed for Context free languages?
Concatenation
Union
Kleen Star
Complement
During the derivation of a tree, if the leaves are null, then the derivation is null. True or False
True
False
Which of the following is not a Context-Free Grammar ?
anb4m Where mn ≥ 1
aibj Where mn i=2j+1
ann Where n ≥ 1
ambm+ncn Where mn ≥ 1
Which of the following RE are equivalent?
1. (00)* 2. (00)* ( ϵ +o)*
3. 0* 4. 0(00)*
1 and 2
2 and 3
2 and 4
3 and 4
How many states does Minimum DFA needs to construct a language where all string ending with "ab"
2
3
4
5
Which of the following statement is TRUE for language L ?
L is acceptable by Turing machine than it is not acceptable by PDA
L is acceptable by PDA than it is not acceptable by turning machine
L is acceptable by RE than it is not acceptable by CFG
L is accoetable by RG and CFG, cannot be acceptable by turning machine
Which of the following statement is TRUE for language L ?
L is acceptable by Turing machine than it is not acceptable by PDA
L is acceptable by PDA than it is not acceptable by turning machine
L is acceptable by RE than it is not acceptable by CFG
L is accoetable by RG and CFG, cannot be acceptable by turning machine
Dp Np Df Nf are PDA, NPDA, DFA and NFA,respectively.
Which of the following statement is correct ?
Dp = Np
Df = Dp
Df = Nf
Np = Nf
RE= (01+11)*
How many states need to design a minimum DFA?
2
3
1
4
Identify the language generated by the grammar
S-->XY
X-->aX/a
Y-->bY/b
anbm where mn≥0
bman where mn≥0
anbm where mn>0
anbm where m≥n
let L1 and L2 be context free language and regular language, respectively. Then which of the following statement is True
Compliment of L1 is not regular
Compliment of L2 is not regular
Compliment of L2 is regular
L1-L2 is not a context free
L1: { 0p1q0r, where p=q and pqr≥0 }
L2: 0p1q0r, where p=q =r, and pqr≥0
L1 is context free
L2 is context free
L2 is context free
L1 is not a context free
L is a language accepted by the turning machine. x is a string accepted by TM is a
Decidable problem
Undecidable problem
X can be accepted by CFG
X can be accepted by RG
A Grammer G is in Gribach Normal formal. A string "x" of length 5 is accepted by the G. How many step required to achieve the string
9
5
10
4
L1= anbm where n=m, nm>0
L2= anbm where nm>0
L= L1 U L2 is
L is regular grammar
L is regular but not context free
L is context free only
L is only accpeted by turing machine
Which of the problem is Undeciadable
Membership of CFG's
Ambiguity of Problem of CFGs
Membership of TM
Equivalance of finite state machines
Transition function δ of NFA i.e Q x Σ =
2Q
Q
2XQ
Q0
S-->aBCD
BCD--> DE
D-->aD/a
E--> ϵ /b
The above grammer is
Type 0 but not type 1
Type 1 but not type 2
Type 2 but not type 3
Type 0,1,2,3
In complexity theory, P1 P2 P3 are three algorithms where P1 & P2 are decidable and Un-decidable, respectively. Which of the following is true?
P3 is decidable if P1 is converted into P3
P3 is undecidable if P3 is converted into P2
P3 is decidable if P3 is converted into P1
P3 is decidable if P3 is converted into inverse of P2
L1 is a Recusive and L2 is Recursive enumerable but not recursive language. Which of the following is True?
Homomorphism of L1 is Resursive
complement of L2 is Recursive enumerable
complement of L1 is Recursive
Homomorphism of L2 is not Resursive enumerable
L1 is a Recusive and L2 is Recursive enumerable but not recursive language. Which of the following is False?
L1 is Recursive Enumerable language
Kleen Clousre of L1 is Recursive
Kleen Clousre of L2 is Recursive
Kleen Clousre of L2 is not Recursive enumerable
L1, & L2 are RL and DCFL . Which of the following is True
L1 ∪ L2 is not DCFL
L1 ∩ L2 is not DCFL
L1 ∪ L2 is CFL
none of the above
Which of the follwing is decidable of Halting turning machine
Ambiguity
Subset
Completeness Problem
Membership
Which of the follwing is Equivalent to RE: L+ + ϵ
Kleen closure (ϵ)
Positive closure (L)
Kleen closure (Kleen closure (L))
Postive closure (L)
Which of the following Statement is True
L is language is accepted by PDA it means it is a Regular Grammar
L is language is accepted by Finite State automata it means it is a Context sensitive Grammar
L is language is accepted by Finite State automata it means it is a Context Free Grammar
L is language is accepted by PDA it means it is a Context Free Grammar
Which of the following problem is undecidable ?
Membership problem for CFG
Ambuguity of Finite state machine
Equivalent of CFL
Totally of DCLF
0p1q0r, where p=q =r, and pqr≥0 , Which of the following is true
It is accepted by Finite state machine
it is accepted by PDA
It is accpeted NPDA
It is accepted by Turing Machine
if L and compliment of L is CFL, then L is not
Regular
Context Sensitive
Context Free
Recursive language
L1 and L2 is regular language, then
L1 ∪ L2 is not Regular
L1 ∩ L2 is not Regular
U-L2 is regular, where U is universal
R1+ is not Regular
L1={10,01,110}, L2={ ϵ + 101} then L1L2 is
{ ϵ , 10101,101110}
{10101,10101}
{10110, 10101}
{10101, 101110}
Recursive Enumerable are
is a Type 0
subset of CFL
recognized by Turing machine
all of the above
Inorder to simplify a context free grammar, we can skip the following operation:
Removal of null production
Removal of useless symbols
Removal of unit productions
None of the mentioned
In context to the process of removing useless symbols, which of the following is correct?
We remove the Nullable variables
We eliminate the unit productions
We eliminate products which yield no terminals
All of the mentioned
Given grammar G:
S->aS|A|C
A->a
B->aa
C->aCb
Find the set of variables that can produce strings only with the set of terminals.
{C}
{A,B}
{A,B,S}
None of the mentioned
Suppose A->xBz and B->y, then the simplified grammar would be:
a) A->xyz
b) A->xBz|xyz
c) A->xBz|B|y
d) none of the mentioned
The variable which produces an epsilon is called:
a) empty variable
b) nullable
c) terminal
d) all of the mentioned
Which among the following is the format of unit production?
a) A->B
b) A->b
c) B->Aa
d) None of the mentioned
Given grammar:
S->aA
A->a
A->B
B-> A
B->bb
Which of the following is the production of B after simplification by removal of unit productions?
a) A
b) bb
c) aA
d) A| bb
Which of the production rule can be accepted by Chomsky grammar?
a) A->BC
b) A->a
c) S->e
d) All of the mentioned
Let G be a grammar: S->AB|e, A->a, B->b
Is the given grammar in CNF?
a) Yes
b) No
The format: A->aB refers to which of the following?
a) Chomsky Normal Form
b) Greibach Normal Form
c) Backus Naur Form
d) None of the mentioned
The pumping lemma is often used to prove that a language is:
a) Context free
b) Not context free
c) Regular
d) None of the mentioned
Which of the expressions correctly is an requirement of the pumping lemma for the context free languages?
a) uvnwxny
b) uvnwnxny
c) uv2nwx2ny
d) All of the mentioned
The context free languages are closed under:
a) Intersection
b) Complement
c) Kleene
d) None of the mentioned
Which of the following does not obey pumping lemma for context free languages ?
a) Finite languages
b) Context free languages
c) Unrestricted languages
d) None of the mentioned
Which of the following grammars are in Chomsky Normal Form:
a) S->AB|BC|CD, A->0, B->1, C->2, D->3
b) S->AB, S->BCA|0|1|2|3
c) S->ABa, A->aab, B->Ac
d) All of the mentioned
