Skip to content

AI solves an 80 year-old Erdős problem.

By Keith Devlin @KeithDevlin@fediscience.org, @profkeithdevlin.bsky.social 

Much of the attention on uses of AI has focused of late on Anthropic’s Claude. In particular, Claude’s discovery of 23,000 potential security vulnerabilities across 1,000 Open Source Software products. With evidence like that, we should all assume that any publicly available software product we use has one or more security flaws. Claude is so darned good, that the US government (yes, THAT one, because of course) has banned its use by federal agencies and military contractors. See here for the sordid details.

Meanwhile, the original OpenAI chatbot ChatGPT (the one with Elon Musk as a co-founder) has just made major math news by solving an Erdős problem. And make no mistake about it, this is a real mathematical discovery; one that would be publishable in a leading research journal if it had been made by a human mathematician.

Like many Erdős problems, it is cute, quirky, easy to explain, and fiendishly difficult to solve.

Early on in my career, I sat in on a coffee-fueled, round-table discussion with Erdős and some of his colleagues in the Hungarian Academy of Sciences building in Budapest – having proved a consistency result for one of his problems – and he would throw them out like tossing a sugar cube into an espresso. Of course, many would be answered quickly, some might take one or more of his audience some effort, and others would rapidly fall to a counterexample. But every now and then, one would prove to be tantalizingly out of reach. The “Unit Distance Problem”, as it became known, was one of the latter kind. [See the footnote for more on my relatively brief Erdős experiences.]

The question is, if you mark N points on the plane, how many pairs of points can be a unit distance apart. Let g(N) be the largest number of pairs you can get.

For instance, if you have 9 points, you can put them in a straight line, and then you can identify 8 pairs that are 1-unit apart. 

But if you put them in a square 3x3 grid, you can identify 12 pairs (2 on each row and 2 on each column).

Well, that was easy. At which point, you likely think about it a few more minutes, and conclude that you essentially have your answer: an evenly-spaced rectangular grid gives you the maximum number.

But then – at least, if you are Erdős – you think a bit more. In 1946, he surmised that you might be able to do a (little) bit better if you had a smaller spacing between the points, so pairs could span several grid points. (Remember, the problem is for all values of N, as large as you please.)

By considering points in a square grid with carefully chosen spacing, he showed (using some sophisticated techniques) that g(N) could be made to exceed

N to the power 1 + c/ loglog(N)

for some constant c > 0. (He also showed that N to the power 3/2 is an upper bound for g(N).)

He conjectured that, for any positive epsilon, g(N) has a big-O of N to the power 1 + epsilon. (That is, g(N) is bounded by a fixed multiple of N to the power 1 + epsilon. Look up “mathematical big-O notation” if this is unfamiliar to you.)

As he often did, Erdős offered a small cash prize to anyone who proved or disproved his conjecture. Most mathematicians who looked at it assumed the conjecture was correct, and attempted to prove it. Without success.

But, in May of this year, an OpenAI chatbot disproved the conjecture by finding a “grid structure” such that, for all sufficiently large values of N, g(N) exceeds a fixed multiple of N to the power 1 + epsilon, where epsilon is approximately 6.24 x 10 to the power –38.

Instead of looking for a variation of a square grid, the program constructed a more elaborate grid in a kind of higher dimension. The higher-dimensional lattice of points it constructed had mathematical symmetries that facilitate the separation of even more pairs by the same distance. It then found a way to map this higher dimensional grid back down to two-dimensions, producing a flattened numerical “shadow.” The resulting structure is not remotely grid-like, and can’t be drawn on paper, even for a small number of dots. But it does provide a counter-example to Erdős’s conjecture.

The result has been evaluated and confirmed by a number of highly respected mathematicians, including number theorist Tim Gowers of Cambridge University in the UK.

According to the mathematicians involved in the search, it did take some work by actual, live, human mathematicians to clean up the chatbot’s output to create a proof readily accessible to human mathematicians. In particular, Princeton number theorist Will Sawin improved the chatbot’s bound to “epsilon is greater than 0.014.”

As a LLM, the AI was of course working with ideas and strategies that mathematicians had already explored (and written about). The crucial factor it brought to the problem was (1) working with the hypothesis that Erdős was wrong, and (2) being willing to put in the considerable effort to apply known approaches until it found a counter-example. If a grad student had done that, they would now be a celebrity.

USEFUL SOURCES

  1. The Wikipedia page on the Unit distance graph
  2. OpenAI announces AI’s biggest math breakthrough yet, Scientific American, May 21, 2026.

FOOTNOTE: FWIW, I did write a paper with Erdős (together with his lifelong colleague András Hajnal), but as an ambitious young set theorist, I thought I could improve the result, and in the end I never got round to finishing it off and submitting it to a journal as they had asked me to do. So I missed out on having an Erdős Number of 1, and had to settle for a 2. Ah, if only I had known … Sigh.