Operating-Systems
November 28, 2023Question 10452 – Context-Free-Grammar
November 28, 2023Theory-of-Computation
|
Question 3
|
Consider the context-free grammar G below
S → aSb | X
X → aX | Xb | a | b ,
where S and X are non-terminals, and a and b are terminal symbols. The starting non-terminal is S. Which one of the following statements is CORRECT?
S → aSb | X
X → aX | Xb | a | b ,
where S and X are non-terminals, and a and b are terminal symbols. The starting non-terminal is S. Which one of the following statements is CORRECT?
|
The language generated by G is (a + b)*
|
|
|
The language generated by G is a*(a + b)b*
|
|
|
The language generated by G is a*b*(a + b)
|
|
|
The language generated by G is not a regular language
|
Correct Answer: B
