- Problem 1 In A Text Over An Alphabet A B The Letter A Occurs With Frequency 7 8 And The Letter B With Frequency 1 1 (64.14 KiB) Viewed 26 times
Problem 1. In a text over an alphabet {a,b} the letter a occurs with frequency 7/8, and the letter b — with frequency 1/
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Problem 1. In a text over an alphabet {a,b} the letter a occurs with frequency 7/8, and the letter b — with frequency 1/
Problem 1. In a text over an alphabet {a,b} the letter a occurs with frequency 7/8, and the letter b — with frequency 1/8. Suppose that you want to encode this text with zeroes and ones. If you encode a as 0 and b as 1, you will have an average length of a codeword being equal to 1. What will happen if you encode not single letters, but triples of letters? a) Find frequencies distribution over triples of letters. (What are the frequencies of aaa, aab, aba, ..., bbb?) b) Construct Hamming code for the triples of letters using the frequencies that you've found. c) Calculate the average length for the code that you've constructed. Compare it with the average length of 1 for the encoding of individual letters. Which of the two codes is more efficient?