冯娟的第三次作业
参考书习题:
解:
ai=i 得到序列a1a1a3a2a3a1 的实值标签就是求序列113231的实值标签。
设上界 u(0) =1, 下界 l(0)=0,符号集A={a1,a2,a3},且P(a1)=0.2,P(a2)=0.3,P(a3)=0.5
由于P(x=i)=P(ai),所以P(x=1)=P(a1)=0.2, P(x=2)= P(a2)=0.3, P(x=3)=P(a3)=0.5.
Fx(0)=0,
Fx(1)=P(a0)+ P(a1)=0.2,
Fx(2)=P(a1)+ P(a2)=0.5,
Fx(3)=P(a1)+ P(a2)+P(a3)=1
又由于u(k)=l(k-1)+(u(k-1)-l(k-1))*Fx(xk)
l(k)=l(k-1)+(u(k-1)-l(k-1))*Fx(xk-1)
根据上面的递推公式得到的结果如下:
该序列的第一个元素为1
u(1)=l(0)+(u(0)-l(0))*Fx(1)=0+(1-0)*0.2=0.2
l(1)=l(0)+(u(0)-l(0))*Fx(0)=0+(1-0)*0=0
所以该标签的区间[0,0.2)
该序列的第二个元素为1
u(2)=l(1)+(u(1)-l(1))*Fx(1)=0+(0.2-0)*0.2=0.04
l(2)=l(1)+(u(1)-l(1))*Fx(0)=0+(0.2-0)*0=0
所以序列1 1标签的区间[0,0.04)
该序列的第三个元素为3
u(3)=l(2)+(u(2)-l(2))*Fx(3)=0+(0.04-0)*1 =0.04
l(3)=l(2)+(u(2)-l(2))*Fx(2)=0+(0.04-0)*0.5=0.02
所以该序列标签的区间[0.02,0.04)
该序列的第四个元素为2
u(4)=l(3)+(u(3)-l(3))*Fx(2)=0.02+(0.04-0.02)*0.5 =0.03
l(4)=l(3)+(u(3)-l(3))*Fx(1)=0.02+(0.04-0.02)*0.2=0.024
所以序列2 3标签的区间[0.024,0.03)
该序列的第五个元素为3
u(5)=l(4)+(u(4)-l(4))*Fx(3)=0.024+(0.03-0.024)*1=0.03
l(5)=l(4)+(u(4)-l(4))*Fx(2)=0.024+(0.03-0.024)*0.5=0.027
所以该序列标签的区间[0.027,0.03)
该序列的第六个元素为1
u(6)=l(5)+(u(5)-l(5))*Fx(1)=0.027+(0.03-0.027)*0.2=0.0276
l(6)=l(5)+(u(5)-l(5))*Fx(0)=0.027+(0.03-0.027)*0=0.027
所以该序列标签的区间[0.027,0.0276)
综上可得序列a1a1a3a2a3a1 的实值标签为:
Tx(113231)= ( u(6) + l(6) )/2
=(0.0276+0.027)/2
=0.0273
6、对于表4-9所示的概率模型,对于一个标签为0.63215699的长度为10的序列进行解码。
解:
FX(k)=0,k<=0,FX(1)=P(a1)=0.2,FX(2)=P(a1)+P(a2)=0.2+0.3=0.5,
FX(3)=P(a1)+P(a2)+P(a3)=0.2+0.3+0.5=1,FX(k)=1,k>3,
确定标签的上下界,将l(0)初始化为0,u(0)初始化为1,
u(1)=l(0)+(u(0)-l(0))*FX(X1)=0+(1-0)* FX(X1)= FX(X1)
l(1)=l(0)+(u(0)-l(0))*FX(X1-1)=0+(1-0)* FX(X1-1)= FX(X1-1)
若X1=1,FX(X1)=0.2,FX(X1-1)=0,则该标签所在区间为[0,0.2);
若X1=2,FX(X1)=0.5,FX(X1-1)=0.2,则该标签所在区间为[0.2,0.5);
若X1=3,FX(X1)=1,FX(X1-1)=0.5,则该标签所在区间为[0.5,1)。
因为0.63215699在区间[0.5,1)中,所以X1=3,l(1)=0..5,u(1)=1,该序列的第一个元素为a3
u(2)=l(1)+(u(1)-l(1))*FX(X2)=0.5+(1-0.5)* FX(X2)=0.5+0.5 * FX(X2)
l(2)=l(1)+(u(1)-l(1))*FX(X2-1)=0.5+(1-0.5)* FX(X2-1)=0.5+0.5* FX(X2-1)
若X2=1,FX(X2)=0.2,FX(X2-1)=0,则该标签所在区间为[0.5,0.6);
若X2=2,FX(X2)=0.5,FX(X2-1)=0.2,则该标签所在区间为[0.6,0.75);
若X2=3,FX(X2)=1,FX(X2-1)=0.5,则该标签所在区间为[0.75,1);
因为0.63215699在区间[0.6,0.75)中,所以X1=2,l(2)=0.6,u(2)=0.75,该序列的第二个元素为a2
u(3)=l(2)+(u(2)-l(2))*FX(X3)=0.6+(0.75-0.6)* FX(X3)=0.6+0.15 * FX(X3)
l(3)=l(2)+(u(2)-l(2))*FX(X3-1)=0.6+(0.75-0.6)* FX(X3-1)=0.6+0.15 * FX(X3-1)
若X3=1,FX(X3)=0.2,FX(X3-1)=0,则该标签所在区间为[0.6,0.63);
若X3=2,FX(X3)=0.5,FX(X3-1)=0.2,则该标签所在区间为[0.63,0.675);
若X3=3,FX(X3)=1,FX(X3-1)=0.5,则该标签所在区间为[0.675,0.75);
因为0.63215699在区间[0.675,0.75)中,所以X3=2,l(3)=0.63,u(3)=0.675,该序列的第三个元素为a2
u(4)=l(3)+(u(3)-l(3))*FX(X4)=0.63+(0.675-0.63)* FX(X4)=0.63+0.045 * FX(X4)
l(4)=l(3)+(u(3)-l(3))*FX(X4-1)=0.63+(0.675-0.63)* FX(X4-1)=0.63+0.045 * FX(X4-1)
若X4=1,FX(X4)=0.2,FX(X4-1)=0,则该标签所在区间为[0.63,0.639);
若X4=2,FX(X4)=0.5,FX(X4-1)=0.2,则该标签所在区间为[0.639,0.6525);
若X4=3,FX(X4)=1,FX(X4-1)=0.5,则该标签所在区间为[0.6525,0.675);
因为0.63215699在区间[0.63,0.639)中,所以X4=1,l(4)=0.63,u(4)=0.639,该序列的第四个元素为a1
u(5)=l(4)+(u(4)-l(4))*FX(X5)=0.63+(0.639-0.63)* FX(X5)=0.63+0.009 * FX(X5)
l(5)=l(4)+(u(4)-l(4))*FX(X5-1)=0.63+(0.639-0.63)* FX(X5-1)=0.63+0.009 * FX(X5-1)
若X5=1,FX(X5)=0.2,FX(X5-1)=0,则该标签所在区间为[0.63,0.6318);
若X5=2,FX(X5)=0.5,FX(X5-1)=0.2,则该标签所在区间为[0.6318,0.6345);
若X5=3,FX(X5)=1,FX(X5-1)=0.5,则该标签所在区间为[0.6345,0.639);
因为0.63215699在区间[0.6318,0.6345)中,所以X5=2,l (5)=0.6318,u(5)=0.6345,该序列的第五个元素为a2
u(6)=l(5)+(u(5)-l(5))*FX(X6)=0.6318+(0.6345-0.6318)* FX(X6)=0.6318+0.0027 * FX(X6)
l(6)=l(5)+(u(5)-l(5))*FX(X6-1)=0.6318+(0.6345-0.6318)* FX(X6-1)=0.6318+0.0027 * FX(X6-1)
若X6=1,FX(X6)=0.2,FX(X6-1)=0,则该标签所在区间为[0.6318,0.63234);
若X6=2,FX(X6)=0.5,FX(X6-1)=0.2,则该标签所在区间为[0.63234,0.63315);
若X6=3,FX(X6)=1,FX(X6-1)=0.5,则该标签所在区间为[0.63315,0.6345);
因为0.63215699在区间[0.6318,0.63234)中,所以X6=1,l (6)=0.6318,u(6)=0.63234,该序列的第六个元素为a1
u(7)=l(6)+(u(6)-l(6))*FX(X7)=0.6318+(0.63234-0.6318)* FX(X7)=0.6318+0.00054 * FX(X7)
l(7)=l(6)+(u(6)-l(6))*FX(X7-1)=0.6318+(0.63234-0.6318)* FX(X7-1)=0.6318+0.00054 * FX(X7-1)
若X7=1,FX(X7)=0.2,FX(X7-1)=0,则该标签所在区间为[0.6318,0.631908);
若X7=2,FX(X7)=0.5,FX(X7-1)=0.2,则该标签所在区间为[0.631908,0.63207);
若X7=3,FX(X7)=1,FX(X7-1)=0.5,则该标签所在区间为[0.63207,0.63234);
因为0.63215699在区间[0.63207,0.63234)中,所以X7=3,l (7)=0.63207,u(7)=0.63234,该序列的第七个元素为a3
u(8)=l(7)+(u(7)-l(7))*FX(X8)=0.63207+(0.63234-0.63207)* FX(X8)=0.63207+0.00027 * FX(X8)
l(8)=l(7)+(u(7)-l(7))*FX(X8-1)=0.63207+(0.63234-0.63207)* FX(X8-1)=0.63207+0.00027 * FX(X8-1)
若X8=1,FX(X8)=0.2,FX(X8-1)=0,则该标签所在区间为[0.63207,0.632124);
若X8=2,FX(X8)=0.5,FX(X8-1)=0.2,则该标签所在区间为[0.632124,0.632205);
若X8=3,FX(X8)=1,FX(X8-1)=0.5,则该标签所在区间为[0.632205,0.63234);
因为0.63215699在区间[0.632124,0.632205)中,所以X8=3,l (8)=0.632124,u(8)=0.632205,该序列的第八个元素为a3
u(9)=l(8)+(u(8)-l(8))*FX(X9)=0.632124+(0.632205-0.632124)* FX(X9)=0.632124+0.000081 * FX(X9)
l(9)=l(8)+(u(8)-l(8))*FX(X9-1)=0.632124+(0.632205-0.632124)* FX(X9-1)=0.632124+0.000081* FX(X9-1)
若X9=1,FX(X9)=0.2,FX(X9-1)=0,则该标签所在区间为[0.632124,0.6321402);
若X9=2,FX(X9)=0.5,FX(X9-1)=0.2,则该标签所在区间为[0.6321402,0.6321645);
若X9=3,FX(X9)=1,FX(X9-1)=0.5,则该标签所在区间为[0.6321645,0.632205);
因为0.63215699在区间[0.6321402,0.6321645)中,所以X9=2,l (9)=0.6321402,u(9)=0.6321645,该序列的第九个元素为a2
u(10)=l(9)+(u(9)-l(9))*FX(X10)=0.6321402+(0.6321645-0.6321402)* FX(X10)=0.6321402+0.0000243 * FX(X10)
l(10)=l(9)+(u(9)-l(9))*FX(X10-1)=0.6321402+(0.6321645-0.6321402)* FX(X10-1)=0.6321402+0.0000243 * FX(X10-1)
若X10=1,FX(X10)=0.2,FX(X10-1)=0,则该标签所在区间为[0.6321402, 0.63214506);
若X10=2,FX(X10)=0.5,FX(X10-1)=0.2,则该标签所在区间为[0.63214506, 0.63215235);
若X10=3,FX(X10)=1,FX(X10-1)=0.5,则该标签所在区间为[0.63215235,0.6321645);
因为0.63215699在区间[0.63215235,0.6321645)中,所以X10=3,l (10)=0.63215235,u(10)=0.6321645,该序列的第十个元素为:a3
所以该序列为a3a2a2a1a2a1a3a2a2a3