0% found this document useful (0 votes)
355 views13 pages

MST-QUIZ-1 - Attempt Review

Uploaded by

Anutaj Nagpal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
355 views13 pages

MST-QUIZ-1 - Attempt Review

Uploaded by

Anutaj Nagpal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Font size A- A A+ Site color R A A A

Dashboard Courses 2021ODDSEM Computer Science and Engineering UCS701-2021ODDSEM

General MST-QUIZ-1

Started on Tuesday, 17 November 2020, 4:47 PM


State Finished
Completed on Tuesday, 17 November 2020, 5:07 PM
Time taken 20 mins 8 secs
Grade 10.00 out of 15.00 (67%)

Question 1
Correct

Mark 1.00 out of 1.00

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

Your answer is correct.


The correct answer is: a(a+b)*b
Question 2 Font size A- A A+ Site color R A A A
Correct

Mark 1.00 out of 1.00

Given CFG generates

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.

d. Even number of 0’s and Odd number of 1’s

Your answer is correct.

The correct answer is: Equal


number of 0’s and 1’s.

Question 3
Correct

Mark 1.00 out of 1.00

Consider regular expression


(a+b)(a+b)(a+b)…n times.

Minimum number of states DFA that recognize


the above regular expressions.

Select one:
a. N -1 States

b. N states

c. N+2 States

d. N +1 States 

Your answer is correct.

The correct answer is: N +1 States


Question 4 Font size A- A A+ Site color R A A A
Incorrect

Mark 0.00 out of 1.00

Given Ʃ= {0,1} and an NFA N= (Q1 ,Ʃ,


T1 , q0 , F 1 ) and its equivalent DFA D =  (Q2 ,Ʃ, T2, q1 , F 2). 

Then which of the following is incorrect.


Note: T1 is the transition function of NFA N
and T2 is the transition function of DFA D.

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 |

Your answer is incorrect.


The correct answer is:
|Q2|  ≤ |Q1 |
Question 5 Font size A- A A+ Site color R A A A
Not answered

Marked out of 1.00

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.

Your answer is incorrect.

The correct answer is: It will generate all string begin with 011.

Question 6
Incorrect

Mark 0.00 out of 1.00

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.

d. It will generate the string w=a*a+a.

Your answer is incorrect.

The correct answer is: It


is an unambiguous grammar.
Question 7 Font size A- A A+ Site color R A A A
Correct

Mark 1.00 out of 1.00

Given regular expression r=(ab+abb)*bbab

Which of the string w does not belongs to


regular expression r

Select one:
a. abbabbbab

b.
abbbab

c.
ababbabbbab

d. 
ababab

Your answer is correct.


The correct answer is: ababab

Question 8
Correct

Mark 1.00 out of 1.00

String 1101 does not belong to which of the


following regular expression

Select one:
a.
(0+1)*1101

b. (10)*(01)*(00+11)* 

c. 1(0+1)*101

d. 110*(0+1)

Your answer is correct.


The correct answer is: (10)*(01)*(00+11)*
Question 9 Font size A- A A+ Site color R A A A
Correct

Mark 1.00 out of 1.00

Which of the following is regular language?

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 }

Your answer is correct.


The correct answer is:
L={02n| n>=1}

Question 10
Correct

Mark 1.00 out of 1.00

Set of all string over {0,1} that will


generate all strings of even length.

Select one:
a. (00+11+10+01)* 

b.
(01+10)*

c.
(00+11)*

d. (0+1)*(0+1)*

Your answer is correct.

The correct answer is: (00+11+10+01)*


Question 11 Font size A- A A+ Site color R A A A
Correct

Mark 1.00 out of 1.00

Given L={01,1,23}

Which of the following string does not


belongs to L*

Select one:
a. 213 

b. 123

c. 2301

d. 231

Your answer is correct.


The correct answer is: 213

Question 12
Incorrect

Mark 0.00 out of 1.00

Which of the following statement is false?

Select one:
a. All
context-free languages are regular languages.

b. Some context free grammar are ambiguous.

c. A
regular language is also a context-free language.

d.
A regular language is either left linear or
right linear.

Your answer is incorrect.


The correct answer is: All
context-free languages are regular languages.
Question 13 Font size A- A A+ Site color R A A A
Correct

Mark 1.00 out of 1.00

Consider the following


Grammar G

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

Your answer is correct.

The correct answer is: L(G)={w | N 0(w)=3n


where n belongs to {0,1,2,…}}
Question 14 Font size A- A A+ Site color R A A A
Correct

Mark 1.00 out of 1.00

Which of the relation between Ʃ* 


 and Ʃ+ is correct.

Select one:
a. Ʃ+ = Ʃ*   U { ε }

b. 
Ʃ* = Ʃ+  U { ε }

c. Ʃ* = Ʃ+

d. Ʃ* is a proper subset of Ʃ+      

Your answer is correct.

The correct answer is:


Ʃ* = Ʃ+  U { ε }
Question 15 Font size A- A A+ Site color R A A A
Incorrect

Mark 0.00 out of 1.00

Consider languages L1 and L2


over {0,1}

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.

Your answer is incorrect.


The correct answer is: L3 is regular
Language and L2 is 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

P.O. Box 32, Bhadson Road,


Patiala, Punjab,
Pin -147004, India

Copyright © 2020 - Developed by CITM- Thapar Institute powerd by Moodle.



https://www.thapar.edu



You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy