5.给定如表4-9所示的概率模型,求出序列a1a1a3a2a3a1的实值标签。
解: 依题得 p(a1)=0.2 ,p(a2)=0.3 ,p(a3)=0.5
映射出 a1=1,a2=2,a3=3
从概率模型可知 Fx(k)=0,k≤0,Fx(0)=0,Fx(1)=0.2,Fx(2)=0.5,Fx(3)=1,Fx(k)=1,k>3
设L(0)=0,u(0)=1
由公式,L(n)=L(n-1)+(U(n-1)-L(n-1))Fx(xn-1) 与 u(n)=L(n-1)+(U(n-1)-L(n-1))Fx(xn) 有
当n=1(a1)时:
l(1)=l(0)+(u(0)-l(0))*Fx(0)=0+(1-0)*0=0
u(1)=l(0)+(u(0)-l(0))*Fx(1)=0+(1-0)*0.2=0.2
当n=2(a1a1)时:
l(2)=l(1)+(u(1)-l(1))*Fx(0)=0+(0.2-0)*0=0
u(2)=l(1)+(u(1)-l(1))*Fx(1)=0+(0.2-0)*0.2=0.04
当n=3(a1a1a3)是=时:
l(3)=l(2)+(u(2)-l(2))*Fx(2)=0+(0.04-0)*0.5=0.02
u(3)=l(2)+(u(2)-l(2))*Fx(3)=0+(0.04-0)*1 =0.04
当n=4(a1a1a3a2)时:
l(4)=l(3)+(u(3)-l(3))*Fx(1)=0.02+(0.04-0.02)*0.2=0.024
u(4)=l(3)+(u(3)-l(3))*Fx(2)=0.02+(0.04-0.02)*0.5 =0.03
当n=5(a1a1a3a2a3)时:
l(5)=l(4)+(u(4)-l(4))*Fx(2)=0.024+(0.03-0.024)*0.5=0.027
u(5)=l(4)+(u(4)-l(4))*Fx(3)=0.024+(0.03-0.024)*1=0.03当n=6(a1a1a3a2a3a1)时:
l(6)=l(5)+(u(5)-l(5))*Fx(0)=0.027+(0.03-0.027)*0=0.027
u(6)=l(5)+(u(5)-l(5))*Fx(1)=0.027+(0.03-0.027)*0.2=0.0276所以,序列a1a1a3a2a3a1的实值标签为:Tx(a1a1a3a2a3a1)=(0.027+0.0276)/2=0.0273
6.对于表4-9给出的概率模型,对于一个标签为0.63215699的长度为10的序列进行解码。
解:
由上题有 F(x1)=0.2,F(x2)=0.5,F(x3)=1.
先设u(0)=1,l(0)=0,则有
①解出序列的的第一个元素x1之后的上下限为:
l(1)=0+(1-0)Fx(x1-1)=Fx(x1-1)
u (1)=0+(1-0)Fx(x1)=Fx(x1)
如果取x1=1,则该区间为[0,0.2)
如果取x1=2,则该区间为[0.2,0.5)
如果取x1=3,则该区间为[0.5,1)
因为0.63215699落入区间[0.5,1]中,所以该序列的第一个元素为a3
②同上求出序列的的第二个元素x2的上下限为:
l(2)=0.5+(1-0.5)Fx(x2-1)=0.5+0.5Fx(x2-1)
u (2)=0.5+(1-0.5)Fx(x2)=0.5+0.5Fx(x2)
如果取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的上下限为:
l(3)=0.6+(0.75-0.6)Fx(x3-1)=0.6+0.15Fx(x3-1)
u (3)=0.6+(0.75-0.6)Fx(x3)=0.6+0.15Fx(x3)
如果取x3=1,则该区间为[0.6,0.63)
如果取x3=2,则该区间为[0.63,0.675)
如果取x3=3,则该区间为[0.675,0.75)
因为0.63215699落入区间[0.63,0.675]中,所以该序列的第三个元素为a2.
④同上求出序列的的第四个元素x4的上下限为:
l(4)=0.63+(0.675-0.63)Fx(x4-1)=0.63+0.045Fx(x4-1)
u (4)=0.63+(0.675-0.63)Fx(x4)=0.63+0.045Fx(x4)
如果取x4=1,则该区间为[0.63,0.639]
如果取x4=2,则该区间为[0.639,0.6525]
如果取x4=3,则该区间为[0.6525,0.675]
因为0.63215699在落入[0.63,0.639]中,所以该序列的第四个元素为a1.
⑤同上求出序列的的第五个元素x5的上下限为:
l(5)=0.63+(0.639-0.63)Fx(x5-1)=0.63+0.009Fx(x5-1)
u (5)=0.63+(0.639-0.63)Fx(x5)=0.63+0.009Fx(x5)
如果取x5=1,则该区间为[0.63,0.6318]
如果取x5=2,则该区间为[0.6318,0.6345]
如果取x5=3,则该区间为[0.6345,0.639]
因为0.63215699落入区间[0.6318,0.6345]中,所以该序列的第五个元素为a2.
⑥同上求出序列的的第六个元素x6的上下限为:
l(6)=0.6318+(0.6345-0.6318)Fx(x6-1)=0.6318+0.0027Fx(x6-1)
u (6)=0.6318+(0.6345-0.6318)Fx(x6)=0.6318+0.0027Fx(x6)
如果取x6=1,则该区间为[0.6318,0.63234]
如果取x6=2,则该区间为[0.63234,0.63315]
如果取x6=3,则该区间为[0.63315,0.6345]
因为0.63215699落入区间[0.6318,0.63234]中,所以该序列的第六个元素为a1.
⑦同上求出序列的的第七个元素x7的上下限为:
l(7)=0.6318+(0.63234-0.6318)Fx(x7-1)=0.6318+0.00054Fx(x7-1)
u (7)=0.6318+(0.63234-0.6318)Fx(x7)=0.6318+0.00054Fx(x7)
如果取x7=1,则该区间为[0.6318,0.631908]
如果取x7=2,则该区间为[0.631908,0.63207]
如果取x7=3,则该区间为[0.63207,0.63234]
因为0.63215699落入区间[0.63207,0.63234]中,所以该序列的第七个元素为a3.
⑧同上求出序列的的第八个元素x8的上下限为:
l(8)=0.63207+(0.63234-0.63207)Fx(x8-1)=0.63207+0.00027Fx(x8-1)
u (8)=0.63207+(0.63234-0.63207)Fx(x8)=0.63207+0.00027Fx(x8)
如果取x8=1,则该区间为[0.63207,0.632124]
如果取x8=2,则该区间为[0.632124,0.632205]
如果取x8=3,则该区间为[0.632205,0.63234]
因为0.63215699落入区间[0.632124,0.632205]中,所以该序列的第八个元素为a2.
⑨同上求出序列的的第九个元素x9的上下限为:
l(9)=0.632124+(0.632205-0.632124)Fx(x9-1)=0.632124+0.000081Fx(x9-1)
u (9)=0.632124+(0.632205-0.632124)Fx(x9)=0.632124+0.000081Fx(x9)
如果取x9=1,则该区间为[0.632124,0.6321402]
如果取x9=2,则该区间为[0.0.6321402,0.6321645]
如果取x9=3,则该区间为[0.6321645,0.63234]
因为0.63215699落入区间[0.0.6321402,0.6321645]中,所以该序列的第九个元素为a2.
⑩同上求出序列的的第十个元素x10的上下限为:
l(10)=0.0.6321402+(0.6321645-0.0.6321402)Fx(x10-1)=0.0.6321402+0.0000243Fx(x10-1)
u (10)=0.0.6321402+(0.6321645-0.0.6321402)Fx(x10)=0.0.6321402+0.0000243Fx(x10)
如果取x10=1,则该区间为[0.6321402,0.63212886]
如果取x10=2,则该区间为[0.63212886,0.63215325]
如果取x10=3,则该区间为[0.63215325,0.6321645]
因为0.63215699落入区间[0.63215325,0.6321645]中,所以该序列的第十个元素为a3.
所以,得到所求序列为a3a2a2a1a2a1a3a2a2a3。