Given the message "AACCCBCCDDAB", in which the probabilities of symbols are P(A) = 0.50, P(B) = 0.25, P(C) = 0.125, and P(D) = 0.125,
a. encode the data using Huffman coding.
b. find the compression ratio if each original character is represented by 8 bits.