Construct an arithmetic code for the source and calculate its length

61 Views Asked by At

Construct an arithmetic code for the following source: $$\begin{array}{c|cccc} s_k&1&2&3&4\\ p_k&0.45&0.1&0.1&0.35\end{array}$$ I am confused, almost all examples I see online have a 'message' in their question/example. So it will give a source of letters, and then say "encode the message 'eaii', whereas this just says 'construct a code'. It doesn't say 'encode the message 1123' for example.

If you can give me any pointers it would help, I am not asking for a solution if it is very long

1

There are 1 best solutions below

1
On BEST ANSWER

In the other type of problem you also first had to construct a code for the input symbols, and then show that you understood the definition of that just constructed code by encoding an example message.

This problem is easier, because you don't have to do the second thing.