Classical

Theory Of Computation MCQ - Context free languages

31:  

 In a context-sensitive grammar, number of grammar symbols on the left hand side of a production can't be greater than the number of

A.

grammar symbols on the right hand side

B.

terminals on the right hand side

C.

non-terminals on the right hand side

D.

 all of these

 
 

Option: C

Explanation :


32:  

 In a context-free grammar

A.

ε can't be the right hand side of any production

B.

terminal symbols can't be present in the left hand side of any production

C.

number of grammar symbols in the left hand side is not greater than the number of grammar symbols in the right hand side

D.

all of these

 
 

Option: D

Explanation :


33:  

CFG can be recognized by a

A.

push-down automata

B.

2-way linear bounded automata

C.

 both (a) and (b)

D.

none of these

 
 

Option: C

Explanation :


34:  

 Which of the following statements are true?
I.    The set of all odd integers is a monoid under multiplication.
II.   The set of all complex number is a group under multiplication
III.  The set of all integers under the operation * given by a * b = a+b-ab is a monoid
IV.   Zs under symmetric difference   defined by
                     A B = (A-B) ∪ (B-A) is an abelian group

A.

I and II

B.

I, III and IV

C.

I, II and III

D.

I, II and IV

 
 

Option: B

Explanation :


35:  

  A given grammar is called ambiguous if

A.

two or more productions have the same non-terminal on the left hand side

B.

a derivation tree has more than one associated sentence

C.

there is a sentence with more than one derivation tree corresponding to it

D.

brackets are not present in the grammar

 
 

Option: C

Explanation :




Suggest an improvement