Re: Still on the Arithmetic coder
- From: "Sachin Garg" <schngrg@xxxxxxxxx>
- Date: 30 Jan 2006 09:58:44 -0800
David A. Scott wrote:
> "Sachin Garg" <schngrg@xxxxxxxxx> wrote in
> news:1138618596.947241.174160@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
>
> >> I assume the right probability for the symbol is known ... then
> >> arithmetic coding would just produce the right amount of bits.
> >> Huffman would produce full bits and in an optimal case this could
> >> be the rounded number of bits ...
>
> Are you sure its just the rounded number of bits. What rules
> of rounding are we using here.
>
> >
> > Agreed on this too.
> >
> > Sachin Garg [India]
> > http://www.sachingarg.com
> >
> > ps. Discussions are so boring without disagreements :-)
> >
>
> Then lets make a case to disagre on. Lets go the two symbols
> case. That way the huffman produce 'ONE BIT" a 0 and 1 each exactly
> 1 bit in lenght. We have several files in each case the symbols have
> fixed probability put symbol A varies uniformily between files from
> 0 to 1. For the file where A is .5 there is zero error the huffman
> and arithmetic are the same at A .25 the A is 2 bits while the other
> B is ,42 bit rounded up so here the error is already 1 for the A and
> ,58 for the B. Once we go to A ,75 and B ,25 the error again is the
> same and that half the time A is .25 or less or .75 or more so and it
> only gets worse when A is less than ,25 Example when A is .1 the length
> is over 3 bits for A and rouglhy ,15 bits for B so respective error for
> A over 2 full bits and roughly .85 bits for the B so clearly the average
> error is larger then .25 bits per symbol in the case.
>
> Of course this is not the only way to view this. Take a file of 999
> A's and 1 B the compressed would be 1000 for huffman and the sum of
> 1.442 for the A's and 9.967 for the B take (1000 - ( 1,442 + 9,967))/1000
> and you get by this method .989 bits of error based on length of compressed
> data so assuming max errors .5 per symbol is not true the rounding is
> not true.
Oh, I didn't looked at his example carefully enough, thanks for
pointing that out. His 0.25 result was based on his probablity
distribution assumptions (and flawed rounding trick). This ofcourse
varies depending upon file and model.
IMHO, his other comments were all fine and general, or did I missed
something there too?
Sachin Garg
.
- References:
- Still on the Arithmetic coder
- From: Learning_boy
- Re: Still on the Arithmetic coder
- From: Sachin Garg
- Re: Still on the Arithmetic coder
- From: Michael Schöberl
- Re: Still on the Arithmetic coder
- From: Sachin Garg
- Re: Still on the Arithmetic coder
- From: Michael Schöberl
- Re: Still on the Arithmetic coder
- From: Sachin Garg
- Re: Still on the Arithmetic coder
- From: David A. Scott
- Still on the Arithmetic coder
- Prev by Date: Re: QI and MQ Coder: First real-life experiences
- Next by Date: Re: Compressing log files and CPU load
- Previous by thread: Re: Still on the Arithmetic coder
- Next by thread: AVID NDxHD
- Index(es):
Relevant Pages
|