A text is made up of the characters α, β, γ, δ and σ with the probability…

2014

A text is made up of the characters α, β, γ, δ and σ with the probability 0.12, 0.40, 0.15, 0.08 and 0.25 respectively. The optimal coding technique will have the average length of

Answer: B. 2.15Answer: 2.15 bits per symbol. Method (Huffman coding): combine the two smallest probabilities repeatedly. Combine δ (0.08) and α (0.12) → 0.20 Combine γ…

  1. A.

    1.7

  2. B.

    2.15

  3. C.

    3.4

  4. D.

    3.8

Attempted by 229 students.

Show answer & explanation

Correct answer: B

Answer: 2.15 bits per symbol.

Method (Huffman coding): combine the two smallest probabilities repeatedly.

  • Combine δ (0.08) and α (0.12) → 0.20

  • Combine γ (0.15) and node 0.20 → 0.35

  • Combine σ (0.25) and node 0.35 → 0.60

  • Combine β (0.40) and node 0.60 → 1.00 (root)

Resulting codeword lengths (from the final tree):

  • β (0.40): length 1

  • σ (0.25): length 2

  • γ (0.15): length 3

  • α (0.12): length 4

  • δ (0.08): length 4

Compute the average length:

  • 0.40 × 1 = 0.40

  • 0.25 × 2 = 0.50

  • 0.15 × 3 = 0.45

  • 0.12 × 4 = 0.48

  • 0.08 × 4 = 0.32

  • Total = 0.40 + 0.50 + 0.45 + 0.48 + 0.32 = 2.15

Therefore the optimal average code length is 2.15 bits per symbol.

Explore the full course: Tpsc Assistant Technical Officer

Loading lesson…