5.给定如表4-9所示的概率模型,求出序列a1a1a3a2a3a1的实值标签。
表4-9 习题5.习题6的概率模型
字母 |
概率 |
a1 |
0.2 |
a2 |
0.3 |
a3 |
0.5 |
解:由上表可知:Fx(k)=0, k≤0, Fx(1)=0.2, Fx(2)=0.5, Fx(3)=1, k>3 。
①a1:利用更新公式,得:
l(1) =0+(1-0)Fx(0)=0
u(1) =0+(1-0)Fx(1)=0.2
序列a1a1的标签所在的区间为[0,0.2)
②a1 :利用更新公式,得:
l(2) =0+(0.2-0)Fx(0)=0
u(2) =0+(0.2-0)Fx(1)=0.04
序列a1a1的标签所在的区间为[0,0.04)
③a3 :利用更新公式,得:
l(3) =0+(0.04-0)Fx(2)=0.02
u(3) =0+(0.04-0)Fx(3)=0.04
序列a1a1a3的标签所在的区间为[0.02,0.04)
④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
序列a1a1a3a2的标签所在的区间为[0.024,0.03)
⑤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
序列a1a1a3a2a3的标签所在的区间为[0.027,0.03)
⑥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
可以生成序列a1a1a3a2a3a1的标签为:Tx(a1a1a3a2a3a1)=(0.027+0.0276)/2=0.0273
6.对于表4-9给出的概率模型,对于一个标签为0.63215699的长度为10的序列进行解码。
解:已知Fx(k)=0, k≤0, Fx(1)=0.2, Fx(2)=0.5, Fx(3)=1, k>3.
设u(0)=1,l(0)=0
①l(1)=0+(1-0)Fx(x1-1)=Fx(xk-1)
u(1)=0+(1-0)Fx(x1)=Fx(xk)
当xk=3时,0.63215699在区间[0.5,1)中;
②l(2)=0.5+0.5Fx(xk-1)
u(2)=0.5+0.5Fx(xk)
当xk=2时,0.63215699在[0.6,0.75)中;
③l(3)=0.6+0.15Fx(xk-1)
u(3)=0.6+0.15Fx(xk)
当xk=2时,0.63215699在[0.63,0.675)中;
④l(4)=0.63+0.045Fx(xk-1)
u(4)=0.63+0.045Fx(xk)
当xk=1时,0.63215699在[0.63,0.639)中;
⑤l(5)=0.63+0.009Fx(xk-1)
u(5)=0.63+0.009Fx(xk)
当xk=2时,0.63215699在[0.6318,0.6345)中;
⑥l(6)=0.6318+0.0027Fx(xk-1)
u(6)=0.6318+0.0027Fx(xk)
当xk=1时,0.63215699在[0.6318,0.63234)中;
⑦l(7)=0.6318+0.00054Fx(xk-1)
u(7)=0.6318+0.00054Fx(xk)
当xk=3时,0.63215699在[0.63207,0.63234)中;
⑧l(8)=0.63207+0.00027Fx(xk-1)
u(8)=0.63207+0.00027Fx(xk)
当xk=2时,0.63215699在[0.632124,0.632205)中;
⑨l(9)=0.632124+0.000081Fx(xk-1)
u(9)=0.632124+0.000081Fx(xk)
当xk=2时,0.63215699在[0.6321402,0.6321645)中;
⑩l(10)=0.6321402+0.0000243Fx(xk-1)
u(10)=0.6321402+0.0000243Fx(xk)
当xk=3时,0.63215699在[0.63215235,0.6321645)中;
得到序列为:a3a2a2a1a2a1a3a2a2a3。