Variable Length Code

Definition (VLC)

Given a discrete source {Xi}i=1\{X_i\}^\infty_{i=1} with alphabet X\mathcal{X} and given a DD-ary code alphabet B={0,1,,D1}B=\{0,1,\cdots,D-1\}, D2D\ge2 fixed integer, a DD-ary nn-th order variable-length code (VLC) for the source is a map f:XnBf:\mathcal{X}^{n\to}B^*mapping source nn-tuples to DD-ary codewords of variable lengths, where B=\mboxsetofallfinitelengthstringsfromBcB     l1\mboxs.t.cBl\begin{align*} B^*=\mbox{set of all finite-length strings from }B\\ c\in B^{*}\iff\exists \ l\ge1\mbox{ s.t. }c\in B^l \end{align*}The codebook CC of the VLC is the set of all codewords C=f(Xn)={f(xn)B:xnXn}\mathcal{C}=f(\mathcal{X}^n)=\{f(x^n)\in B^*:x^n\in\mathcal{X}^n\}

Linked from