CS计算机代考程序代写 information theory THE AUSTRALIAN NATIONAL UNIVERSITY

THE AUSTRALIAN NATIONAL UNIVERSITY

Assignment 3

COMP2610/COMP6261

Information Theory, Semester 2 2021

Release Date: Wednesday 29 September 2021

Due Date: Wednesday 27 October 2021, 5:00 p.m

No submission allowed after Wednesday 27 October 2021, 5:00 p.m.

Assignment 3 weighting is 20% of the course mark.

Instructions:

Marks:

• The mark for each question is indicated next to the question. For questions where you are
asked to prove results, if you can not prove a precedent part, you can still attempt subsequent
parts of the question assuming the truth of the earlier part.

• COMP2610 students: Answer Questions 1, 2-I, 2-II, 3-5, and 2-III-A. You are not expected
to answer 2-III-B. You will be marked out of 100.

• COMP6261 students: Answer Questions 1, 2-I, 2-II, 3-5, and 2-III-B. You are not expected
to answer 2-III-A. You will be marked out of 100..

Submission:

• Submit your assignment together with a cover page as a single PDF on Wattle.

• Clearly mention whether you are a COMP2610 student or COMP6261 student in the
cover page.

• Submission deadlines will be strictly enforced. If you submit after the deadline you get zero
marks (100% penalty), unless you are ill, in which case you will need to present a doctor’s
certificate, or have undergone severe trauma of some kind.

• All assignments must be done individually. Plagiarism is a university offence and will be dealt
with according to university procedures http://academichonesty.anu.edu.au/UniPolicy.html.

1

Question 1: Entropy and Joint Entropy [10 marks total]

**All students are expected to attempt this question.

An ordinary deck of cards containing 26 red cards and 26 black cards is shuffled and dealt out one
card at time without replacement. Let Xi be the color of the ith card.

(a) Determine H(X1). [4 marks]

(b) Determine H(X1,X2, · · · ,X52). [6 marks]

2

Question 2: Source Coding [30 marks total]

Question 2-I [6 marks total]

**All students are expected to attempt this question.

Consider the code {0,01}.

(a) Is it instantaneous? [2 marks]

(b) Is it uniquely decodable? [2 marks]

(c) Is it nonsingular? [2 marks]

Question 2-II [12 marks total]

**All students are expected to attempt this question.

Construct a binary Huffman code and Shannon code for the following distribution on 5 symbols
p = (0.3,0.3,0.2,0.1,0.1). What is the average length of these codes?

Question 2-III-A [For COMP2610 Students Only] [12 marks total]

**Only COMP2610 students are expected to attempt this question.

Consider the random variable

X =
(

x1 x2 x3 x4 x5 x6 x7
0.49 0.26 0.12 0.04 0.04 0.03 0.02

)
(a) Find a binary Huffman code for X . [4 marks]

(b) Find the expected codelength for this encoding. [3 marks]

(c) Find a ternary Huffman code for X . [5 marks]

Question 2-III-B [For COMP6261 Students Only] [12 marks total]

**Only COMP6261 students are expected to attempt this question.

A random variable X takes on three values with probabilities 0.6, 0.3, and 0.1.

(a) What are the lengths of the binary Huffman codewords for X? What are the lengths of the binary
Shannon codewords for X? [6 marks]

(b) What is the smallest integer D such that the expected Shannon codeword length with a D-ary
alphabet equals the expected Huffman codeword length with a D-ary alphabet? [6 marks]

3

Question 3: Channel Capacity [30 marks total]

Question 3-I [20 marks total]

**All students are expected to attempt this question.

There is a discrete memoryless channel (DMC) with the channel input X ∈ X = {1,2,3,4}. The
channel output Y follows the following probabilistic rule.

Y =

{
X probability 12
2X probability 12

Answer the following questions.

(a) Draw the schematic of the channel and clearly show possible channel outputs and the channel
transition probabilities. [5 marks]

(b) Write the mutual information I(X ;Y ) as a function of the most general input probability distri-
bution. [10 marks]

(c) Find a way of using only a subset of the channel inputs such that the channel turns into a noiseless
channel and the maximum mutual information (you need to quantify its value) can be achieved
with zero error. [5 marks]

Question 3-II [10 marks total]

**All students are expected to attempt this question.

The Z-channel has binary input and output alphabets and transition probabilities p(y|x) given by the
following matrix:

p(y|x) =
[

1 0
1/2 1/2

]
x,y ∈ {0,1}

Find the capacity of the Z-channel and the maximizing input probability distribution.

4

Question 4: Joint Typical Sequences [30 marks total]

Question 4-I [15 marks total]

**All students are expected to attempt this question.

Let (xn,yn,zn) be drawn according to the joint distribution p(x,y,z) in an independent and identically
distributed (i.i.d.) manner. We say that (xn,yn,zn) is jointly ε-typical if all the following conditions
are met

• |H̃(xn)−H(X)| ≤ ε

• |H̃(yn)−H(Y )| ≤ ε

• |H̃(zn)−H(Z)| ≤ ε

• |H̃(xn,yn)−H(X ,Y )| ≤ ε

• |H̃(xn,zn)−H(X ,Z)| ≤ ε

• |H̃(yn,zn)−H(Y,Z)| ≤ ε

• |H̃(xn,yn,zn)−H(X ,Y,Z)| ≤ ε

where H̃(xn) =−1n log2(p(x
n)). Now suppose that (x̃n, ỹn, z̃n) is drawn i.i.d. according to p(x), p(y),

and p(z). Therefore, (x̃n, ỹn, z̃n) have the same marginals as p(xn,yn,zn), but are independent. Find
upper and lower bounds on the probability that (x̃n, ỹn, z̃n) is jointly typical in terms of H(X ,Y,Z),
H(X), H(Y ), H(Z), ε, and n.

Question 4-II [15 marks total]

**All students are expected to attempt this question.

Let p = [0.4,0.33,0.27] be the distribution of a random variable X that takes symbols from {a,b,c},
respectively.

(a) Find the empirical entropy of the i.i.d. sequence

x = aabaabbcabaccab

[5 marks]
(Hints: the empirical entropy H̃(xn) =−1n log2(p(x

n)).)

(b) Find whether it is a ε-typical sequence with ε = 0.11 [5 marks]

(c) Now assume the following joint probability distribution between X and Y that take symbols from
{a,b,c} and {d,e, f} respectively.

p(x,y) =


 0.2 0.1 0.10.08 0.1 0.15

0.15 0.05 0.07


where in each row, x is fixed. We observe two i.i.d. sequences

x = aabaabbcabaccab

y = dee f de f dd f dd f f d
Determine whether (x,y) are jointly ε-typical. [5 marks]

5