I have a random source which is with no memory and have this alphabet (A,B,C).
Each symbol in the alphabet has a probability ( A = 0.5, B= 0.25, C = 0.25)
It's given that each message including exactly 60 chars.
And need to fund a Huffman code when we coding a pair of chars and the channel gets those chars ( 0, 1, 2).
I know how to do it when the channel gets only two chars (0,1).
I created the pairs of chars, and calculated the probability of each pair
AA 0.25
AB 0.125
AC 0.125
BA 0.125
BB 0.0625
BC 0.0625
CA 0.125
CB 0.0625
CC 0.0625
after that I sorted the list and the final result is :
AA 0.25
AB 0.125
AC 0.125
BA 0.125
CA 0.125
BB 0.0625
BC 0.0625
CB 0.0625
CC 0.0625
now I know how to solve it when the channel gets only (0,1) but How to solve it when the channel get (0,1,2)? how to create the Huffman code with three channel symbols?