## Related questions with answers

Let $L$ be the set of all strings, including the null string, that can be constructed by repeated application of the following rules: If $\alpha\in L$, then $a\alpha b\in L$ and $b\alpha a\in L$. If $\alpha\in L$ and $\beta\in L$, then $\alpha\beta\in L$.

Prove that if $\alpha$ has equal number of $a$'s and $b$'s, then $\alpha\in L$.

Solution

VerifiedGiven:

$L$=set of all strings including null string that can be constructed as follows:

$\bullet$ If $\alpha \in L$, then $a\alpha b\in L$ and $b\alpha a\in L$ (1)

$\bullet$ If $\alpha \in L$ and $\beta \in L$, then $\alpha \beta\in L$ (2)

To proof: If $\alpha$ has an equal number of $a$'s and $b$'s, then $\alpha\in L$.

$\textbf{PROOF BY STRONG INDUCTION}$

Let $P(n)$ be the statement "If $\alpha$ has an equal number of $a$'s and $b$'s and of length $2n$, then $\alpha\in L$".

$\textbf{Basis step}$ $n=0$

$\lambda$ is the only string of length 0.

$\lambda$ has an equal number of $a$'s and $b$'s (as it contains 0 $a$'s and 0 $b$'s).

However, $\lambda\in L$ by definition of $L$ and thus $P(0)$ is true.

$\textbf{Inductive step}$ Let $P(0),P(1),...,P(k)$ be true.

$\text{If $\alpha$ has an equal number of $a$'s and $b$'s and of length $2i$, then $\alpha\in L$}$

$\text{ for }i=0,1,...,k$

## Create a free account to view solutions

## Create a free account to view solutions

## Recommended textbook solutions

#### Discrete Mathematics and Its Applications

7th Edition•ISBN: 9780073383095 (8 more)Kenneth Rosen#### Discrete Mathematics and Its Applications

8th Edition•ISBN: 9781259676512 (3 more)Kenneth Rosen## More related questions

1/4

1/7