Encoding messages for a noise-less channel

Huffman coding

Marc Riera (@mrcasals) - Twitter, GitHub

Noise-less channels: HOAX!


But the souce can't send the message as is, so...

Objective: encoding
ALL our messages!

The elements for a code

What we need

What we get

The Huffman method for a binary alphabet

Huffman method: properties

  • Unique codification: there's no possibility of confusion when decrypting
  • There's no error control
  • The more probable the message, the shortest the encoded message
  1. Sort our message by its probability distribution (from higher to lower)
  2. We group the two less probable messages:
    1. sum the probabilities
    2. give a '1' to the less probable message
    3. give a '0' to the most probable message
  3. Go back to the first step

Note: you can skip the first step, but sorting the messages is easier

A -> 010, B -> 00, C -> 10, D -> 1110,
E -> 011, F ->1111, G ->110

Thanks for watching!

By Marc Riera (@mrcasals - Twitter) (/mrcasals - GitHub)

Use spacebar or the arrow keys to navigate