Unit4 - Subjective Questions

CSE322 • Practice Questions with Detailed Answers

1

Define Ambiguity in Context-Free Grammars. Give an example of an ambiguous grammar.

2

Distinguish between Leftmost Derivation (LMD) and Rightmost Derivation (RMD) with a suitable example.

3

What are sentential forms? Explain the relationship between derivations generated by a grammar and sentential forms.

4

Define the Language generated by a Context-Free Grammar. Construct a CFG for the language .

5

Consider the grammar . Prove that this grammar is ambiguous by generating two different parse trees for the string .

6

Discuss the major applications of Context-Free Grammars (CFG) in the field of Computer Science.

7

State the Pumping Lemma for Context-Free Languages (CFL). Explain the significance of its conditions.

8

Using the Pumping Lemma for CFG, prove that the language is not a Context-Free Language.

9

Explain the procedure for the construction of a reduced grammar by eliminating useless symbols.

10

Describe the algorithm to eliminate -productions (null productions) from a Context-Free Grammar.

11

What are unit productions? Explain the steps to simplify a CFG by eliminating unit productions.

12

Simplify the following Context-Free Grammar by eliminating null productions, unit productions, and useless symbols in the correct order.



13

Define Chomsky Normal Form (CNF). What are the advantages of converting a Context-Free Grammar into CNF?

14

Outline the systematic steps required to convert a given Context-Free Grammar into Chomsky Normal Form (CNF).

15

Define Greibach Normal Form (GNF). Explain its significance in the context of Pushdown Automata (PDA).

16

Describe the general algorithm for converting a simplified Context-Free Grammar into Greibach Normal Form (GNF).

17

Compare and contrast Chomsky Normal Form (CNF) and Greibach Normal Form (GNF) with respect to their rule structures and applications.

18

Explain the concept of Derivation Trees (Parse Trees). How do they relate to Leftmost and Rightmost derivations?

19

What is left recursion in a Context-Free Grammar? Why is its elimination necessary, and how is it mathematically eliminated?

20

Differentiate between an ambiguous grammar and an inherently ambiguous language. Provide an example of an inherently ambiguous language.