adplus-dvertising

Welcome to the Context Free Languages MCQs Page

Dive deep into the fascinating world of Context Free Languages with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Context Free Languages, a crucial aspect of Formal Languages and Automata Theory. In this section, you will encounter a diverse range of MCQs that cover various aspects of Context Free Languages, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Formal Languages and Automata Theory.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Context Free Languages. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Formal Languages and Automata Theory.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Context Free Languages. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Context Free Languages MCQs | Page 6 of 12

Explore more Topics under Formal Languages and Automata Theory

Discuss
Answer: (a).Removal of useless variables
Q52.
The variable which produces an epsilon is called:
Discuss
Answer: (b).nullable
Q53.
Statement:
For A-> e ,A can be erased. So whenever it appears on the left side of a production, replace with another production without the A.

State true or false:
Discuss
Answer: (b).false
Discuss
Answer: (a).S->aXb | ab, X-> aXb | ab
Q55.
Consider the following grammar:
A->e

B->aAbC

B->bAbA

A->bB

The number of productions added on the removal of the nullable in the given grammar:

a.

3

b.

4

c.

2

d.

0

Discuss
Answer: (b).4
Q56.
Let G=(V, T, P, S) be a CFG such that _____________. Then there exists an equivalent grammar Gโ€™ having no e productions.
Discuss
Answer: (c).e โˆ‰ L(G)
Q57.
For each production in P of the form:
A-> x1x2x3โ€ฆxn

put into Pโ€™ that production as well as all those generated by replacing null variables with e in all possible combinations. If all x(i) are nullable,
Discuss
Answer: (b).A->e is not put into Pโ€™
Q58.
For the given grammar G:
S->ABaC

A->BC

B->b| e

C->D| e

D-> d

Remove the e productions and generate the number of productions from S in the modified or simplified grammar.

a.

6

b.

7

c.

5

d.

8

Discuss
Answer: (d).8
Q59.
Consider G=({S,A,B,E}, {a,b,c},P,S), where P consists of S โ†’AB, A โ†’a, B โ†’b and E โ†’c.
Number of productions in Pโ€™ after removal of useless symbols:

a.

4

b.

3

c.

2

d.

5

Discuss
Answer: (a).4
Q60.
Given grammar G:
S->aS| AB

A-> e

B-> e

D-> b

Reduce the grammar, removing all the e productions:
Discuss
Answer: (b).S->aS| AB| A| B| a, D-> b

Suggested Topics

Are you eager to expand your knowledge beyond Formal Languages and Automata Theory? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!