# Arithmetic Coding Example

I have a question for static arithmetic coding which I have done in class but I can't seem to figure out where I got the answers. It's a bit hard to get in touch with my lecturer at the moment so I'm hoping someone can help me here.

The question is to encode a message "ABACAB".

The alphabet and probability distributions:

A -> 0.3
B -> 0.2
c -> 0.3
D -> 0.1
. -> 0.1


where the . is the end of message/file symbol.

The range of values the encoded message could be in is [0.0997776, 0.09981) and the actual value is 0.09978

Could anyone verify if these are the right answers? And could a simple step by step of how you got the actual answer be supplied too?

-