NEW
Font size
Worksheetsflat-UNIT 1
Total questions: 10
Worksheet time: 50mins
Language of finite automata is.
Type 0
Type 1
Type 2
Type 3
Correct hierarchical relationship among context- free, right-linear, and context-sensitive language is
context-free ⊂ right-linear ⊂ context-sensitive
context-free ⊂ context-sensitive ⊂ right-linear
context-sensitive ⊂ right-inear ⊂context-free
right-linear ⊂context-free ⊂context-sensitive
Which of the following statements is correct?
A = { If an bn | n = 0,1, 2, 3 ..} is regular language
Set B of all strings of equal number of a's and b's deines a regular language
L (A* B*)∩ B gives the set A
None of these
Following context free grammar
S —> aB | bA
A —>b | aS | bAA
B —> b | bS | aBB
generates strings of terminals that have
equal number of a's and b's
odd number of a's and odd number b's
even number of a's and even number of b's
odd number of a's and even number of a's
Consider the grammar :
S —> ABCc | Abc
BA —> AB
Bb —> bb
Ab —> ab
Aa —> aa
Which of the following sentences can be derived by this grammar
abc
aab
abcc
abbb
The language of all words with at least 2 a's can be described by the regular expression
(ab)*a and a (ba)*
(a + b)* ab* a (a + b)*
b* ab* a (a + b)*
all of these
Any string of terminals that can be generated by the following CFG is
S-> XY
X--> aX | bX | a
Y-> Ya | Yb | a
has atleast one 'b'
should end in a 'a'
has no consecutive a's or b's
has atleast two a's
Which of the following statement is correct?
All languages can not be generated by CFG
Any regular language has an equivalent CFG
Some non regular languages can't be generated by CFG
both (b) and (c)
Consider a grammar with the following productions
S--> aab | bac | aB
S --> α S | b
S --> α b b | ab
Sα --> bdb | b
The above grammar is
Context free
regular
context sensitive
LR ( k )
The grammars G = ( { s }, { 0, 1 }, p , s)
where p = (s —> 0S1, S —> OS, S —> S1, S —>0} is a
recursively enumerable language
regular language
context-sensitive language
context-free language
