Simple optimum compression of a Markov source. Consider the four-state Markov process U1, U2, ... having transition matrix
Un-1Un S1 S2 S3 S4
S1 7/20 1/4 1/5 1/5
S2 1/3 1/3 1/3 0
S3 1/2 1/16 1/16 3/8
S4 1/4 1/4 1/4 1/4
Thus, the probability that S4 follows S2 is equal to zero. Design four codes C1, C2, C3, C4 (one for each state 1, 2, 3, and 4, each code mapping elements of the set of Si's into sequences of 0's and 1's, such that this Markov process can be sent with maximal compression by the following scheme:
(a) Note the present symbol Xn = i.
(b) Select code Ci.
(c) Note the next symbol Xn+1 = j and send the codeword in Ci corresponding to j.
(d) Repeat for the next symbol. What is the average message length of the next symbol conditioned on the previous state Xn = i using this coding scheme? What is the unconditional average number of bits per source symbol? Relate this to the entropy rate H(U) of the Markov chain.