MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The context free grammar which generates a Regular Language is termed as:
A
Context Regular Grammar
B
Regular Grammar
C
Context Sensitive Grammar
D
None of the mentioned
Explanation: 

Detailed explanation-1: -Explanation: Regular grammar is a subset of Context free grammar. The CFGs which produces a language for which a finite automaton can be created is called Regular grammar.

Detailed explanation-2: -Every regular grammar is context-free, but not all context-free grammars are regular. The following context-free grammar, for example, is also regular. This grammar is regular: no rule has more than one nonterminal in its right-hand side, and each of these nonterminals is at the same end of the right-hand side.

Detailed explanation-3: -Any language that can be generated using regular expressions can be generated by a context-free grammar, but not all context-free languages are regular languages. We also know that regular expressions and languages can be generated by finite state machines (one simple computational model).

Detailed explanation-4: -A context-free grammar is a set of recursive rules used to generate patterns of strings. A context-free grammar can describe all regular languages and more, but they cannot describe all possible languages. Context-free grammars are studied in fields of theoretical computer science, compiler design, and linguistics.

Detailed explanation-5: -Regular grammars (rgs) are cfgs that generate regular languages. A regular grammar is a cfg where productions are restricted to two forms, either A → a or A → aB, where A, B ∈ NT and a ∈ T.

There is 1 question to complete.