Design a two-stage split-VQ. Choose $L=16$ and $n=100$. Implement the first-stage as a 4-dimensional VQ and the second-stage as two 2dimensional VQs. Select the distortion thresholds as follows: for the first stage, $\varepsilon_1=0.001$, and for the second stage, $\varepsilon_2=0.00001$. Compare the coding accuracy in terms of a distance measure and the coding gain in terms of the number of bits/sample of the split-VQ with respect to the simple VQ in problem 3.9 and the multi-step VQ in problem 3.10. (See Figure 3.14). a data set $V=\left[\begin{array}{lll}0 & 1 & 2\end{array}\right]$ :
a. Write a program to compute the entropy, $H_e(X)$.
b. Compute the symbol probabilities $p_i, i \in V$ for the input data stream, $X$.
c. Write a program to encode $X$ using Huffman codes. Employ an appropriate Huffman bit-mapping. Give the length of the output bitstream.
d. Use arithmetic coding to encode the input data stream, $X$. Give the final codeword interval range in the binary form. Give also the length of the output bitstream. (See Example 3.9.)