Can a Shattered Glass Prove P ≠ NP?

Knock a wineglass off the table and it is gone in a fraction of a second. Gluing it back together, if you are patient enough to try, takes an afternoon. Nobody has ever watched the shards on the floor leap up and fuse into a glass.

That asymmetry is so familiar that it is easy to miss how strange it is, and it invites a bold idea. Computer science has its own famous asymmetry: for many problems, checking a proposed answer is easy, while finding one seems brutally hard. Whether that gap is real — whether P, the problems that can be solved quickly, differs from NP, the problems whose answers can be checked quickly — is the deepest open question in the field. So why not let physics settle it? The argument would go something like this:

  1. Reassembling the shards is like solving a hard problem.
  2. Confirming that the reassembled object is the original glass is like verifying an answer.
  3. A whole glass and a pile of shards differ in entropy, and the second law of thermodynamics says the entropy of an isolated system never decreases.
  4. Therefore solving is fundamentally harder than verifying, and P ≠ NP.

As a proof, this doesn’t work. The more interesting question is where the intuition behind it breaks and where it holds. “Easy forward, hard backward” turns out to be one of the most productive ideas in theoretical computer science. It just lives in a different place than the broken glass.


Fast to check, slow to find

Complexity theorists study decision problems, questions with a yes-or-no answer, and they measure difficulty by how the number of computational steps grows as the input gets larger.

A problem is in P if some algorithm answers it in a number of steps that grows like a polynomial in the input size \(n\) — like \(n^2\) or \(n^3\). Testing whether a number is prime belongs here, as do yes-or-no versions of everyday tasks such as sorting a list or finding the shortest route on a map.

A problem is in NP if, whenever the answer is “yes,” there is a certificate — a piece of evidence — that can be checked in polynomial time. A sudoku is the standard example: a filled-in grid takes seconds to verify, but filling one in can be hard. Anything in P is automatically in NP, since if you can solve a problem quickly you can certainly check an answer quickly. The question is whether the converse holds.

The hardest problems in NP are called NP-complete. They are tied together so tightly that a fast algorithm for any one of them would yield a fast algorithm for all of NP. The best-known example is 3-SAT. You are given some true-or-false variables and a list of rules, called clauses, each of the form “at least one of these three statements holds” (for example, “\(x\) is true, or \(y\) is false, or \(z\) is true”); the question is whether some setting of the variables obeys every clause at once. Most researchers believe P ≠ NP; nobody has proved it, and it is one of the Clay Mathematics Institute’s seven Millennium Prize Problems, each carrying a million-dollar prize.

The difference between polynomial and exponential is not a technicality. At \(n = 100\), an algorithm taking \(n^3\) steps finishes a million operations in a blink. One taking \(2^n\) steps needs about \(1.3 \times 10^{30}\) operations; at a billion per second, that is some 40 trillion years, nearly 3,000 times the current age of the universe.


Entropy is a way of counting

Ludwig Boltzmann gave entropy a statistical meaning, usually written

\[S = k_B \ln W,\]

where \(W\) is the number of states that fit a given description of a system and \(k_B\) is Boltzmann’s constant, a conversion factor that puts the count into the units of heat and temperature. The more ways there are to be in a condition, the higher its entropy.

For the glass, the natural states to count are the arrangements of the pieces. There is essentially one way for the pieces to form a whole glass and an astronomically large number of ways for them to lie scattered across the floor. Anything that knocks the pieces around at random, whether the impact, a kick or a sweep of the broom, is overwhelmingly likely to leave them in that enormous set of broken arrangements and essentially never in the single whole one. This is why a glass breaks by accident but never mends by accident, and it is the same counting that underlies the second law of thermodynamics, which says that an isolated system does not spontaneously move to a condition with fewer states, except through fluctuations so improbable that they are never seen. (Thermodynamics proper counts the states of molecules rather than of shards, but the logic of counting is the same, and for the sake of argument the analogy can be granted.)


Where the analogy breaks

Counting is not hardness. The glass intuition rests on a single fact: the goal is one arrangement among astronomically many. A sorted deck fits that description too, since it is one ordering out of \(52! \approx 8 \times 10^{67}\), yet sorting \(n\) cards takes only about \(n \log n\) comparisons, a few hundred for a full deck. Sorting is an imperfect comparison, because you know the target order in advance, whereas the right arrangement of the glass is unknown until you find it and check that it makes a glass. But problems with exactly that feature can be easy too. In 2-SAT, the version of 3-SAT in which every clause mentions only two variables, there are \(2^n\) possible settings and a working one is unknown until you check it against every clause, yet a computer can find one in polynomial time.

The glass itself is another example. In 2007 Erik and Martin Demaine of the Massachusetts Institute of Technology proved that generalized jigsaw puzzles are NP-complete, but the hardness comes from ambiguity: many pieces with tabs and pockets of the same shape, so that whether a piece belongs in a spot can only be judged against the whole picture. In an idealized broken glass, every fracture edge fits only its true partner, and trying pieces two at a time assembles it in polynomial time. What makes a problem hard is not how many arrangements there are, but whether it has some structure, like edges that fit only one partner, that lets an algorithm avoid searching through them all.

The second law counts direction, not steps. The law tells you which way things tend to go and how likely each outcome is; the difference between P and NP is entirely about how many steps it takes. Nor is the solver an isolated system, one that exchanges no energy or matter with its surroundings: a person or a computer piecing the glass together burns energy and dumps heat into the room, so the pieces can become more ordered while the total entropy rises, as it does in every refrigerator. The closest thing thermodynamics has to a price for computing is Landauer’s principle, proposed by Rolf Landauer of IBM in 1961: erasing one bit of information must release at least \(k_B T \ln 2\) of heat, where \(T\) is the temperature, about \(3 \times 10^{-21}\) joule at room temperature. But in 1973 his IBM colleague Charles Bennett showed that any computation can be made logically reversible, so that every step can be run backward and no information is ever thrown away. Run slowly enough, a reversible computation can in principle dissipate as little energy as you like, and it is only polynomially slower than the original. With no minimum energy per step, thermodynamics puts no floor under the number of steps, so it cannot see the line between P and NP.


Where the intuition holds

The feeling that some things are easy to do and hard to undo is not an illusion. It has been made precise in three places.

Cryptography. Here the idea is called a one-way function: a function that is quick to compute but that, for a randomly chosen input, no efficient algorithm can invert except with negligible probability. The classic candidate is multiplying two large primes. Multiplying is fast, while recovering the primes from their product, called factoring, has no known polynomial-time method on ordinary computers. (A large quantum computer could factor efficiently with Shor’s algorithm, which is why cryptographers are moving to other candidates.) Secret-key encryption and digital signatures can be built from any one-way function. If one-way functions exist, then P ≠ NP, but as far as anyone knows the reverse does not follow: P ≠ NP promises only that some instances are hard, while cryptography needs instances that are hard when picked at random, and a way to generate them together with their solutions, the way a lock-maker keeps the key.

Compression. The Kolmogorov complexity of a string is the length of the shortest program that prints it. The string “01” repeated a million times has a short description; a typical random string does not. Averaged over the outputs of a random source, Kolmogorov complexity roughly equals the source’s Shannon entropy, the average number of bits needed to encode each output, so it acts as the entropy of a single object. In 2020 Yanyi Liu and Rafael Pass, then at Cornell, proved that one-way functions exist if and only if every efficient algorithm that tries to compute a time-limited version of Kolmogorov complexity gets it wrong on a noticeable fraction of strings. In plain words, secure cryptography is possible exactly when it is hard to tell how compressible a typical string is: the link between entropy and hardness, made into a theorem.

The physics of hard instances. Physicists have applied energy, entropy and phase transitions (abrupt changes in behavior, like water freezing) to NP-complete problems, not to decide whether P equals NP but to explain which instances are hard. Generate a random 3-SAT formula with \(\alpha\) clauses per variable. Physics calculations, backed by experiments, put a sharp threshold near \(\alpha \approx 4.27\): below it, large formulas almost always have a solution; above it, almost never; and search algorithms struggle most right at the boundary. In 2002 Marc Mézard, Giorgio Parisi and Riccardo Zecchina found that just below the threshold the solutions break apart into an enormous number of clusters far from one another, much like the frozen states of a glass, and from that picture they built an algorithm, survey propagation, that solves random instances with a million or more variables near the threshold. Clustering alone does not make a problem hard, though. Random XOR-SAT, in which each clause says whether an odd or an even number of its variables are true, shows the same clustering yet is solved in polynomial time by Gaussian elimination, the method for linear equations taught in algebra classes. That was one of the first objections raised against a widely publicized claimed proof of P ≠ NP in 2010, which leaned on the clustering picture.


Turning the argument around

The most interesting idea in this area runs the glass intuition in reverse. In a 2005 survey, Scott Aaronson, then at the Institute for Advanced Study in Princeton, proposed treating computational hardness as a physical principle in its own right, like the second law or the impossibility of sending signals faster than light: no physical process solves NP-complete problems efficiently.

He examined schemes that claim to, from soap films and protein folding to quantum computers and time travel. Many fail. In his own experiments, soap films often settled into an arrangement that small changes could not improve rather than the true optimum, and quantum computers are not believed to solve NP-complete problems efficiently. But a few schemes would work if their physics were real. In 1998 Daniel Abrams and Seth Lloyd showed that even a slight nonlinearity in the equations of quantum mechanics, which as far as experiments can tell are exactly linear, would make NP-complete problems easy. In 2009 Aaronson and John Watrous showed that a computer using closed timelike curves, paths through spacetime that loop back into their own past, could solve problems believed to be far harder still. Aaronson reads such results as evidence against the physics: if a theory lets you solve NP-complete problems cheaply, that is a reason to doubt the theory. Hardness is not derived from physics here; it is proposed as a rule that physical theories must obey.


A picture, not an explanation

The broken glass does not explain why some problems are hard. Its intuition rests on counting, and counting alone cannot tell sorting a deck, or reassembling an idealized glass, from 3-SAT. It also leaves a useful test for any argument that something is intrinsically hard, the question it fails itself: would this argument also make sorting, 2-SAT or XOR-SAT hard? If it would, it is wrong.

What the glass does capture is the shape of an idea, easy to do and hard to undo, and that idea is real: it has become cryptography, a theorem about compression and a physical picture of where hard instances live. Beneath it lies an older asymmetry, between recognizing and making. A good proof or a good piece of music is far easier to appreciate than to produce, and that experience is one of the reasons most researchers believe P ≠ NP. Scott Aaronson has called it the philosophical argument: if P equaled NP, anyone who could appreciate a symphony could compose one. That, too, is an intuition rather than a proof. Whether finding is fundamentally harder than recognizing is the question P versus NP makes precise, and it remains open.


Sources




Enjoy Reading This Article?

Here are some more articles you might like to read next: