A balanced wavelet tree over "abracadabra": 217 bits
A balanced wavelet tree over "abracadabra": 217 bits
Every node is a bit vector: one bit per symbol still in play, saying which half of the remaining alphabet that symbol falls in. A rank for a symbol walks its code from the root, one bit-vector rank a level, and no symbol is ever compared with another. The whole structure is 33 bits of payload and 184 bits of directory and code table, over 11 characters and 5 distinct symbols.
Drawn at 700 × 244, wide on the page.
Everything above is what wavelet-tree returns with no arguments; the caption is the
generator's own, computed from the numbers in the drawing rather than written beside it.
6 essays call
wavelet-tree. The drawing above is what it returns with no arguments at all; every
call below passes it something, because a placement that passes nothing draws whichever
member of the family the generator happens to default to rather than the one its essay
argues about — which is what optcheck and figfill exist to catch.
Where it is called
Changing this generator changes every one of these figures.