Response to the following problem:
Given the sequence thebbetabcatbatebthebcetabhat:
(a) Encode the sequence using the ppma algorithm and an adaptive arithmetic coder. Assume a six-letter alphabet [h, e, r, a, c,b}.
(b) Decode the encoded sequence.
Make sure you use enough details to support your answer.