...
Question 13006 – Data-Structures
December 6, 2023
Question 1585 – Nielit Scientist-B IT 22-07-2017
December 6, 2023
Question 13006 – Data-Structures
December 6, 2023
Question 1585 – Nielit Scientist-B IT 22-07-2017
December 6, 2023

Question 8119 – Regular-Language

Language L1 is defined by the grammar: S1 → aS1b|ε
Language L2 is defined by the grammar: S2 → abS2
Consider the following statements:
P: L1is regular
Q: L2is regular
Which one of the following is TRUE?

Correct Answer: C

Question 15 Explanation: 
The language L1 generated by the grammar contains equal number of a’s and b’s, but b’s comes after a’s.
So, in order to compare equality between a’s and b’s memory (stack) is required.
Hence, L1 is not regular.
Moreover, L1 = {an bn | n ≥ 0} which is DCFL.
The language L2 generated by grammar contains repetition of “ab” i.e. L2 = (ab)* which is clearly a regular language.
A
Both P and Q are true
B
P is true and Q is false
C
P is false and Q is true
D
Both P and Q are false
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!