信息论与编码理论第二章习题答案(王育民) 下载本文

部分答案,仅供参考。

2.1信息速率是指平均每秒传输的信息量

点和划出现的信息量分别为log3,log3,

2一秒钟点和划出现的次数平均为

0.2?121?0.4?3344?15

4一秒钟点和划分别出现的次数平均为10.5

那么根据两者出现的次数,可以计算一秒钟其信息量平均为10log3?5log3?15log3?5

42442

2.3 解:

(a)骰子A和B,掷出7点有以下6种可能:

A=1,B=6; A=2,B=5; A=3,B=4; A=4,B=3; A=5,B=2; A=6,B=1 概率为6/36=1/6,所以信息量

-log(1/6)=1+log3≈2.58 bit

(b) 骰子A和B,掷出12点只有1种可能: A=6,B=6

概率为1/36,所以信息量

-log(1/36)=2+log9≈5.17 bit

2.5解:

出现各点数的概率和信息量:

1点:1/21,log21≈4.39 bit; 2点:2/21,log21-1≈3.39 bit; 3点:1/7,log7≈2.81bit; 4点:4/21,log21-2≈2.39bit; 5点:5/21,log(21/5)≈2.07bit; 6点:2/7,log(7/2)≈1.81bit 平均信息量:

(1/21)×4.39+(2/21)×3.39+(1/7)×2.81+(4/21)×2.39+(5/21)×2.07+(2/7)×1.81≈2.4bit

2.7解:

X=1:考生被录取; X=0:考生未被录取; Y=1:考生来自本市;Y=0:考生来自外地; Z=1: 考生学过英语;Z=0:考生未学过英语

P(X=1)=1/4, P(X=0)=3/4; P(Y=1/ X=1)=1/2; P(Y=1/ X=0)=1/10;

P(Z=1/ Y=1)=1, P(Z=1 / X=0, Y=0)=0.4, P(Z=1/ X=1, Y=0)=0.4, P(Z=1/Y=0)=0.4 (a) P(X=0,Y=1)=P(Y=1/X=0)P(X=0)=0.075, P(X=1,Y=1)= P(Y=1/X=1)P(X=1)=0.125

P(Y=1)= P(X=0,Y=1)+ P(X=1,Y=1)=0.2

P(X=0/Y=1)=P(X=0,Y=1)/P(Y=1)=0.375, P(X=1/Y=1)=P(X=1,Y=1)/P(Y=1)=0.625 I(X ;Y=1)=?P(x/Y?1)I(x;Y?1)??P(x/Y?1)logxxP(x/Y?1)

P(x)=P(X?0/Y?1)logP(X?0/Y?1)P(X?1/Y?1) ?P(X?1/Y?1)logP(X?0)P(X?1)精选

=0.375log(0.375/0.75)+0.625log(0.625/0.25)=(5/8)log5-1≈0.45bit

(b) 由于P(Z=1/ Y=1)=1, 所以 P(Y=1,Z=1/X=1)= P(Y=1/X=1)=0.5 P(Y=1,Z=1/X=0)= P(Y=1/X=0)=0.1

那么P(Z=1/X=1)= P(Z=1,Y=1/X=1)+ P(Z=1,Y=0/X=1)=0.5+ P(Z=1/Y=0,X=1)P(Y=0/X=1)=0.5+0.5*0.4=0.7

P(Z=1/X=0)= P(Z=1,Y=1/X=0)+ P(Z=1,Y=0/X=0)=0.1+P(Z=1/Y=0,X=0)P(Y=0/X=0)=0.1+0.9*0.4=0.46

P(Z=1,X=1)= P(Z=1/X=1)*P(X=1)=0.7*0.25=0.175 P(Z=1,X=0)= P(Z=1/X=0)*P(X=0)= 0.46*0.75=0.345 P(Z=1) = P(Z=1,X=1)+ P(Z=1,X=0) = 0.52 P(X=0/Z=1)=0.345/0.52=69/104 P(X=1/Z=1)=35/104

P(x/Z?1)I(X ;Z=1)=?P(x/Z?1)I(x;Z?1)??P(x/Z?1)log

P(x)xx=P(X?0/Z?1)logP(X?0/Z?1)?P(X?1/Z?1)logP(X?1/Z?1)

P(X?0)P(X?1)=(69/104)log(23/26)+( 35/104)log(35/26) ≈0.027bit

(c)H(X)=0.25*log(1/0.25)+0.75*log(1/0.75)=2-(3/4)log3=0.811bit H(Y/X)=-P(X=1,Y=1)logP(Y=1/X=1) -P(X=1,Y=0)logP(Y=0/X=1)

-P(X=0,Y=1)logP(Y=1/X=0) -P(X=0,Y=0)logP(Y=0/X=0)

=-0.125*log0.5-0.125*log0.5-0.075*log0.1-0.675*log0.9

=1/4+(3/40)log10-(27/40)log(9/10)≈0.603bit

H(XY)=H(X)+H(Y/X)=9/4+(3/4)log10-(21/10)log3=1.414bit

P(X=0,Y=0,Z=0)= P(Z=0 / X=0, Y=0)* P( X=0, Y=0)=(1-0.4)*(0.75-0.075)=0.405 P(X=0,Y=0,Z=1)= P(Z=1 / X=0, Y=0)* P( X=0, Y=0)=0.4*0.675=0.27

P(X=1,Y=0,Z=1)= P(Z=1/ X=1,Y=0)* P(X=1,Y=0)=0.4*(0.25-0.125)=0.05 P(X=1,Y=0,Z=0)= P(Z=0/ X=1,Y=0)* P(X=1,Y=0)=0.6*0.125=0.075 P(X=1,Y=1,Z=1)=P(X=1,Z=1)- P(X=1,Y=0,Z=1)=0.175-0.05=0.125 P(X=1,Y=1,Z=0)=0 P(X=0,Y=1,Z=0)=0

P(X=0,Y=1,Z=1)= P(X=0,Z=1)- P(X=0,Y=0,Z=1)= 0.345-0.27=0.075

H(XYZ)=-0.405*log0.405-0.27*log0.27-0.05*log0.05-0.075*log0.075-0.125*log0.125-0.075*log0.075=(113/100)+(31/20)log10-(129/50)log3 =0.528+0.51+0.216+0.28+0.375+0.28=2.189 bit

H(Z/XY)=H(XYZ)-H(XY)= -28/25+(4/5)log10-12/25log3 =0.775bit

2.9 解:

A,B,C分别表示三个筛子掷的点数。 X=A, Y=A+B, Z=A+B+C

由于P(A+B+C/ A+B)=P(C/A+B)=P(C)

所以H(Z/Y)=H(A+B+C/ A+B)=H(C)=log6 =2.58bit

精选

H(X/Y)= H(A/Y) Y 12 11 10 9 8 7 6 5 4 3 2 组合数目 1 2 3 4 5 6 5 4 3 2 1 组合情况(A+B) 6+6 5+6,6+5 4+6,5+5,6+4 3+6,4+5,5+4,6+3 ... 1+6,2+5,3+4,4+3,5+2,6+1 ... ... ... ... 1+1 P(A=a/Y=y) 1 1/2 1/3 1/4 ... 1/6 ... ... ... ... 1 一共36种情况,每种情况的概率为1/36,即P(A=a,Y=y)=1/36

H(X/Y)=H(A/Y)=(1/36)[(-1*log1-2*log(1/2)-3*log(1/3)-4*log(1/4)-5*log(1/5) )*2-6*log(1/6)]=1.89bit

由于P(A+B+C/ A+B,A)=P(C/A+B,A)=P(C) H(Z/XY)=H(C) =log6 =2.58bit

由于P(A=x,A+B+C=z/A+B=y)=P(A=x,C=z-y/ A+B=y)=P(A=x/A+B=y)P(C=z-y/A+B=y)= P(A= x / A+B=y)P(C=z-y)=P(A/Y)P(C) P(A/Y)上面已经给出。 Y 12 11 10 9 8 7 6 5 4 3 2 组合数目 6 12 18 24 30 36 30 24 18 12 6 组合情况(A+B+C) 6+6+1, 6+6+2,...., 6+6+6 ... ... ... ... ... ... ... ... ... ... P(A=x,A+B+C=z/A+B=y) 1/6 1/12 1/18 1/24 ... 1/36 ... ... ... ... 1/6 一共216种情况,每种情况的概率为1/216,即P(XYZ)=1/216 H(XZ/Y)=

(1/216)[(-6*log(1/6)-12*log(1/12)-18*log(1/18)-24*log(1/24)-30*log(1/30))*2-36*log(1/36)]= (1/36)*[(log6+2log12+3log18+4log24+5log30)*2+6log36]=4.48 bit

由于P(Z/X)=P(B+C/A)=P(B+C)

精选

B+C的组合共36种: B+C 12 11 10 9 8 7 6 5 4 3 2 xyz组合数目 1 2 3 4 5 6 5 4 3 2 1 组合情况(B+C) 6+6 5+6,6+5 4+6,5+5,6+4 3+6,4+5,5+4,6+3 ... 1+6,2+5,3+4,4+3,5+2,6+1 ... ... ... ... 1+1 P(Z/X) 1/36 2/36 3/36 4/36 ... 5/36 ... ... ... ... 1/36 H(Z/X)???p(xz)logp(z/x)???p(a)p(a?b?c/a)logp(a?b?c/a)abc

???p(a)?p(b?c)logp(b?c)?H(B?C)abc= (1/36)*{[log36+2log(36/2)+ 3log(36/3)+ 4log(36/4)+ 5log(36/5)]*2+6log(36/6)}bit

2.11解:P(0/0)=P(1/1)=1- p, P(1/0)=P(0/1)= p (a) P(ul)=1/8

P(ul,0)=P(ul)×P(0/ul)=(1/8)×(1-p) 接收的第一个数字为0的概率:

P(0)=P(ul)×P(0/ul)+ P(u2)×P(0/u2)+……. P(u8)×P(0/u8)

=4×(1/8)×(1-p)+ 4×(1/8)×p=1/2

I(ul; 0)=log[ P(ul,0)/P(0)P(ul)]=1+log(1-p) (b) P(ul,00)=P(ul)×P(00/ul)=(1/8)×(1-p)2

P(00)=P(ul)×P(00/ul)+ P(u2)×P(00/u2)+……. P(u8)×P(00/u8) =2×(1/8)×(1-p)2 +4×(1/8)×p (1-p)+ 2×(1/8)×p2 =1/4

I(ul; 00)=log[ P(ul,00)/P(00)P(ul)]= 2+2log(1-p) (c) P(ul,000)=P(ul)×P(000/ul)=(1/8)×(1-p)3

P(000)=P(ul)×P(000/ul)+ P(u2)×P(000/u2)+……. P(u8)×P(000/u8) = (1/8)×(1-p)3 +3×(1/8)×p (1-p) 2+3×(1/8)×p 2 (1-p) +(1/8)×p3 =1/8

I(ul; 000)=log[ P(ul,000)/P(000)P(ul)]= 3+3log(1-p) (d) P(ul,0000)=P(ul)×P(0000/ul)=(1/8)×(1-p)4

P(0000)=P(ul)×P(0000/ul)+ P(u2)×P(0000/u2)+……. P(u8)×P(0000/u8) = (1/8)×(1-p)4 +6×(1/8)×p 2 (1-p) 2+ (1/8)×p4

I(ul; 0000)=log[ P(ul,0000)/P(0000)P(ul)]=

精选

?3log{2?2p}?log{

2.12解: Z 3 4 (1?p)} 4224(1?p)?6p(1?p)?p5 6 7 8 9 10 11 12 13 14 15 16 17 18 概率 1/63 3/63 6/63 10/63 15/63 21/63 25/63 27/63 27/63 25/63 21/63 15/63 10/63 6/63 3/63 1/63 I(Y;Z)=H(Z)-H(Z/Y) I(X;Z)= H(Z)-H(Z/X) I(XY ;Z)=H(Z)-H(Z/XY)

I(Y;Z/X)=I(XY;Z)-I(X;Z)

I(X;Z/Y)= I(XZ;Y)-I(Y;Z)= H(XZ)-H(XZ/Y) -I(Y;Z)=H(X)+H(Z/X) -H(XZ/Y) -I(Y;Z)

以上可以根据2.9的结果求出

2.27解:考虑到约束条件

??0q(x)?1,??0xq(x)?m

??采用拉格朗日乘子法

Hc(q(x))???q(x)logq(x)dx??1[?xq(x)dx?m]??2[?q(x)dx?1]000??(?1m??2)??当且仅当q(x)?a将q(x)?a??1x??2?0?e??1x??2a??1x??2q(x)logdx?(?1m??2)?loge??q(x)[?1]dx0q(x)q(x)

??1x??2时,等式成立。

?带入

?0q(x)dx?1,??0xq(x)dx?m: ?1?1,a??2?m mlnaxxxlna(?)?1?mln11amlna?e?em,相应的熵值log(me) 实现最大微分熵的分布q(x)?ammm

2.29证明: (a)

?Q(x)???Q(x)?(1??)Q(x)???(1??)?1

12所以Q(x)为概率分布。 (b) 即证明熵的凸性。

精选