Proof prefix fact

139 Views Asked by At

Let $\Sigma$ be the set of letters from the alphabet, so $\Sigma = \{a,b,c,d,...\}$. The set of prefixes of a word $w \in \Sigma^*$ is: $$pre(w):=\{u \in \Sigma^* | \exists v \in \Sigma^* : uv = w\}$$

Example: $$pre(aab)=\{\Lambda, a, aa, aab\}$$

Prove that

For all $x,y \in \Sigma^*, pre(xy)=pre(x)\cup\{x\}pre(y)$

by showing that

$pre(xy) \subseteq pre(x)\cup \{x\}pre(y)$

$pre(x)\cup \{x\}pre(y) \subseteq pre(xy) $


Concatenation of two languages (Read: sets of words) is defined as follows: enter image description here

1

There are 1 best solutions below

0
On

Let $|u|$ denote the length of a word $u$.

Hint. Let $p$ be a prefix of $xy$. If $|p| \leqslant |x|$, then $p$ is a prefix of $x$. If $|p| \geqslant |x|$, then $x$ is prefix of $p$ and hence $p = xp'$ where $p'$ is a prefix of $y$.