0
$\begingroup$

A language $L$ is defined recursively according to the following rules:

  • $λ ∈ L$
  • If $w ∈ L$, then $bw ∈ L$ and $waa ∈ L$

I am not sure if strings from this language should mix from this definition. Would strings only consist of $bbbb$ and $aaaa$, or can it also consist of $bbaa$, $aabb$, and so on?

$\endgroup$

1 Answer 1

1
$\begingroup$

The recursive definition implies that a word $w$ is in $L$ if there is a sequence $w_0,\ldots,w_n=w$ such that $w_0$ is the empty word and for each $i=1,\ldots,n$, either $w_i = bw_{i-1}$ or $w_i = w_{i-1}aa$. This, in turn, implies that $L = b^*(aa)^*$.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.