The familiar \(n \log n\) barrier is not a universal limit on computation. It arises in a particular setting: items are treated as opaque, the algorithm can learn about them only through two-outcome comparisons, and the task requires distinguishing among all possible orderings. A comparison provides at most one bit of information, while sorting \(n\) distinct items involves \(n!\) possible orders, whose information content is about \(n \log_2 n\) bits. Under those assumptions, sorting requires \(\Omega(n \log n)\) comparisons. The same reasoning does not apply automatically to every problem that processes \(n\) values.
Algorithms can beat that bound by changing the model or solving a task with a smaller answer space. Radix and bucket sorting exploit the internal representation or restricted range of keys rather than relying solely on pairwise comparisons. Direct indexing can replace repeated search when an index is available. Shortest-path algorithms need not sort every vertex, and integer multiplication has far fewer possible outputs than the number of permutations of its inputs. The discussion also distinguishes information-theoretic lower bounds from actual algorithmic guarantees: knowing that an answer requires a certain number of bits does not ensure each operation extracts those bits efficiently. Finding a maximum, for example, takes \(n-1\) comparisons even though its answer has only \(n\) possibilities, because each comparison may eliminate just one candidate. When a sub-\(n \log n\) result appears, the key question is which assumptions or task requirements have changed.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.