Sunday, November 08, 2026

Demaine-Gasarch-Hajiaghayi have written a book that is a sequel to Garey and Johnson

LANCE: You should take a break from all the AI stuff and talk about your book!

BILL: I will!  But it's not my book its co-authored with Erik Demaine and Mohammad Hajiaghayi. The title is

Computational Intractability: A Guide to Algorithmic Lower Bounds

LANCE: That sounds similar to Garey and Johnson's classic

Computers and Intractability: A Guide to the Theory of NP-Completeness

BILL: Indeed. DGH is a sequel to Garey and Johnson.

LANCE: But so much has happened since 1979.

BILL: Yes. That's why the book is over 500 pages and still does not cover everything since 1979.

LANCE: So what IS in the book?

BILL: The main question that drives complexity theory (and many other fields) is the question:

                Given a problem, how hard is it?

LANCE: Oh, You mean like P and NP!

BILL: Yes, but there is more! We cover P and NP: Many problems are proven NP-complete. Some are on Puzzles and Games. 

Examples of NP-Complete Problems that you might not have heard of

Disk Packing: Given a set of disks and a target square, can you place the disks so that they do not overlap and all of their centers lie within the square? This is Strongly NP-hard. 

Mate-in-1: Given a position in Settlers of Catan, can the player who is about to go win? This is NP-complete

Losing Checkers: Given a position in Checkers, is there a move that forces your opponent to win? This is  NP-complete. This is an important problem in case you play Checkers with a  Wookie, see here.

Super Mario Brothers and Many other Nintendo Games: Given a position in the game, and a level, can the player get to that level? This is NP-complete. (There are versions that are PSPACE-complete and versions that are undecidable)

Some use the machinery developed since G & J to show lower bounds on approximation:

VC with vertices of degree \(\le 3\): If there is a polytime \((\frac{145}{144}-\epsilon)\)-approx then P=NP.

We have a chapter on the Unique Games Conj--uh, uh, Theorem. 

We look BELOW NP: 3SUM-hardness, APSP-hardness (these are both a bit outdated), streaming algorithms, online algorithms, others.

We look ABOVE NP: #P, ETR,  

LANCE: What's ETR?

BILL: Existential Theory of the Reals is the following problem: Given a sentence of the form 

\((\exists x_1)(\exists x_2)\cdots(\exists x_n)[ C_1 \wedge \cdots \wedge C_k]\)

where each \(C_i\) is a polynomial equality or inequality in \(x_1,\ldots,x_n\)

is this sentence, with the quantifiers going over the reals, true?

Tarski proved ETR is decidable. ETR is known to be NP-hard and is thought to be harder than NP. 

A problem is ETR-complete if it is equivalent to ETR. This is a way to classify some problems that involve reals that were hard to classify with more traditional classes. For example, the Art Gallery Problem (how many guards do you need) is ETR-complete

LANCE: What else do you have that's above NP? 

BILL:  Poly Hierarchy, PSPACE, and even undecidability.

LANCE: Are there really NEW results about undecidability?

BILL: There are some video games where questions about winning are undecidable. I doubt Turing knew that. One of them is called braid (see here).

LANCE: Don't you have whole chapters devoted to the now-defunct Exponential Time Hypothesis and the 3-SUM conjecture?

Bill: Also the APSP conjecture. Are these now-defunct conjectures still worth studying? I did a blog post on that here. Do you read my blog posts?

LANCE: Do you read mine?

BILL: Fair point.

LANCE: Despite having three chapters obsolete, the rest of the book sounds great. Where can I get it?

BILL: You can buy it on Amazon, see here. You can buy it at MIT press here. You can download a prior draft here. 

Wednesday, November 04, 2026

Another Step Towards Optiland

When the Clay Mathematics Institute announced the Millennium Prize Problems back in 2000, we joked that if you proved P = NP, you wouldn't only get the $1 million prize for solving P v NP, but you would get $7 million since you could use P = NP to solve the rest.

In theory, if P = NP, then you could efficiently find the proof of any theorem, provided its formal proof was not too long. In practice, we don't have P = NP, and back then we didn't even have a good way to formalize a proof. Fast forward to today and we have a computer generated formalized proof of Navier-Stokes and a number of other important problems.

In my 2022 CACM article, I argued that we were heading towards Optiland, where we got all of the goodies of P = NP, without losing cryptography. But some challenges remained.
Machine learning seems to fail learning simple arithmetic—for example, summing up a large collection of numbers or multiplying large numbers. One could imagine combining machine learning with symbolic mathematical tools. While we’ve seen some impressive advances in theorem provers, we sit a long way from my dream task of taking one of my research papers, with its informal proofs, and having an AI system fill in the details and verify the proof.

I failed to imagine that in less than five years AI models would not just fill in the details of my proofs but find the proofs themselves.

Still plenty of math problems that AI hasn't solved, including P v NP itself. I've given up predicting what AI will prove next, though I still believe P v NP requires new techniques that AI won't come up with on its own.

I watch discussions on whether we could find some version of the ETH-refutation algorithm that would help solve SAT problems in practice. Spoiler alert: It will never beat CDCL.

We are running out of examples of real-world problems we still need P = NP to tackle. Outside of breaking codes, what could you do with P = NP that you couldn't do today using other means?

Sunday, November 01, 2026

3SUM and APSP and ETH, Oh My!

(Throughout this post I will assume that the recent results by OpenAI and Anthropic contain correct proofs of what they claim.)

I wrote the following about 2 years ago but did not post it. It's dated, but that's the point.

BEGIN DOCUMENT FROM TWO YEARS AGO

Why do we think \(P\ne NP\)?

a) Lots of people have worked on SAT and other NP-complete problems, without getting them in P.  This is not mathematical evidence but it is worth noting.

b) If SAT is in P then all problems in NP are in P.  This implication is one reason I think \(P\ne NP\) is true.  I find this more compelling than (a), though it's still not a proof.

c) Just my opinion: I think SAT is not in P.

-------------------------

3SUM is the following problem: Given integers \(a_1,\ldots,a_n\) is there a triple of indices \(i< j < k \) such that \(a_i + a_j + a_k = 0\)?  There is a clever algorithm for this problem that takes \(O(n^2)\) time. It is conjectured that 3SUM has no subquadratic algorithm (that is, for every fixed \(\epsilon>0\) there is no \(O(n^{2-\epsilon})\) algorithm). (My spellcheck doesn't think subquadratic is a word. Are they right?) 

This conjecture is widely believed. There is a notion of 3SUM-hardness and 3SUM-completeness.  \( A \le B \) if there is a linear time function \(f\) such that \(x\in A\)  iff \(f(x)\in B\).  A problem \(A\) is 3SUM-complete if both \(A\le 3SUM\) and \(3SUM \le A\).

There are around 15-20 3SUM-complete problems.  Either they are all subquadratic (which includes 3SUM being subquadratic) or none are subquadratic.  Given the conjecture, none of them are subquadratic.  That is the common belief.

Why do we think 3SUM has no subquadratic algorithm?

a) Lots of people have worked on 3SUM without getting it into subquadratic time.  This is not mathematical evidence but it is worth noting.

b) Darn! There is no Cook-Levin-type theorem for 3SUM.

c) Just my opinion: I think 3SUM is not subquadratic. I only wish there were a Cook-Levin-type theorem for this belief. I doubt this is possible.

--------------------------

APSP (All Pairs Shortest Paths) is the following problem: Given a weighted graph \(G\), find, for all pairs, the cost of the shortest path.  There is an \(O(n^3\)) algorithm for APSP. It is widely believed that there is no subcubic algorithm for APSP (that is, for every fixed \(\epsilon>0\) there is no \(O(n^{3-\epsilon})\) algorithm).  This conjecture is widely believed. There is a notion of APSP-hardness and APSP-completeness.  \( A \le B \) if there is a linear time function \(f\) such that \(x\in A\) iff  \(f(x) \in B\).  A problem \(A\) is APSP-complete if both \(A\le APSP\) and \(APSP \le A\). (My spellcheck doesn't think subcubic is a word. Are they right?)

There are around 15-20 problems that are APSP-complete.  Either they are all subcubic (which includes APSP being subcubic) or none are subcubic.  Given the conjecture, none of them are subcubic.  That is the common belief.

Why do we think APSP has no subcubic algorithm?

(a) and (b) similar to that for 3SUM. I state (c)

c) Just my opinion: I think APSP is not subcubic. I only wish there were a Cook-Levin-type theorem for this belief. I doubt this is possible.

---------------------------

ETH (Exponential Time Hypothesis) Not only is 3SAT not in P but 3SAT on \(n\) variables requires \(2^{\Omega(n)}\) time.  ETH is widely believed.

Informally, if ETH is true, and \(A\) is NP-complete by a linear reduction, then \(A\) requires exponential time. There are many such NP-complete problems.

(a) and (b) similar to that for 3SUM. I state (c)

c) Just my opinion: I think 3SAT requires \(2^{cn}\) time for some \(c\).  I only wish there was a Cook-Levin-type theorem for this belief. I doubt this is possible.

END DOCUMENT FROM TWO YEARS AGO

Three of my favorite hardness assumptions had a bad month. I'm glad the Unique Game Conjecture was proven true so I am 1-for-4 rather than 0-for-3 (if it were still open) or 0-for-4 (if it was refuted).

1) Anthropic has obtained an \(O(n^{1.9992})\) algorithm for 3SUM.  Darling thinks this result is hilarious.

A writeup of this by J. Alman and V.V. Williams is here.  

2) Anthropic has obtained an \(O(n^{2.9995})\) algorithm for APSP with integer weights (with no negative cycles).  Darling, thinks this result is hilarious. (Spell check thinks Antrhopic is a word. Are they right?) 

The same writeup in item (1) also contains this result.

3) OpenAI has obtained a \(2^{O(n\log\log n/\sqrt{\log n})}\) algorithm for 3SAT Darling thinks this result is hilarious. I agree with her. (My spellcheck things OpenAI is not a word. Are they right?)

OpenAI's announcement is here.

Lance blogged about it here.

So now what?

0) All of these results are being looked at by experts.

1) 1.9992 is close to 2. And we still think 3SUM can't get that much better. could conjecture that, for every fixed \(\epsilon\), there is no \(O(n^{1.5-\epsilon})\) algorithm for \(3SUM\).

Assuming the conjecture, for every fixed \(\epsilon\), for every 3SUM-complete problem \(A\) there  is no  \(O(n^{1.5-\epsilon})\) algorithm for \(A\).

At least until AI gives an \(O(n^{1.499999})\) algorithm for 3SUM.

2) Similar for APSP and, say, \(O(n^{2.5})\).

3) ETH. Replace with the following: there exists \(0<c<1\) such that there is no \(O(2^{n^c})\) algorithm for \(3SAT\). Or something else like it.

4) We can Regard this as good news. All of those problems that are 3SUM-complete are now known to have subquadratic complexity. Similar for APSP and ETH. Yeah(?)