Reference book "Introduction to Data Compression (4th edition)" Page 100 5, 6
5, given the probability model as shown in table 4-9, the real value label of the sequence A1A1A3A2A3A1 is obtained.
By the probability model, the mapping a1<=>1,a2<=>2,a3<=>3
FX (k) =0, K≤0, FX (1) =0.2, FX (2) =0.5, FX (3) =1, k>3.
Nether: L (0) = 0, upper bound: U (0) =1
The 1th element of the sequence is A1:
L (1) = 0+ (1-0) Fx (0) =0
U (1) =0+ (1-0) Fx (1) =0.2
The 2nd element of a sequence is A1
L (2) = 0+ (0.2-0) Fx (0) =0
U (2) =0+ (0.2-0) Fx (1) =0.04
The 3rd element of a sequence is A3
L (3) = 0+ (0.04-0) Fx (2) =0.02
U (3) =0+ (0.04-0) Fx (3) =0.04
The 4th element of a sequence is A2
L (4) = 0.02+ (0.04-0.02) Fx (1) =0.024
U (4) =0.02+ (0.04-0.02) Fx (2) =0.03
The 5th element of a sequence is A3
L (5) = 0.024+ (0.03-0.024) Fx (2) =0.027
U (5) =0.024+ (0.03-0.024) Fx (3) =0.03
The 6th element of a sequence is A1
L (6) = 0.027+ (0.03-0.027) Fx (0) =0.027
U (6) =0.027+ (0.03-0.027) Fx (1) =0.0276
The range of the label for the sequence A1A1A3A2A3A1 is [0.027,0.0276]
The tags that can generate sequence a1a1a3a2a3a1 are as follows:
Tx (A1A1A3A2A3A1) = L (6) +u (6)/2
 = (0.027+0.0276)/2
=0.0273
6, for the probability model shown in table 4-9, for a label 0.63215699 of the length of a sequence of 10 decoding.
By the probability model, the mapping a1<=>1,a2<=>2,a3<=>3
FX (k) =0, K≤0, FX (1) =0.2, FX (2) =0.5, FX (3) =1, k>3.
Nether: L (0) = 0, upper bound: U (0) =1
L (k) = L (k-1) + (U (k-1)-L (k-1)) Fx (xk-1)
U (k) =l (k-1) + (U (k-1)-L (k-1)) Fx (XK)
t*= (0.63215699-0)/(1-0) =0.63215699
FX (0) =0<=t*<=1= FX (3)
Third time job