MCQ
Q.
Consider the following two statements.
S1: { 02n |n >= l} is a regu1ar language
S2: { 0m 0n 0(m+n) l m >= 1 and n >= 2} is a regu1ar languageWhich of the following is true?
Correct Answer: C
S1 can be written as (00)n where n >= 1. And S2 can be written as (00) (m+n) where m >=2 and n >= 1. S2 can be further reduced to (00)x where x >= 3. SO we can write regular grammars for both
G1 -> G100/00 (For S1)
G2 -> G200/000000 (For S2).