Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A126236
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A126236 Maximum length of a codeword in Huffman encoding of n symbols, where the k-th symbol has frequency k. +0
4
1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11 (list; graph; listen)
OFFSET

2,2

LINKS

Wikipedia, Article on Huffman coding

FORMULA

Conjecture: a(n) = floor(log2(n)) + floor(log2(2n/3)) where 'log2' means the logarithm to the base 2. Equivalently, a(n)-a(n-1)=1 if n has the form 2^k or 3*2^k and =0 otherwise. This is true at least for n up to 1000.

EXAMPLE

A Huffman code for n=8 is (1->00000, 2->00001, 3->0001, 4->001, 5->010, 6->011, 7->10, 8->11). The longest codewords have length a(8)=5.

CROSSREFS

Cf. A126014 and A126237. The minimum length of a codeword is in A126235.

Sequence in context: A130500 A072073 A061716 this_sequence A073047 A038567 A036234

Adjacent sequences: A126233 A126234 A126235 this_sequence A126237 A126238 A126239

KEYWORD

nonn

AUTHOR

Dean Hickerson (dean.hickerson(AT)yahoo.com), Dec 21 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 21 10:15 EST 2009. Contains 171081 sequences.


AT&T Labs Research