Question #38962

Which of the following is a regular language?
(A) L1 = Set of balanced parenthesis where alphabet sigma={(,)}
(B) L2 = Set of all unary strings |sigma| = 1 of lengths equal to Fibonacci numbers
greater than 5 (i.e. 8, 13, 21, . . . .)
(C) L3 = Kleene closure of the language in option (B)
(D) None of these

Expert's answer

Answer on Question #38962-Math-Math, Other

1) Let's prove that L1 is not regular. We can use pumping lemma. If L1 is regular, there exist such n that we can pump any balanced parenthesis longer than n. OK. Then we can do this n n

to this one: ( ) . Obviously, after pumping new parenthesis is unbalanced.

2) Let's prove that L2 is not regular. We can use pumping lemma again. There is no infinite sequence of Fibonacci numbers with constant difference between neighboring elements.

3) Let's prove that L3 is regular. Any Fibonacci number larger than 5 can be represented as 13x+8y13x + 8y. And any number from closure under addition of Fibonacci numbers larger than 5 can be too. Then we can use this prefix grammar:

Σ\Sigma: {a}.

S: {ε}\{\varepsilon\}.

P:

εaaaaaaaa\varepsilon \rightarrow aaaaaaaa;

εaaaaaaaaaaaa\varepsilon \rightarrow aaaaaaaaaaaa.

Proved!

Answer: C.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS