Lecture 1: Prefix Codes Flashcards

1
Q

What is meant by a uniquely decodable code?

A

if C+(x) != C+(y) where x != y. Essentially, if two input strings (x and y) were to encode to the same codeword,
you can’t tell whether it was x or y as the input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a instantaneously decodable code? How do we generate them?

A

When it is possible to instantly decode a codeword as soon as we receive it, without having to look ahead for future codewords. Generate them using prefix codes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Can a code be uniquely decodable without being a prefix (instantaneous) code?

A

Yes, say C = {1, 101}. Although 1 is a prefix of 101, only 101 contains a 0, so can distinguish the codewords with that.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When using a prefix code as a binary tree, what can you not do?

A

Once a node on the tree is selected as a codeword, no further child nodes can be also be selected.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an optimal code?

A

Using all possible codewords for a prefix code (using all the budget of a budget grid).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain the Kraft Equality

A

For lossless compression, codewords cannot be arbitaraliy short, shortening one must cause another to lengthen. A code is ‘complete’ if the equality holds (=1).

(Sum of 2^-len(k) for all codewords <= 1).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does the Kraft Equality apply to budgets/binary tree?

A

All node endings are used, all the budget is used. Complete code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Discuss the entropy bound on data compression.

A

The code produced must be greater or equal length to the Shannon entropy! (Limit of data compression)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly