Till KTH:s startsida Till KTH:s startsida

Visa version

Version skapad av Johan Montelius 2016-02-09 11:25

Visa < föregående | nästa >
Jämför < föregående | nästa >

Morse

There are several standards for Morse codes and we will here use a slightly extended version since we also want to code some special character. The Morse code uses, as you probably know, long and short
(often pronounced di and da) to encode characters. You might therefore think that is identical to Huffman codes but there is a difference.

You task is to decode the following messages:

  • ".- .-.. .-.. ..-- -.-- --- ..- .-. ..-- -... .- ... . ..-- .- .-. . ..-- -... . .-.. --- -. --. ..-- - --- ..-- ..- ... "
  • ".... - - .--. ... ---... .----- .----- .-- .-- .-- .-.-.- -.-- --- ..- - ..- -... . .-.-.- -.-. --- -- .----- .-- .- - -.-. .... ..--.. ...- .----. -.. .--.-- ..... .---- .-- ....- .-- ----. .--.-- ..... --... --. .--.-- ..... ---.. -.-. .--.-- ..... .---- "

To spare you the trouble of entering the Morse codes in a table, you are given them in both the form of a decoding tree and a list of codes that we will use to encode messages.