How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Deterministic binary Huffman coding
Definition
Input: A finite full-support source as in Finite discrete sources and product blocks, with the symbols ordered .
Output: A binary prefix code on these symbols.
If , return the one-bit codeword .
If , make one active leaf for each source symbol , with weight and serial number . Repeatedly do the following while more than one node is active:
- Order active nodes lexicographically by (weight, serial number), using the ordinary order on real weights and then integer serials.
- Remove the first two nodes. Make a new parent whose left child is the first removed node and whose right child is the second, whose weight is their sum, and whose serial is the next unused integer.
- Insert this parent among the active nodes.
When one root remains, label every left edge and every right edge . The codeword for symbol is the edge-label sequence on the path from the root to its original leaf. The order by serial number fixes all ties and fixes the bit orientation. The same merge rule applies to any finite active list of positive weights carrying distinct serial numbers; the source input initializes the serials as , and each new parent receives a fresh serial.
For each , the algorithm executes exactly merges because each merge decreases the number of active nodes by one. The returned tree is finite. The next theorem proves the code is prefix-free and optimal; no complexity bound is asserted.
Depends on
Used by
Dependency tree · two levels
4 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.
Sources
- Stanford EE376A, Information Theory Course Notes, Chapter 4: Lossless Compression (standard reference, not scraped)
- MIT OpenCourseWare 6.450, Memory-less sources, prefix free codes, and entropy (standard reference, not scraped)