Universal Codes for Integers

LA home
Computing
  Universal
also see
 the report

Implemented: Fibonacci code, Elias's omega code, our omega2 & omega* extensions, and Wallace Tree Code both the lexical (WTC) and the recursive (WTCr) versions [www]. You can select the support, integers N≥0 or N≥1.

N=
Fibonacci code N ≥
Elias omega
omega2
omega*
Wallace Tree (lexical)
Wallace Tree (recursive)
Code-Word:

Note that if you encode with one code and decode the result with another code you will get rubbish.


Some other of bigInts.
And compare code-word lengths or .  

— L. A., 13 June 2019.


Examples

where |CW| = code-word length.

Cummulative

w Fibonacci Elias ω WTC
1 0 0.5 0.5
2 0.25 0.5 0.5
3 0.375 0.75 0.625
4 0.5 0.75 0.625
10 0.859 0.875 0.754
100 0.999... 0.947 0.920
1000 -"- 0.957 0.975
10000 -"- 0.963 0.992
100000 -"- 0.9688 0.997
1000000 -"- 0.9692 0.9992
N s.t. |codeword(N)|≤w p(N)
cummulative probabilities upto code-word length w (bits).

Comparative code-word lengths

code-word lengths, early points of change of the lead.

www:

↑ © L. Allison, www.allisons.org/ll/   (or as otherwise indicated).
Created with "vi (Linux)",  charset=iso-8859-1,   fetched Monday, 16-Sep-2019 03:24:28 EDT.

Free: Linux, Ubuntu operating-sys, OpenOffice office-suite, The GIMP ~photoshop, Firefox web-browser, FlashBlock flash on/off.