Solved Problems
Solved Problems
Solved Problems
Homework 1
Solution
1. Let p(x, y) be given by
XY
0
1
0
1/3
0
1
1/3
1/3
= H(X)
(c)
H(g(X))
Solution :
(a)
STEP (a) : H(X, g(X)) = H(X) + H(g(X)|X) by the chain rule for entropies.
1
Harvard SEAS
Solution :
(a)
I(X; Q, A) = H(Q, A) H(Q, A|X)
= H(Q) + H(A|Q) H(Q|X) H(A|Q, X)
= H(Q) + H(A|Q) H(Q)
= H(A|Q)
The interpretation is as follows. The uncertainty removed in X by (Q, A) is the same as the uncertainty in the answer given the question.
(b) Using the result from part (a) and the fact that questions are independent, we can easily obtain
Harvard SEAS
(c)
(d)
(e)
(f )
= 2I(X; A1 |Q1 )
p(x)
1/2
1/4
1/4
q(x)
1/3
1/3
1/3
Solution :
1
1
1
log 2 + log 4 + log 4 = 1.5 bits
2
4
4
1
1
1
H(q) = log 3 + log 3 + log 3 = log 3 = 1.58496 bits
3
3
3
1
3 1
3 1
3
D(p k q) = log + log + log = log 3 1.5 = 0.08496 bits
2
2 4
4 4
4
2 1
4 1
4
5
1
D(q k p) = log + log + log = log 3 = 0.08170 bits
3
3 3
3 3
3
3
H(p) =
5. Here is a statement about pairwise independence and joint independence. Let X, Y1 and Y2 be binary
random variables. If I(X; Y1 ) = 0 and I(X; Y2 ) = 0, does it follow that I(X; Y1 , Y2 ) = 0?
(a) Yes or no?
(b) Prove or provide a counterexample.
3
Harvard SEAS
(c) If I(X; Y1 ) = 0 and I(X; Y2 ) = 0 in the above problem, does it follow that I(Y1 ; Y2 ) = 0?
In other worlds, if Y1 is independent of X, and of Y2 is independent of X, is it true that Y1 and Y2
are independent?
Solution :
(a) The answer is no.
(b) Although at first the conjecture seems reasonable enough-after all, if Y1 gives you no information
about X, and if Y2 gives you no information about X, then why should the two of them together
give any information? But remember, it is NOT the case that I(X; Y1 , Y2 ) = I(X; Y1 ) + I(X; Y2 ).
The chain rule for information says instead that I(X; Y1 , Y2 ) = I(X; Y1 ) + I(X; Y2 |Y1 ). The chain
rule gives us reason to be skeptical about the conjecture.
This problem is reminiscent of the well-known fact in probability that pair-wise independence of three
random variables is not sufficient to guarantee that all three are mutually independent. I(X; Y1 ) = 0
is equivalent to saying that X and Y1 are independent. Similarly for X and Y2 . But just because
X is pairwise independent with each of Y1 and Y2 , it does not follow that X is independent of the
vector (Y1 , Y2 ).
Here is a simple counterexample. Let Y1 and Y2 be independent fair coin flips. And let X =
Y1 XOR Y2 . X is pairwise independent of both Y1 and Y2 , but obviously not independent of the
vector (Y1 , Y2 ), since X is uniquely determined once you know (Y1 , Y2 ).
(c) Again the answer is no. Y1 and Y2 can be arbitrarily dependent with each other and both
still be independent of X. For example, let Y1 = Y2 be two observations of the same fair coin flip,
and X an independent fair coin flip. Then I(X; Y1 ) = I(X; Y2 ) = 0 because X is independent of
both Y1 and Y2 . However, I(Y1 ; Y2 ) = H(Y1 ) H(Y1 |Y2 ) = H(Y1 ) = 1.
6. Let X1 and X2 be identically distributed, but not necessarily independent. Let
=1
(a) Show =
I(X1 ;X2 )
H(X1 ) .
(b) Show 0 1.
(c) When is = 0?
(d) When is = 1?
Solution :
H(X2 |X1 )
H(X1 )
Harvard SEAS
(a)
H(X1 ) H(X2 |X1 )
H(X1 )
H(X2 ) H(X2 |X1 )
=
(sinceH(X1 ) = H(X2 ))
H(X1 )
I(X1 ; X2 )
=
H(X1 )
H(X2 |X1 )
1
H(X1 )
01
Solution :
Consider a sequence of n binary random variables X1 , X2 , , Xn . Each sequence of length n with
an even number of 1s is equally likely and has probability 2(n1) .
Any n 1 or fewer of these are independent. Thus, for k n 1,
I(Xk1 ; Xk |X1 , X2 , , Xk2 ) = 0
However, given X1 , X2 , , Xn2 , we know that once we know either Xn1 or Xn we know the other.
I(Xn1 ; Xn |X1 , X2 , , Xn2 ) = H(Xn |X1 , X2 , , Xn2 ) H(Xn |X1 , X2 , , Xn1 )
= 1 0 = 1 bit
Harvard SEAS
a
1/6
1/12
1/12
b
1/12
1/6
1/12
c
1/12
1/12
1/6
Harvard SEAS
1, y=a,
2, y=b,
X(y)
=
3, y=c.
Hence the associated Pe is the sum of P (1, b), P (1, c), P (2, a), P (2, c), P (3, a) and P (3, b). Therefore,
Pe = 1/2.
(b) From Fanos inequality we know
Pe
H(X|Y ) 1
log |X |
Here,
H(X|Y ) = H(X|Y = a)P r{y = a} + H(X|Y = b)P r{y = b} + H(X|Y = c)P r{y = c}
1 1 1
1 1 1
1 1 1
=H
, ,
P r{y = a} + H
, ,
P r{y = b} + H
, ,
P r{y = c}
2 4 4
2 4 4
2 4 4
1 1 1
=H
, ,
(P r{y = a} + P r{y = b} + P r{y = c})
2 4 4
1 1 1
=H
, ,
2 4 4
= 1.5 bits
Hence
Pe
1.5 1
= 0.316
log 3
H(X|Y ) 1
log(|X | 1)
Pe
1.5 1
1
=
log 2
2
and