All Exams Test series for 1 year @ ₹349 only
Question

Match the LIST-I with LIST-II
LIST-I GrammarLIST-II All productions are of the form
A. Regular GrammarI. $A \to aX$, where $a \in T$ and $X \in V^*$
B. Unrestricted GrammarII. $A \to xB$, $A \to x$ or $A \to Bx$, $A \to x$ where $A, B \in V$ and $x \in T^*$
C. Chomsky Normal FormIII. $x \to y$, where $x \in (V \cup T)^+$ and $y \in (V \cup T)^*$
D. Greibach Normal FormIV. $A \to BC$ or $A \to a$, where A, B, C are in V and a is in T.

The correct answer is
A-II, B-III, C-IV, D-I

Analyzing Grammar Type Mappings

This question involves matching different types of grammars and normal forms (listed in LIST-I) with their corresponding production rule definitions (listed in LIST-II).

Understanding Production Rule Forms

  • A. Regular Grammar: These grammars, classified as Type-3, generate regular languages. Their productions typically follow right-linear (e.g., $A \to aB$ or $A \to a$) or left-linear forms (e.g., $A \to Ba$ or $A \to a$). Option II, which includes forms like $A \to xB$, $A \to x$, $A \to Bx$, and $A \to x$ (where $x \in T^*$), accurately represents these structures.
  • B. Unrestricted Grammar: These are the most general grammars (Type-0), also known as phrase structure grammars. Their production rules are defined as $x \to y$, where $x$ must contain at least one variable ($x \in (V \cup T)^+$) and $y$ can be any string of variables and terminals ($y \in (V \cup T)^*$). Option III perfectly matches this definition.
  • C. Chomsky Normal Form (CNF): This is a standardized format for context-free grammars. All productions must strictly adhere to one of two forms: $A \to BC$ (where a variable derives two variables) or $A \to a$ (where a variable derives a single terminal). Option IV describes this exact structure.
  • D. Greibach Normal Form (GNF): Another normalization form for context-free grammars. Productions in GNF must be of the form $A \to aX$, meaning a variable derives a terminal followed by zero or more variables ($X \in V^*$). Option I, $A \to aX$, where $a \in T$ and $X \in V^*$, correctly captures this rule.

Determining the Correct Match

By comparing the definitions with the provided options:

  • Regular Grammar corresponds to form II.
  • Unrestricted Grammar corresponds to form III.
  • Chomsky Normal Form corresponds to form IV.
  • Greibach Normal Form corresponds to form I.

This leads to the correct matching: A-II, B-III, C-IV, D-I.

Was this answer helpful?

Important Questions from Context Free Grammars - Teaching

  1. What is the space complexity of the CYK algorithm for the P table, where n is the number of words in the sentence and m is the number of non terminal symbols in the grammar?
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App