I have to proof that in a word $w$ the number of the letter d is always even.
Let $L \subsetneq \Sigma^*$ be a language over the alphabet $\Sigma = \{a,b,c,d\}$ such that a word $w$ is in $L$ if and only if it is $a$ or $b$ or of the form $w = ducvd$ where $u$ and $v$ are word of $L$.
Examples:
$dacad$, $ddacbdcad$, $dddbcbdcdbcbddcad$
base:
- $|w| = 0$ and $w = \epsilon$ the number of the letter d is zero and even
- $|w| = 1$ and $w = a$ or $w = b$ same as number 1
Hypothesis:
$w$ has even number of d
Step:
I don't know how to make an induction with $w = ducvd$. Does somebody have a hint?
The induction step has to use the rule for buiding new words from old ones.
Indcution hypotheses : $u$ and $v$ are words with an even number of $d$ : $d_u$ and $d_v$ respectively.
The new word $w=ducvd$ will have $d_w=d_u+d_v+2$ number of $d$.
From the assumption that $d_u=2k$ and $d_v=2l$ we get that :