reset password
Author Message
kknaur
Posts: 540
Posted 11:29 Apr 26, 2011 |

Here is the pseudo code for the Arithmetic Coding Algorithm:


BEGIN
1.     low = 0.0; high = 1.0; range = 1.0
2.     while (not end of the message)
3.          get (symbol);
4.          low = low + range * range_low(symbol);
5.          high = low + range * range_high(symbol);
6.          range = high-low;
7.     output a binary code that falls within [low, high)--> algorithm in the next slide


The line that is in red is where I need some clarification.  In the previous line, line 4, we update the value of low.  However, in line 5, we use some value of low to calculate high.  My question is....do we use the previous value of low which is 0.0 or do we use the newly updated value of low which would be 0.3 in the case of the example for encoding the letter C in CAEE$ ?  It seems like according to the table on page 6 slide 2 of the power point presentation we are supposed to use the original value of low which was 0.0.  Can anyone confirm this please?  I want to make sure I am following the example correctly.

Last edited by kknaur at 11:31 Apr 26, 2011.
hmodi
Posts: 27
Posted 12:10 Apr 26, 2011 |

Yes, you are right. . I think for each symbol use same value and update the value of low and high for next symbol.

eykang
Posts: 95
Posted 13:45 Apr 26, 2011 |

Both low and high should be changed based on the current low value.

The lecture slide was updated to remove ambiguity.