Anthropic is trying to solve P vs. NP now apparently (not exactly tho)
Recently, Anthropic has been making headlines within the math community. They formalized Fermat's Last Theorem in Lean recently, which is pretty cool. But this was already proven in 1995 by another mathematician, all tha
Recently, Anthropic has been making headlines within the math community. They formalized Fermat's Last Theorem in Lean recently, which is pretty cool. But this was already proven in 1995 by another mathematician, all that Claude did was describe the proof in a language, called Lean, that is built for that.
On August 10, they tried the challenge of solving the Riemann hypothesis. Do you know what the Riemann hypothesis is? I just read what it is. It says: "every nontrivial zero of the Riemann zeta function lies on the vertical line with real part 1/2. A zero is an input that makes the function equal zero." I don't even know where to begin, so we will figure it out in another article here in my writings.
Now, it seems that Anthropic is trying to solve P vs NP. Actually, not exactly, I clickbaited in the headline of this post. They are trying to prove VP vs VNP, and they just submitted a machine-checked proof claiming VP โ VNP, which is much different. But a lot of people are confusing it as the same thing as solving P vs NP. VP vs VNP question is "does a polynomial built by summing over exponentially many choices always have a short arithmetic recipe?" and P vs NP question is "if you can check a solution in polynomial time, can you also check if the solution exists in polynomial time?"
What is VP vs VNP more specifically?
Let's go by a concrete example. Calculating the permanent for a matrix is a VNP problem. VNP-complete, actually. Meaning, calculating the permanent is as hard as every other VNP class problem. Meaning again: if you calculate the permanent with a polynomial-size shortcut, of any n ร n table, you would have a shortcut of all problems in VNP.
What information does the permanent of a matrix give? Let's figure it out in this example below:
Let's say we need to organize three matches. Each player will face one opponent. This table below shows how many maps there are for each player-opponent pair.
| Available maps | Opponent 1 | Opponent 2 | Opponent 3 |
|---|---|---|---|
| Player 1 | 1 | 2 | 3 |
| Player 2 | 4 | 5 | 6 |
| Player 3 | 7 | 8 | 9 |
In how many ways can we set up the whole event, choosing the opponents and the maps?
First, fix one pairing. Say Player 1 faces Opponent 1, Player 2 faces Opponent 2, and Player 3 faces Opponent 3. The first match has 1 map choice, the second has 5, and for each of those choices the third has 9. That gives 1 ร 5 ร 9 = 45 setups for this pairing.
Do this for all six pairings:
| Opponents for Players 1, 2, and 3 | Map choices per match | Setups |
|---|---|---|
| 1, 2, 3 | 1 ร 5 ร 9 | 45 |
| 1, 3, 2 | 1 ร 6 ร 8 | 48 |
| 2, 1, 3 | 2 ร 4 ร 9 | 72 |
| 2, 3, 1 | 2 ร 6 ร 7 | 84 |
| 3, 1, 2 | 3 ร 4 ร 8 | 96 |
| 3, 2, 1 | 3 ร 5 ร 7 | 105 |
What this means is, each row describes a different pairing, and the final column is the amount of distinct setups for that pairing.
So, for the first row, for example, pairing Players 1, 2, and 3 with Opponents 1, 2, and 3 respectively gives 45 possible setups of map choices. For example, naming the maps A, B1 to B5, and C1 to C9, we could have the setup AB1C1 all the way up to AB5C9. So 45 map setups for that player opponent pairing.
When you sum all of them you get:
45 + 48 + 72 + 84 + 96 + 105 = 450
which gives the permanent of 450. Meaning, there are 450 ways to pair everyone up and choose a map for each match.
Is there a shortcut for calculating the permanent of this specific 3 ร 3 matrix?
There actually is:
An easy way to organize the calculation is to group the terms by Player 1โs opponent. Once you fix that match, there are only two ways to pair the remaining players.
| Player 1 faces | Calculation | Setups |
|---|---|---|
| Opponent 1 | 1(5 ร 9 + 6 ร 8) | 93 |
| Opponent 2 | 2(4 ร 9 + 6 ร 7) | 156 |
| Opponent 3 | 3(4 ร 8 + 5 ร 7) | 201 |
The shortcut actually saves a few operations:
a ร 5 ร 9 + a ร 6 ร 8 โ a(5 ร 9 + 6 ร 8)
The left side uses four multiplications. The right side uses three. For a general 3 ร 3 table, doing this for all three groups cuts the total from 17 arithmetic operations to 14.
But if you apply the same recipe to an n ร n table, you get n smaller tables to solve. Each of those gives you n โ 1 smaller tables, and so on. The branching still grows factorially. We saved three operations at size 3. A polynomial-size shortcut would have to keep the total below something like Cnk, with the same fixed C and k for every size. That is the shortcut they are looking for in the VP vs VNP problem.
With three players, we only had six pairings to go through. With four, there are 24. With ten, there are over 3.6 million. The recipe we just used goes through all n! pairings, so its cost grows faster than any polynomial in n.
Can we get the same exact answer using only, say, O(nยณ) or O(nยนโฐ) additions and multiplications? The exponent can be any fixed number. The recipe has to work for arbitrary tables, whatever numbers we put in the cells.
What does the Anthropic proof actually claim?
We got 450 for our three-match event, and grouping the terms saved us three operations. Now imagine doing this for bigger and bigger tournaments. Could some clever rearrangement keep the number of additions and multiplications below, say, Cnยณ? What about Cnยนโฐ?
Anthropicโs Claude-generated proof claims that every fixed exponent eventually falls short. More precisely, for sufficiently large n, even the smallest arithmetic circuit that computes the permanent of an arbitrary n ร n matrix over the real numbers needs more than Cnk gates, for any fixed C and k. So you can still find shortcuts like the one we used for our three matches. The claim is that no shortcut scales polynomially for the general problem.
So, about that headline. P vs. NP remains open. Proving P vs NP is a whole different beast than VP vs VNP. I think to sum it up, it looks like this: proving VP vs VNP is like hiking the second base of the Everest Mountain. Proving P vs NP is like hiking to the moon. Maybe I'm wrong about this but let's see in time.
The question Claude addressed in VP vs VNP was about the limits of arithmetic circuits. In Fermat's problem Claude translated a known proof into Lean. I'm no mathematician, but giving a quick look at these proofs, it seems that we didn't have them yet just because they were a huge "manual labour" of intellectual labour. In this case, I think it is a good thing we have AI for that, I guess?
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.