Prove regular expression with induction

410 Views Asked by At

I need help proving the following regular expression via induction. I have the base case (easy of course) but I'm having a difficult time determining the inductive case.

A regular expression over the alphabet $\{a,b\}$ for the language of words containing an odd number of $a$’s is $b^*a(b^*ab^*a)^*b^*$.

Proof by induction:

Base case: Since $R^*=\lambda\cup R^1\cup R^2\cup\ldots\cup R^n$, the base case would be $R^0$, which would result in $b^*a\lambda b^*$. Note that there is only one $a$.

$\mathbf{N+1}$ case: ??

1

There are 1 best solutions below

0
On

HINT: Show by induction on $n$ that the strings matching $(b^*ab^*a)^n$ are precisely those strings that have $2n$ $a$s and end in $a$.