Coding Tests with Answers

⏱️ Estimated Reading Time: ~4 min read
0
(0)

Test questions on the topic: Message encoding

 The correct answer is highlighted in underlined italics after each question.

1. How many bits would it take to store the phrase “Tili-tili dough!” in a computer’s memory?

a) 16

b) 128

c) 32

Correct answer: b)

2. The maximum entropy value of a source that generates 16 different symbols is:

a) 4

b) 1

c) cannot be determined

                                                                                 Correct answer: a)

3. The compression coefficient for a source with probabilities,,,is equal to:

a) 0.875

b) 0.125

c) 1.338

Correct answer: a)

4. Shannon entropy has the property:

a) additivity

b) associativity

c) sociality

Correct answer: a)

5. The amount of information contained in two statistically dependent messages is estimated by the value:

a) Shannon entropy

b) conditional entropy

c) relative entropy

Correct answer: b)

1. Is the letter code , ,  for the source  a prefix code?

a) yes

b) no

c) cannot be determined

Correct answer: b)

2. Is the letter code , ,  for the source  separable?

a) yes

b) no

c) cannot be determined

Correct answer: b)

3. Is the letter code , ,  uniquely decodable?

a) yes

b) no

c) cannot be determined

Correct answer: a)

4. Does Kraft’s inequality hold for the code , , ?

a) yes

b) no

Correct answer: a)

Test 5. After encoding the message with the letter-by-letter code ,  the sequence 001001100 was obtained.  The original message looked like this:

a) 

b) 

c) 

Correct answer: a)

1. The average length of a code word of a letter-by-letter code , , ,  for a source  with a uniform probability distribution is equal to:

a) 2.75

b) 3

c) 1

The correct answer is a)

2. The redundancy of the letter code , , ,  for a source  with a uniform probability distribution is equal to:

a) 0

b) 0.75

c) 0.5

The correct answer is b)

3. Is the code , , ,  for a source  with a uniform probability distribution optimal?

a) yes

b) no

The correct answer is b)

4. Is the code , , ,  for a source  with probability distribution ,, , optimal?

a) yes

b) no

The correct answer is a)

5. The average length of a code word of code , , ,  for a source  with probability distribution ,, , is equal to:

a) 1.75

b) 2

c) 2.25

The correct answer is a)

Test 1. For the Shannon code, the following relation holds:

a) 

b) 

c) 

The correct answer is b)

2. The length of the Shannon code word for a symbol  is determined from the ratio ( – probability of occurrence of the symbol ):

a) 

b) 

c) 

The correct answer is a)

3. The average codeword length of the Fano code for a source  with a uniform probability distribution is:

a) 2.5

b) 2

c) 1.5

The correct answer is a)

4. Do Fano and Huffman codes coincide for a source  with a uniform probability distribution?

a) yes

b) no

c) both situations are possible

The correct answer is c)

Test 5. Do the average Fano and Huffman code lengths for a source  with a uniform probability distribution coincide?

a) yes

b) no

The correct answer is a)

1. Adaptive coding methods are used to encode messages generated by sources:

a) with known statistics

b) with unknown statistics

c) with uniform probability distribution

The correct answer is b)

2. To evaluate the statistics of the message source, the following is used:

a) sliding window

b) movable window

c) plastic window

The correct answer is a)

3. Adaptive Huffman code was proposed by:

a) D. Huffman

b) R. Gallagher

c) K. Shannon

The correct answer is b)

4. The adaptive “stack of books” code allows for good message compression:

a) with uniform distribution of symbols

b) with a large number of identical symbols

c) compresses any messages equally well

The correct answer is a)

Test No. 5. Is it necessary to know the probability distribution of the source symbols when encoding a message using the “stack of books” code?

a) yes

b) no

The correct answer is a)

1. Dictionary coding methods are used to encode messages generated by sources:

a) with known statistics

b) with unknown statistics and changing statistics

c) with uniform probability distribution

The correct answer is b)

2. The main types of dictionary methods of the LZ type are:

a) adaptive codes and optimal codes

b) sliding window codes and adaptive dictionary codes

c) adaptive Huffman code and codes using an adaptive dictionary

The correct answer is b)

3. In dictionary coding, the adaptive dictionary is used:

a) to store previously encountered combinations of symbols and their codes

b) to encode the message

c) to reduce coding redundancy

The correct answer is a)

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?


Explore More IT Terms


Share this term: Facebook X LinkedIn WhatsApp Email

Leave a Reply

Your email address will not be published. Required fields are marked *