wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

TOC_CS8501_WT 5_07.10.2020

Total questions: 30

Worksheet time: 29mins

Name
Class
Date
1.

The format: A->aB refers to which of the following?

a)

a) Chomsky Normal Form

b)

b) Greibach Normal Form

c)

c) Backus Naur Form

d)

d) None of the mentioned

2.

Which of the following does not have left recursions?

a)

a) Chomsky Normal Form

b)

b) Greibach Normal Form

c)

c) Backus Naur Form

d)

d) All of the mentioned

3.

Every grammar in Chomsky Normal Form is:

a)

a) regular

b)

b) context sensitive

c)

c) context free

d)

d) all of the mentioned

4.

Which of the production rule can be accepted by Chomsky grammar?

a)

a) A->BC

b)

b) A->a

c)

c) S->e

d)

d) All of the mentioned

5.

Given grammar G:

(1)S->AS

(2)S->AAS

(3)A->SA

(4)A->aa

Which of the following productions denies the format of Chomsky Normal Form?

a)

a) 2,4

b)

b) 1,3

c)

c) 1, 2, 3, 4

d)

d) 2, 3, 4

6.

Which of the following grammars are in Chomsky Normal Form:

a)

a) S->AB|BC|CD, A->0, B->1, C->2, D->3

b)

b) S->AB, S->BCA|0|1|2|3

c)

c) S->ABa, A->aab, B->Ac

d)

d) All of the mentioned

7.

With reference to the process of conversion of a context free grammar to CNF, the number of variables to be introduced for the terminals are:

S->ABa

A->aab

B->Ac

a)

a) 3

b)

b) 4

c)

c) 2

d)

d) 5

8.

In which of the following, does the CNF conversion find its use?

a)

a) CYK Algorithm

b)

b) Bottom up parsing

c)

c) Preprocessing step in some algorithms

d)

d) All of the mentioned

9.

Let G be a grammar. When the production in G satisfy certain restrictions, then G is said to be in ___________.

a)

a) restricted form

b)

b) parsed form

c)

c) normal form

d)

d) all of the mentioned

10.

Let G be a grammar: S->AB|e, A->a, B->b

Is the given grammar in CNF?

a)

a) Yes

b)

b) No

11.

Which of the expressions correctly is an requirement of the pumping lemma for the context free languages?

a)

a) uvnwxny

b)

b) uvnwnxny

c)

c) uv2nwx2ny

d)

d) All of the mentioned

12.

Which of the following cannot be filled in the blank below?

Statement: There are CFLs L1 nad L2 so that ___________is not a CFL.

a)

a) L1∩L2

b)

b) L1′

c)

c) L1*

d)

d) None of the mentioned

13.

Which of the following does not obey pumping lemma for context free languages ?

a)

a) Finite languages

b)

b) Context free languages

c)

c) Unrestricted languages

d)

d) None of the mentioned

14.

The context free languages are closed under:

a)

a) Intersection

b)

b) Complement

c)

c) Kleene

d)

d) None of the mentioned

15.

Given Grammar G1:

S->aSb

S->e

Grammar G2:

R->cRd

R->e

If L(G)=L(G1) U L(G2), the number of productions the new starting variable would have:

a)

a) 2

b)

b) 3

c)

c) 4

d)

d) 1

16.

If L1 and L2 are context free languages, L1-L2 are context free:

a)

a) always

b)

b) sometimes

c)

c) never

d)

d) none of the mentioned

17.

A___________ is context free grammar with atmost one non terminal in the right handside of the production.

a)

a) linear grammar

b)

b) linear bounded grammar

c)

c) regular grammar

d)

d) none of the mentioned

18.

The intersection of context free language and regular language is _________

a)

a) regular language

b)

b) context free language

c)

c) context sensitive language

d)

d) non of the mentioned

19.

Which of the following is regular?

a)

a) a100b100

b)

b) (a+b)*-{a100b100}

c)

c) Both (a) and (b)

d)

d) None of the mentioned

20.

The transition a Push down automaton makes is additionally dependent upon the:

a)

a) stack

b)

b) input tape

c)

c) terminals

d)

d) none of the mentioned

21.

A push down automata can represented using:

a)

a) Transition graph

b)

b) Transition table

c)

c) ID

d)

d) All of the mentioned

22.

How many tuples are available in the Instantaneous Description of PDA?

a)

7

b)

3

c)

5

d)

2

23.

A DPDA is a PDA in which:

a)

a) No state p has two outgoing transitions

b)

b) More than one state can have two or more outgoing transitions

c)

c) Atleast one state has more than one transitions

d)

d) None of the mentioned

24.

State true or false:

Statement: For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice versa.

a)

a) true

b)

b) false

25.

If the PDA does not stop on an accepting state and the stack is not empty, the string is:

a)

a) rejected

b)

b) goes into loop forever

c)

c) both (a) and (b)

d)

d) none of the mentioned

26.

Which of the following relates to Chomsky hierarchy?

a)

a) Regular<CFL<CSL<Unrestricted

b)

b) CFL<CSL<Unrestricted<Regular

c)

c) CSL<Unrestricted<CF<Regular

d)

d) None of the mentioned

27.

A language is accepted by a push down automata if it is:

a)

a) regular

b)

b) context free

c)

c) both (a) and (b)

d)

d) none of the mentioned

28.

Context free grammar is called Type 2 grammar because of ______________ hierarchy.

a)

a) Greibach

b)

b) Backus

c)

c) Chomsky

d)

d) None of the mentioned

29.

There exists a Context free grammar such that:

X->aX

Which among the following is correct with respect to the given assertion?

a)

a) Left Recursive Grammar

b)

b) Right Recursive Grammar

c)

c) Non Recursive Grammar

d)

d) None of the mentioned

30.

State true or false:

Statement: Every context free grammar can be transformed into an equvalent non deterministic push down automata.

a)

a) true

b)

b) false