5.给定如表4-9所示的概率模型,求出序列a1a1a3a2a3a1 的实值标签。
答:由题可知,p(a1)=0.2, p(a2)=0.3, p(a3)=0.5
因为x(ai)=i, 所以有:x(a1)=1, x(a2)=2, x(a3)=3
Fx(0)=0 , Fx(1)=0.2 , Fx(2)=0.5 , Fx(3)=1.0
第一次出现a1:
L(0)=0 , U(0)=1
L(1)=L(1-1)+(U(1-1)-L(1-1))·Fx(x1-1)=0
U(1)=L(1-1)+(U(1-1)-L(1-1))·Fx(X1)=0.2
第二次出现a1:
L(1)=0 , U(1)=0.2
L(2)=L(2-1)+(U(2-1)-L(2-1))·Fx(x1-1)
=0+(0.2-0)·0
=0
U(2)=L(2-1)+(U(2-1)-L(2-1))·Fx(X1)
=0+(0.2-0)·0.2
=0.04
第三次出现a3:
L(2)=0 , U(2)=0.04
L(3)=L(3-1)+(U(3-1)-L(3-1))·Fx(x3-1)
=0+(0.04-0)·0.5
=0.02
U(3)=L(3-1)+(U(3-1)-L(3-1))·Fx(X3)
=0+(0.04-0)·1
=0.04
第四次出现a2:
L(3)=0.02 , U(3)=0.04
L(4)=L(4-1)+(U(4-1)-L(4-1))·Fx(x2-1)
=0.02+(0.04-0.02)·0.2
=0.024
U(4)=L(4-1)+(U(4-1)-L(4-1))·Fx(X2)
=0.02+(0.04-0.02)·0.5
=0.03
第五次出现a3:
L(4)=0.024 , U(4)=0.03
L(5)=L(5-1)+(U(5-1)-L(5-1))·Fx(x3-1)
=0.024+(0.03-0.024)·0.5
=0.027
U(5)=L(5-1)+(U(5-1)-L(5-1))·Fx(X3)
=0.024+(0.03-0.024)·1
=0.03
第六次出现a1:
L(5)=0.027 , U(5)=0.03
L(6)=L(6-1)+(U(6-1)-L(6-1))·Fx(x1-1)
=0.027+(0.03-0.027)·0
=0.027
U(6)=L(6-1)+(U(6-1)-L(6-1))·Fx(X1)
=0.027+(0.03-0.027)·0.2
=0.0276
L(6)=0.027 , U(6)=0.0276
T(113231)=(L(6)+ U(6))/2=0.0273
6、对于表4-9所示的概率模型,对于一个标签为0.63215699的长度为10的序列进行解码
由概率模型可知,映射a1<=>1,a2<=>2,a3<=>3
Fx(k)=0, k≤0, Fx(1)=0.2, Fx(2)=0.5, Fx(3)=1, k>3.
下界: l(0)=0,上界: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)
l(1)= l(0)+(u(0)- l(0))Fx(xk-1)
u(1)=l(0)+(u(0)-l(0)) Fx(xk)
如果当x1=1,则该区间为[0,0.2)、x1=2,则该区间为[0.2,0.5)、x1=3,则该区间为[0.5,1)
0.63215699在该区间[0.5,1)内 所以 第一个序列为 a3
l(2)= l(1)+(u(1)- l(1))Fx(xk-1)
u(2)=l(1)+(u(1)-l(1)) Fx(xk)
如果当x2=1,则该区间为[0.5,0.6)、x2=2,则该区间为[0.6,0.75)、x2=3,则该区间为[0.75,1)
0.63215699在该区间[0.6,0.75)内 所以 第二个序列为 a2
以此类推
当x3=2时,区间为[0.63,0.675)
0.63215699在该区间内
当x4=1时,区间为[0.63,0.639)
0.63215699在该区间内
当x5=2时,区间为[0.6318,0.6345)
0.63215699在该区间内
当x6=1时,区间为[0.6318,0.63234)
0.63215699在该区间内
当x7=3时,区间为[0.63207,0.63234)
0.63215699在该区间内
当x8=2时,区间为[0.632124,0.632205)
0.63215699在该区间内
当x9=2时,区间为[0.6321402,0.6321645)
0.63215699在该区间内
当x10=3时,区间为[0.63215235,0.6321645)
0.63215699在该区间内
故标签为0.63215699的长度为10的序列a3a2a2a1a2a1a3a2a2a3