Proving that Every Full Prefix-Free Language is Maximal

219 Views Asked by At

I'm practicing a problem where I need to prove that every full prefix-free language is maximal.

I know a prefix-free language A is maximal if it is not a proper subset of any prefix-free language, where a prefix-free language is full if,

$$\sum_{x\in A} 2^{-|x|} = 1$$

Furthermore, I know that a language A ⊆ {0, 1}* is prefix-free if no element of A is a prefix of any other element of A and that the Kraft inequality says that for every prefix-free language A,

$$\sum_{x\in A} 2^{-|x|} \leqslant 1$$

I'm pretty sure that a full prefix free language is maximal, since it belongs to the maximal prefix-free set. I don't know, however, how to formally prove this. Should I be doing induction with Kraft's Inequality and with what I know about the relationship between maximal and prefix-free sets?

Any help would be appreciated!

1

There are 1 best solutions below

0
On

Let $A$ be a full prefix code. Suppose that $A$ is not maximal. Then there is some word $u \notin A$ such that $B = A \cup \{u\}$ is a prefix code. It follows that $$ \sum_{x\in B} 2^{-|x|} \leqslant 1 $$ and hence $$ \sum_{x\in A} 2^{-|x|} < 1 $$ a contradiction. Thus $A$ is maximal.

N.B. The bible for this type of question is the book [1]

[1] J. Berstel, D. Perrin and C. Reutenauer, Codes and automata, Encyclopedia of Mathematics and its Applications, 129. Cambridge University Press, Cambridge, 2010. xiv+619 pp. ISBN: 978-0-521-88831-8