Induction over formal language

132 Views Asked by At

$A = \{a,b\}. L \subseteq A ^*.$

Let $A(L)$ be $(\{a\} \cdot L)^* \cap A^+ =L$

a) Show:$ A(L)$ is true for $L= \{\}$

b) If $A(L)$ is true then $\epsilon \not\in L$

c) Show by induction over $n \in \mathbb{N_0}$: If $A(L)$ is true then for every $n \in \mathbb{N_0}: \forall w \in L: |w| \geq n.$

d) Explain why from the statements a) - c) the following statement is true: $A(L)$ is true if and only if $L = \{\}$.

Now I got stuck on c).

a) $A(\{\})=({a} \cdot \{\})^* \cap A^+ = \{\} \cap A^+ = \{\} = L$

b)From a) we know that $A(L)$ is true for $\{\}$. So now let $M = \{\} \cup \{\epsilon\}$.

$A(M) = A(\{\epsilon\})= (\{a\} \cdot \{\epsilon\})^*\cap A^+ = \{a\}^+ \neq \{\epsilon\} \Rightarrow$ For $\epsilon \in M, A(L)$ is not true.

c) $\forall n \in \mathbb{N_0}: \forall w \in L: |w| \geq n$

Base case: $n=0: |w| \geq 0$

Inductive hypothesis (IH): When $A(L)$ is true $|w| \geq n$ for some $n \in \mathbb{N_0}$

Inductive step:

$n \rightarrow n+1,$ so we have to show $|w| \geq n+1$

$|w| \geq 0 \Rightarrow^{IH} |w| \geq n \geq 0$

How do I get to $n+1$? I tried thinking about $|w| \geq n+1 \Leftrightarrow |w| -n \geq 1 \Leftrightarrow |w|-1 \geq n$, since this is where I have to get to. But I still couldn't come up with anything useful.

1

There are 1 best solutions below

0
On BEST ANSWER

Recall that $L^* := \bigcup_{n \in \mathbb N_0} L^n$ and $L^+ := \bigcup_{n \in \mathbb N_+} L^n$.

Therefore $L^* = L^0 \cup L^+ = \{\varepsilon\} \cup L^+$ and $L^+ = L \cdot L^*$. In other words, a word from $L^*$ is either empty or in $L^+$. A word from $L^+$ can be split into a word from $L$ and a word from $L^*$.


Induction hypothesis: Assume $A(L)$ and for some $n \in \mathbb N$, $\forall w \in L$: $|w| \geq n$.

Induction step: Assume $A(L)$, consider any $w \in L$. You have to show $|w| \geq n+1$.

From $A(L)$ you know $w \in L = (\{a\} \cdot L)^* \cap A^+$. Therefore:

  1. $w \in A^+$, therefore $w \neq \varepsilon$.

  2. $w \in (\{a\} \cdot L)^*$.

By definition of $^*$, you have $(\{a \} \cdot L)^* = \{\varepsilon\} \cup (\{a\}\cdot L)^+$. Then 1 and 2 give you $w \in (\{a\} \cdot L)^+$.

Intuitively, at this point you can see that $w$ has to start with an $a$ followed by some infix from $L$. From the IH, you know the infix is of size $\geq n$, thus making $|w| \geq 1+ n$.

Formalizing the intuition:

By definition of $^+$, you can unpack $(\{a\} \cdot L)^+ = (\{a\} \cdot L) \cdot (\{a\} \cdot L)^*$.

Therefore you know $w = axy$ for some $x \in L$ and $y \in (\{a\} \cdot L)^*$. By IH, you have $|x| \geq n$, therefore $|w| = 1 + |x| + |y| \geq 1+n$.