Link to home
Start Free TrialLog in
Avatar of stephen_c01
stephen_c01

asked on

Arithmetic Coding

Here is the question im having problems with, i dont know even where to start. All the examples dont use real numbers.

"A data sequence {0.47, 2.61, 1.63, -0.98, 0.23, 1.12} is first quantized by a scalar quantizer shown below, and then coded by the arithmetic coding. Assume the probabilities for the outputs of the quantizer are P(-1.5)=0.2, P(-0.5)=0.3, P(0.5)=0.4, P(1.5)=0.1, calculate the tag value to represent this data sequence."




example-5.png
SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stephen_c01
stephen_c01

ASKER

i think the quantization was my biggest problem, just to make sure the rest of the quantized values would be?

output = {0.5, 1.5, 1.5, -0.5, 0.5, 1.5}
Yep! :) And I also went through and got an answer for the output of the encoding if you want to double check that too.
that would be great, im really having a blond moment with this.
What have you got so far?
i got 0.49705 for the tag.

l0      0
u0      1
l1      0
u1      0.5
l2      0.45
u2      0.5
l3      0.495
u3      0.5
l4      0.496
u4      0.4975
l5      0.49675
u5      0.49735
l6      0.49675
u6      0.49735
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i found an error.

l0      0
u0      1
l1      0.5
u1      0.9
l2      0.86
u2      0.9
l3      0.896
u3      0.9
l4      0.8968
u4      0.898
l5      0.8974
u5      0.89788
l6      0.90172
u6      0.89788
      
      0.8998
Everything except l6 is correct, the lower bound of the interval can't be higher than the upper bound. But it looks like you have the idea!!