报道正文
本文目录11 个章节
(Updated: Tuesday, Nov 24, 2026), Nov 23, 2026 Section: Home / Post Categories: Computer Science, Tags: Algorithms, Entropy, Information Theory,AI assistance: AI synthesis from notesSynthesized and drafted by AI from the author's own notes, ideas, and code, then reviewed by the author.
- None
- AI review
- AI x human co-authors
- AI synthesis from notes
Epistemic status: HighWell-established best practice or backed by strong empirical testing and production experience.
- Log
- Speculative
- Medium
- High
- Certain

Piercing the black box to break through the barrier.
Recently, headlines have kept making the rounds about sub- algorithms—first Duan et al. breaking Dijkstra’s sorting barrier for directed shortest paths, and then a preprint claiming sub- integer multiplication.
My first reaction was skepticism. If a problem cares about ordering items, don’t you need steps to uniquely place each item, repeated times? That gives . How could you possibly do better?
The short answer is that is not a universal speed limit. It is the lower bound of a specific model of computation. To see how algorithms beat it, we need to look at what actually measures—and which assumptions those algorithms drop.
Think of sorting items as routing each item down a decision tree into its final slot.
If you are only allowed to take 2-way comparison steps (< or >), every fork in the tree has 2 branches. Each step cuts the remaining slots in half. To route one item to its unique leaf among slots, it has to travel down roughly levels.
Send all items down a tree of depth , and you pay total steps.
The 2-Way Tree
Every item drops through log2 n yes/no forks (< vs. >) to reach its sorted slot.
Items (n): 8Click Step Item or Play to route items down the 2-way tree. 0 / 8 routedBranching factor (k) 2 1 bit / stepTree depth 3 log₂(8) = 3Steps (this item) 0 waitingTotal steps 0 / 24 n · log₂ n
The Hidden Assumptions
That intuition feels airtight: if characterizing or placing a single item among slots takes steps, and there are items to process, then any task requiring ordering or classification across items seems forced to pay . Under two specific conditions, that reasoning is airtight:
- Black-box items: You cannot peek inside an item. Your only tool is a 2-way yes/no step (like
is a < b?) that yields at most 1 bit of information per step. - Factorial-scale outcomes: The number of possible final answers grows like (or )—meaning each of the items could end up in one of roughly distinct roles or positions. Not every task on items has that many outcomes: finding the maximum has only possible answers and assigning yes/no labels has , compared to orderings for sorting.
How Existing Algorithms Break
Counterexamples already exist in every algorithms textbook. Two classic ones—Bucket Sort and Radix Sort—sort numbers in time when the numbers come from a bounded range or fixed digit width:
- Bucket Sort computes a bucket address directly from each number’s value, drops the item straight into that bucket in a single step (when numbers map cleanly into slots, that is a direct -way lookup), and then reads the buckets back in order.
- Radix Sort processes numbers one digit at a time. In Most-Significant-Digit (MSD) Radix Sort, 3-digit numbers are first routed into 10 buckets (
0–9) by their hundreds digit; only buckets holding more than one item are split again by their tens digit, and so on—without ever comparing two numbers against each other.
Neither algorithm breaks mathematics. Both drop the black-box assumption—and flatten the tree.
Imagine lining up 30 kids by birth month. If you treat them as black boxes and only compare pairs of kids (“who was born earlier?”), you are stuck with a 2-way tree of depth . Instead, put 12 labeled boxes on the floor (Jan through Dec). Each kid looks at their own birth month and walks straight to their box in one step.
Computers can do the same thing because numbers aren’t opaque black boxes—they are digits and bit patterns, and hardware can jump directly to a memory address in a single step. Direct indexing widens the branching factor all the way to , collapsing the tree to depth 1. MSD Radix Sort makes the intermediate case just as clear: it routes the exact same items down a tree, except each node has 10 branches (0–9) instead of 2, flattening the depth from down to the number of digits—with zero comparisons. (As we will see next, when numbers are allowed to grow arbitrarily large with , escaping asymptotically requires choosing the branching factor as a function of rather than keeping it fixed at 10.)
Flattening the Tree
The exact same 8 items—widening the branching factor k flattens the tree with zero comparisons.
Click Step Item or Play to watch every item jump straight to its slot in 1 step. 0 / 8 routedBranching factor (k) n = 8 3.00 bits / stepComparisons made 0 direct address jumpSteps (this item) 0 waitingTotal steps 0 / 8 exact O(n) = 8 (vs 24)
The Information-Theoretic View
Why does widening the branching factor break , and when is a lower bound truly unavoidable? Information theory puts both assumptions into a single equation.
In an earlier post on entropy, I framed entropy as the minimum number of binary choices (bits) needed to describe categories of events:
That same lens gives us a hard floor for any algorithm.
Let be the total number of possible final answers to a problem—a function of the input size , not itself. When every answer is equally likely (the worst case, ), the entropy of the answer space simplifies to:
From Input Size n to Answer Space N
The same n input items produce vastly different numbers of possible final answers N depending on the task.
Input size (n): 3Input (n = 3):Find Max N = nN = 3 · H(N) = 1.58 bitsLabel Yes / No N = 2nN = 8 · H(N) = 3.00 bitsSort All Items N = n!N = 6 · H(N) = 2.58 bits
Why is a hard floor for 2-way steps? Let be the number of 2-way (yes/no) steps an algorithm takes. Those steps can produce at most distinct transcripts of answers. If , at least two different final answers must share the exact same transcript, and no algorithm can tell them apart. Therefore:
Why 2q ≥ N Is a Hard Floor
Sorting n = 3 items (A, B, C) has N = 3! = 6 possible answers. Each leaf is one transcript of Y/N answers.
q = 2 steps → 22 = 4 < 6 Fungible answers
Only 4 transcripts exist for 6 orderings—at least two distinct answers share an identical Y/N history and become fungible.
q = 3 steps → 23 = 8 ≥ 6 All 6 separated
With 3 steps (⌈log2 6⌉ = 3), 8 transcripts give every single ordering its own unambiguous leaf.
Where does the in come from? Logarithms turn multiplication into addition:
- When each item has 2 outcomes (), taking the log yields —linear, with no .
- When all items can be ordered in ways, you are multiplying factors that grow with . Taking adds up , which lands at roughly .
Now look at what happens when you widen each step’s branching factor to . Remember from the entropy post that the base of the logarithm corresponds to how many outcomes a single step can distinguish, so -way steps yield transcripts:
Notice a crucial distinction here. Any constant -way step only differs from a 2-way step by a constant factor (): a fixed 10-way decimal lookup trims the work by , and a fixed 256-way byte lookup trims it by , yet as grows without bound (and distinct numbers need at least digits), both stay locked to forever.
To actually escape , must be a function of (for example, or ). Once scales with as , cancels the in , so the total number of steps is only off from a one-shot -way lookup by a constant factor ()—that is, linear . Radix Sort achieves this when its base is chosen relative to the size and range of the numbers (e.g., or ): we are using the numerical value of the input itself to inform the algorithm’s addressing, piercing the black box.
Constant k vs. n-Dependent k
Any fixed branching factor k stays locked to binary sorting by a constant ratio; letting k grow with n breaks away into linear O(n).
Inspect n: 10,000
Entropy Is a Floor, Not a Guarantee
One important nuance: having bits of entropy does not guarantee you can solve a problem in steps (or steps with a -way step).
Compare searching a sorted list against finding the maximum of an unsorted list. Both have possible answers, so both have the exact same entropy: bits. Yet finding the max takes comparisons, because each step only knocks out one loser—it cannot cut the remaining candidates in half.
More generally, to reach steps with a -way step over possible outcomes, each step must partition the remaining candidates symmetrically (evenly) into disjoint buckets of roughly outcomes. That is what lets every step shrink the answer space by division () and extract the full bits toward the answer.
When a step is asymmetric—say, checking “is item the target?” on an unsorted list, where one branch isolates $1N - 1N \to N - 1\log_k NNN - 1$ candidates alive either way because the remaining information is spent on relative order we do not need. You only hit the entropy floor when the problem’s structure lets each step carve the remaining answers into roughly equal, disjoint fractions.
Bringing It All Together
Every complexity claim sits on two axes: how fast the answer space grows, and how much information a single -way step can extract.
| Problem | Answer space () | Entropy floor () | Black-box 2-way steps | Breaking the black box |
|---|---|---|---|---|
| Look up a known index | $1$ | $0$ | $0$ (1 direct read) | |
| Search a sorted list | (with hash/direct index) | |||
| Find max (unsorted) | (still must inspect all) | |||
| Label each item yes/no | ||||
| Sort items | (Radix / Bucket sort) | |||
| Recover an binary grid |
The Floor Explorer
Combine how fast the answer space N grows with how many bits one k-way step extracts.
- Outcomes per item (sets N and H(N)) 2. Branching factor k (outcomes per step) Floor =log₂(n!) ≈ n · log₂ n1≈O(n log n)8,530 min steps at n = 1,000The log₂ n factors cancel — leaving linear O(n)!Answer space N n! factorial orderingsEntropy H(N) at n = 1,000 8,530 bits log₂(n!) ≈ n log₂ n − 1.44nInfo per step 1.00 bit/step 2-way fork2-way baseline8,530 stepsSelected k8,530 steps
So whenever you see a headline announcing a sub- algorithm, there are only two ways it happened: either the problem never actually had a factorial-scale answer space in the first place (computing shortest-path distances doesn’t require sorting every vertex, and multiplying two -bit integers only has possible outputs—an entropy floor of , never ), or the algorithm found a way to look inside the box and widen the branching factor with .