Question: Assume you have a source alphabet that includes the 5 symbols , ( eof ) function arithcoding format long N = 4 ; % this
Assume you have a source alphabet that includes the symbols eof function arithcoding
format long
N;
this input sequence represents the example from the screencast
"CABBAB#
data
p;
p;
Mlengthdata;
encoding
initialization
upbound cumsump;
lobound upbound:end;
for k:M
if kM
finalintervallobounddatak upbounddatak;
else
width upbounddatak lobounddatak;
newbottomlobounddatak;
upbound newbottom cumsumpwidth;
lobound newbottom upbound:end;
end
end
finalinterval
pick any number within the final interval for the decimal code.
note that picking the optimal binary number is tricky, and depends on
decimal to binary conversion details.
we will just cheat and pic the midpoint of the interval
arith codeword sumfinalintervalmidpoint of interval
decoding
upbound cumsump;
lobound upbound:end;
decode;
finished;
while finished
tu arith codeword
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
