Classical

Theory Of Computation MCQ - Context free languages

21:  

L = (an bn an | n = 1,2,3)  is an example of a language that is

A. context free
B. not context free
C. not context free but whose complement is CF
D. both (b) and (c)
 
 

Option: D

Explanation :


22:  

If Σ = (0, 1), L = Σ* and R = (0n 1nsuch that  n >  0 )

then languages L ∪ R and R respectively are

A.

Regular, Regular

B.

Regular, Not regular

C.

Not regular, Not regular

D.

None of these

 
 

Option: B

Explanation :


23:  

 FSM can recognize

A. any grammar
B. only CG
C. Both (a) and ( b )
D. only regular grammar
 
 

Option: D

Explanation :


24:  

 Set of regular languages over a given alphabet set is not closed under

A. union
B. complementation
C. intersection
D. All of these
 
 

Option: D

Explanation :


25:  

Which of the following statement is correct?

A.

All languages can not be generated by CFG

B.

Any regular language has an equivalent CFG

C.

Some non regular languages can't be generated by CFG

D.

both (b) and (c)

 
 

Option: D

Explanation :

CFG is a higher than regular language. So we can draw a regular equivalent to CFG. And some non regular like context sensitive can't be generated by cfg. So, option 3  and 2 are correct. So answer is 'D'.




Suggest an improvement