MST-QUIZ-1 - Attempt Review
MST-QUIZ-1 - Attempt Review
General MST-QUIZ-1
Question 1
Correct
Consider L1 =a(a+b)*
and L2=(a+b)*b
Intersection of L1 and L2
is
Select one:
a. (a+b)*a
b.
a(a+b)*
c.
a(a+b)*b
d.
b(a+b)*a
S -> 0B
| 1 A
A -> 0S | 0
B -> 1S | 1
Select one:
a.
Odd no of 0’s and 1’s.
b.
Even number of 0’s and 1’s.
c. Equal
number of 0’s and 1’s.
Question 3
Correct
Select one:
a. N -1 States
b. N states
c. N+2 States
d. N +1 States
Select one:
a. There exists an equivalent DFA for every given NFA
b. Q is a proper subset of 2 Q
2 1
c. |Q | ≤ |Q |
1 2
d.
|Q2| ≤ |Q1 |
Consider the context-free grammar G: S->0S1 | SS | 01 Which of the following statement is false
with respect to
given grammar?
Select one:
a. It will not generate all string start with
0 over {0,1}.
b.
It will not generate all string that ends
with 1 over {0,1}.
c.
It will generate all string begin with 011.
d. String
w=001011 can be generated by grammar G.
The correct answer is: It will generate all string begin with 011.
Question 6
Incorrect
Given grammar G: S-> S+S | S*S | a Which of the following statement is false
with respect to above grammar?
Select one:
a. It
is an unambiguous grammar.
b.
String w=a-a*a can not be generated by
grammar G.
c. It is a context-free grammar.
Select one:
a. abbabbbab
b.
abbbab
c.
ababbabbbab
d.
ababab
Question 8
Correct
Select one:
a.
(0+1)*1101
b. (10)*(01)*(00+11)*
c. 1(0+1)*101
d. 110*(0+1)
Select one:
a. L={0m | and m=n 2
and n>=1}
b.
L={0m | and m=2 n
and n>=1}
c.
L={02n| n>=1}
d.
L={0p | p is a prime
number }
Question 10
Correct
Select one:
a. (00+11+10+01)*
b.
(01+10)*
c.
(00+11)*
d. (0+1)*(0+1)*
Given L={01,1,23}
Select one:
a. 213
b. 123
c. 2301
d. 231
Question 12
Incorrect
Select one:
a. All
context-free languages are regular languages.
c. A
regular language is also a context-free language.
d.
A regular language is either left linear or
right linear.
S ->
1S | 0A | 1
A ->
1A | 0B
B ->
1B | 0C | 0
N 0(w)
: Number of 0’s in string w.
N 1 (w)
: Number of 1’s in string w.
Language
generated by Grammar G is
Select one:
a.
L(G)={ w | N 1 (w)
> 3N 0(w)}
b.
L(G)={w | N 1 (w)=3n
where n belongs to {0,1,2,…}}
c. L(G)={w | N (w)=3n
where n belongs to {0,1,2,…}}
0
d. L(G)={ w | N (w)
> 3N (w)}
0 1
Select one:
a. Ʃ+ = Ʃ* U { ε }
b.
Ʃ* = Ʃ+ U { ε }
c. Ʃ* = Ʃ+
L1 ={0n1n |
n>=0}
L2=(0+1)*
L3= L1 Union L2
Then which of the following is true for the
languages L3 and L2
Select one:
a. L is regular
language and L is not a regular language.
3 2
b. L is not a regular
Languageand L is a regular language.
3 2
c. L is regular
Language and L is a regular language.
3 2
d.
L3 is not a regular
Language and L2 is not a regular language.
P r evi o u s a c ti vi ty
◄ Assignment-1
Jump to...
N ext a c ti vi ty
Quiz 1- 17/November/2020 ►
Font size A- A A+ Site color R A A A
Font size A- A A+ Site color R A A A
Font size A- A A+ Site color R A A A
Stay in touch
Thapar Institute of Engineering & Technology