81 comments

[ 2.8 ms ] story [ 106 ms ] thread
This is IMO, by far, the most important problem of computer science. I often wonder whether I will live long enough to see it settled one way or the other. In any case, definitely recommended reading.
Would proving P != NP have any interesting implications? I know P = NP would, but was just curious if P != NP would mean anything other than "well, now we know we can't do it in polynomial time."
Not too much, especially since for the most part the world has gone ahead betting on P!=NP

But the techniques used would likely be insightful. Particularly with proving cryptographic protocols beyond "we had a contest & damn are these bits ever uncorrelated"

Even proving P=NP would not necessarily have any practical applications. Practicality is typically not a concern in complexity theory. Even some problems that have been shown to be in P are still usually solved with non-polynomial algorithms (Linear Programming).
Yeah there is no guarantee any proof would even show you how to create a polynomial algorithm for some NP problem. It could just show some logical contradiction that happens if P=NP is false.

Or obviously even if the proof does show you how to do it but the exponent is some insanely large number (see some of Scott Aaronson's other articles about "busy beaver numbers"), then that does not change anything practically either.

I disagree. If P=NP, then we could very well start searching the space of polynomial algorithms until we find something that works and discard anything that is not polynomial - which we can check apriori since the halting problem assumes we can't peak into the Turing machine, when in practice, we can.
Even knowing a polynomial algorithm for SAT would not have practical implications unless the algorithm has a reasonable run time. Matrix multiplication is a great example of a problem where the best known runtime complexity algorithms are not used even though for matrixes the size of the universe they would be faster.
I don't disagree, but it may also help in getting tighter bounds on algorithms, iirc Matrix Maltiplication doesn't have a tight Omega function.

Also, finding such algorithms should significantly expand our capabilities by expanding our understanding.

Couldn't we assume P=NP and try this anyways?
I mean, you could do that, but knowing it exists makes the search worthwhile.
When most people are taught algorithms, it's done so in a way that seems to emphasize that algorithms in "P" are very fast--I doubt many people have encountered an algorithm worse than O(n^3) that's still polynomial--and the "NP" algorithms are very slow, and this gives strong rise to a solution in "P" must necessarily be better than one that is "NP". Even when complexity classes are introduced, and there's a segment on "you know, you're ignoring constant factors which could be really big," there's still no practical experience with cases that do have big constant factors.

Let me give an example where such a case exists. In 2005, a paper came out finding an algorithm for determining undirected graph connectivity in log space, which means you can't keep an unbounded stack of nodes that you have visited (as the trivial depth-first or breadth-first search algorithms do). This algorithm relies on converting the input graph using an "expander graph," basically replacing every node with an instance of a graph. When I computed how large an expander graph had to be, I found that the smallest one was ... 3^65536. It's still a constant factor, but it's larger than the number of atoms in the universe. This kind of constant factor isn't unusual for combinatorics problems (this is the same kind of space where Graham's number comes up).

My suspicion is that if P=NP, it's likely to be so only via this kind of crazy combinatorial input, which is to say, the P algorithm is completely impractical.

Outside of combinatorial algorithms, there are several other cases where the asymptotically faster algorithms are generally disfavored due to practical concerns: primality testing (AKP is a P algorithm, but slower in practice); matrix multiplication (we keep finding better exponents, but the dominant algorithm remains Strassen, and even then, that's only going to be used for distributed matrix multiplication). You mention linear programming, but my understanding is that interior point methods are generally preferred in modern implementations over simplex methods, the former being polynomial and the latter exponential (although very often polynomial in practice--another great example of typical case being far faster than worst case).

The proof is likely to turn up some interesting factors. The reason why something is P and something else is NP is the big question.
The proof itself would be super-interesting, pointing to lots of new areas of mathematical inquiry. It's a bit like the old logic problem of not being able to prove something doesn't exist, in order to be able to do so, you need to look literally everywhere and show that it's not there.

A proof of P!=NP would tell us two things. First, that there's something inherently different about NP-complete problems, and the proof would tell us exactly what.

Second, it would tell us how to figure that out, inevitably with an entirely new toolset for classifying problems. It would reverberate all over the computational complexity space and probably even give us new ideas for number theory.

> First, that there's something inherently different about NP-complete problems, and the proof would tell us exactly what.

The way I see it NP problems require exponential time by default. The reason some of them can be solved in polynomial time is because those problems contain some special structure that allows you to short-circuit the general solution with some kind of "trick".

Then P vs. NP boils down to does there exist a "general trick". In other words do all NP problems contain structure that can be exploited to short-circuit the calculation or not.

I do agree that actually proving that P != NP seems like it would require discovering some as yet unknown structure behind virtually all of mathematics, simply because the hypothetical "general trick" could be hidden in just about any mathematical structure we know about (or even in one we haven't discovered yet).

> In other words do all NP problems contain structure that can be exploited to short-circuit the calculation or not.

And we can strengthen this statement a bit, to really hammer home the intuition of why P=NP would be such a radical discovery.

"Simulating an arbitrary non-deterministic Turing machine for K steps" is itself an NP-complete problem, which would be solvable by a polynomial algorithm if P=NP. In other words, it's not just that all NP problems would have some structure that a sufficiently clever programmer could exploit; it's that there would exist a single algorithm that could automatically discover and exploit such structure in any NP problem.

Yes you only need to find exploitable structure in one NP-complete problem to solve all of NP, which is why I called such a hypothetical discovery a "general trick".
I think Aaronson addresses that in 1.2.6 as the "obviousness objection", "a proof of P ̸= NP—confirming that indeed, we can’t do something that no reasonable person would ever have imagined we could do—gives almost no useful information."

To which he replies,

>>to make a sweeping statement like P ̸= NP, about what polynomial-time algorithms can't do, will require an unprecedented understanding of what they can do. This will almost certainly entail the discovery of many new polynomial-time algorithms, some of which could have practical relevance. In Section 6, we’ll see much more subtle examples of the “duality” between algorithms and impossibility proofs, with progress on each informing the other.

So there's a problem we have with today's cryptography that we basically have to hope it's secure, but we can't proove it. It's basically "enough people looked at it, noone found a way to break it, it should be okay".

That's what we have, but it's not really comforting.

Now if you think what it'd mean to proove that e.g. a public key crypto system is secure, it almost implies that you'd need to proove p!=np before that. I.e. prooving p!=np would not proove that cryptography is secure, but it may be the first step and the understanding gained from prooving p!=np may mean that there's a much better understanding of complexity in general, which will help.

What has cryptography got to do with p!=np ?
If P=NP, then you can invert in polynomial time (assuming this is practical) arbitrary boolean functions and thus solve any equations (that can be specified as a boolean circuit), find keys to any cryptosystem etc.

For example, you can assume part of the plaintext (like a header in transmission) and solve an equation (which can be restated as a SAT instance) that yields you a key assuming certain cryptographic algorithm was used. So pretty much all cryptography relies on P!=NP.

If there's an efficient algorithm for solving NP-complete problems then 99% of current cryptography would be broken. Only one-time-pads would still be secure.

But don't worry, if that happens the world would be so different there might no longer be a need for cryptography.

There exist crypto systems independent on P vs NP, both symmetric and asymnetric. The general approach exploits polynomial time complexity differences. However key-sizes increase accordingly: last I saw a key-pair was a few 100's of megabytes. (an enourmous reduction from originally GB's)
But there aren't a lot of proven bounds on polynomial time complexity either. For all we know it may be possible to solve 3-SAT in linear time.
It might be useful for proving that cryptographic protocols are guaranteed secure (i.e. that cracking them is not in P). I don't know if there are any existing protocols known to be in NP (e.g. factoring for RSA is not known to be NP hard) but it would be huge progress in that direction.
It would let us understand way better what computation really is I think. If we can separate computational problem into classes, it means we can create some hierarchy of computations and understand what makes them move between those classes. It might be much more enlightening than all the crazy stuff that could happen if P=NP.
YES! If P != NP then there is an infinity hierarchy of problems between them which are themselves complete in terms of difficulty within their level.

https://en.wikipedia.org/wiki/NP-intermediate

Under the assumption that we understand P and NP a heck of a lot more if we were able to proof their distinctness, this hierarchy could possibly be used for actually USEFUL proof of work in crypto currencies, by choosing problems with exactly the right difficulty from a problem domain like protein folding.

(comment deleted)
I think that P==NP, just not on Turing machines. A prism calculates Fourier in “O(1)” which can be used to factorize in “O(1)” and thereby solve NP in P.
If you want to think of prisms as calculating devices, isn't a prism technically a massively parallel device where all the molecules are a "core" of sorts? It still does at least O(N log N) work I think, it just all happens in parallel.

You can also find the minimum element of a list in logarithmic time instead of linear time if you have enough parallelism available, even though finding the minimum element is O(N).

What model of computation then? If you abandon Turing machines with their infinite memory, aren't you just in the land of lookup tables? I can model a prism and all possible ways light can hit it as a (intractably huge) dictionary, everything is O(1).
You really aren’t in the land of lookup tables no.
Why not? I realise there are non-Turing complete models of computation that cannot be described by a lookup table (e.g. coinduction), but are they physically realisable?
Anyone who says anything besides “I don’t know” is lying.
Does a prism truly solve a Fourier in "O(1)" or is it so fast it seems to be "O(1)"?
O(1) does not necessarily mean "fast". It could take 400 years and still be O(1), as long as it would take 400 years independent of the amount of light put in. O(1) just states that the computation time does not change depending on the input.
Prism is not a Turing machine however. i.e. it's not a generalised computer.

By that definition computers have AI because humans can communicate through them (i.e. connect a prism to do O(1) Furrier transform vs connect a human for computer to behave like human).

No prism is not a Turing machine however it can be used as a building block of a computer to perform an expensive operation.
Integer factorization is not known to be NP-complete, so as far as we know, finding an efficient way to factor integers would not tell us anything about P vs. NP.

Also, analog computation schemes tend to rapidly encounter fundamental physical limits. If calculating an N-bit result requires a measurement with N bits of precision, then adding one additional bit tends to require twice as much energy, or twice as big an apparatus, or something of the sort. So even if the "computation" itself looks as if it's O(1), your resource consumption is still exponential.

Computational complexity is intrinsically linked to the computational model. It's actually meaningless to say P or NP on anything other than a Turing machine.
Hence the quotation marks.
There aren't enough quotations in the universe to make that statement true.

But the sentiment is not wrong. There are potentially new computing paradigms that are really good for things that our machines are really bad at. I've always been fascinated by analog computers (machines, really). The old firing solution computers for torpedoes are just precisely machined wheels and gears (TDC, it's called).

But ultimately, for information exchange and transmission, it does seem nature selected for something that strangely appears to be Turing-like: DNA. Perhaps there's something to this Turing machine model after all? I find it interesting too, is all I'm saying.

The problem with analog computers beating out 'Turing machines' is that they are equivalent to a Turing machine themselves. There's nothing special about binary beyond its usefulness in tiny circuits.
> A prism calculates Fourier in “O(1)”

Only because the prism puts an upper bound on the size of the input. If you do that, every problem is O(1).

So does any physical computer. Modern computers push that limit into the billions or trillions, while optical interferometry machines are currently stuck in the hundreds or thousands. But you can't guarantee that won't change.
> So does any physical computer.

That's technically true, but it misses the point rather badly. The size of the problem that a prism can accept as input is constrained by the physical size of the prism. The size of the problem that a computer can accept as input is constrained only by time. So yes, technically, the universe will eventually undergo heat death and so the amount of time available is finite, but that's just not very interesting.

Whether or not it can be spread really depends on the representation you use.
No. Turing machines are universal. All Turing-complete models of computation are equivalent. The representation is irrelevant. That is the whole point of TMs. A TM can do the same computation as a prism, or any other physical system. The converse is not true. That is the reason TMs are a thing.
I wasn’t talking about Turing machines, I was talking about a hypothetical analog photonic computer.
If you think there is a salient difference then you don't understand P=NP at all.
Are you legit claiming that a TM the most powerful computational model?
> A TM can do the same computation as a prism, or any other physical system.

To be fair, this is only an unproven hypothesis. The Church-Turing Thesis is an assumption about the physical world (which so far seems to have held up pretty well) rather than a theorem.

It is a hypothesis with no extant counterexample. Discovering a counterexample cannot be ruled out, but it would be the biggest breakthrough in the history of science, so it seems safe to bet against it.
Is it? Turing machine has been around for what? 70 years? And photonics has been around for like 50? Wrong theories have been around for much longer.
> Is it?

Yes, it is. Turing machines can do math, so a system that exhibited behavior that could not be emulated by a TM would have to be one whose behavior is not describable mathematically. No one has been able to come up with any idea of what such a system would even look like, let alone actually produce an example.

> Wrong theories have been around for much longer.

And crackpots have been around for even longer.

It’s about doing math with certain performance characteristics. Check out the book “Real computation”.

> And crackpots have been around for even longer.

There’s nothing crackpoty about what I’m saying.

Computability isn't really relevant here. I was talking about, for problems that are computable within NP, how big a problem can be solved by physically realizable machines.

Turing machines are polynomially worse than von Neumann machines. It'd be hard to factor 16-bit numbers on a physically realizable Turing machine, while we can do hundreds of bits on our laptops.

> Turing machines are polynomially worse than von Neumann machines.

No, they are not.

> It'd be hard to factor 16-bit numbers on a physically realizable Turing machine, while we can do hundreds of bits on our laptops.

Here you have done exactly what a prism does: put an upper bound on the problem size. When you do that, you can just precompute all the possible answers (because there are only a finite number of possible inputs) and the computation becomes O(1).

To assess computational complexity you have to do it with respect to an unbounded input size. And when you do that, you will find than VNMs have only a constant advantage over TMs, not a polynomial one. This is because a VNM has a finite word size and so can only randomly address a finite memory, and so it can be emulated by a TM in constant time.

There is no getting around this. Either you bound the input size or you don't. If you do, it's all O(1) which isn't very interesting. If you don't, all computational models are equivalent (except quantum computers, which give you an exponential speedup for some problems). This is the entire reason that computational complexity theory is interesting in the first place, because you can talk about it coherently without committing to a particular model of computation.

It's hard to imagine an algorithm with complexity beyond P that don't require intermediate storage as large as n.

I suspect there are none, because you need at least n bits of state in order for a program to run for 2^n cycles before halting.

In other words NP ⊆ PSPACE and the polynomial growth in space is always at least degree 1 for any algorithm that is more than O(n).

So I don't think it's true that "the size of the problem that a computer can accept as input is constrained only by time", except for some O(1) algorithms like computing the parity of a bit stream. Which isn't the sort of thing people are building optical computers to solve.

> you need at least n bits of state in order for a program to run for 2^n cycles before halting

Only for a non-embedded system. Prisms are embedded: you have to illuminate them to get them to do anything interesting. So to compare apples and apples you have to consider a case like: connect a microphone to your computer and compute the SHA512 hash of the audio stream. That will require only O(1) space but will never halt as long as the microphone is plugged in.

It really doesn't. Sure the mathematical model you have of a prism might contain terms that the solution is encoded into, but these terms either a) require rapidly increasing effort to extract from the experiment as the computational problem grows or b) are precisely where the model is diverging from reality (e.g. assuming infinite precision despite physical fuzziness due to effects like finite temperatures and Heisenberg uncertainty).
Infinite or arbitrary precision?
The amount of precision actually required would depend on the size of the problem being solved. But I meant that the mathematical model you had in mind probably just used perfect real numbers without a notion of precision.
(comment deleted)
Factorization is very likely not NP-complete, so that particular example doesn't generalize to the rest of NP. In fact, any computer can solve an NP problem in P: Just pick a problem in P of your choice! Every problem in P is also in NP.
I think Aaronson himself addressed most of this criticism in the survey. Look under "The Kitchen-Sink Objection" and "The Mathematical Snobbery Objection".
Usage of Fourier in complexity theory still assumes that Fourier is O(n*log(n)).
Title needs a (2017), I think
For your next free 45 mins...

Melvyn Bragg and guests discuss the problem of P versus NP, which has a bearing on online security. There is a $1,000,000 prize on offer from the Clay Mathematical Institute for the first person to come up with a complete solution. At its heart is the question "are there problems for which the answers can be checked by computers, but not found in a reasonable time?" If the answer to that is yes, then P does not equal NP. However, if all answers can be found easily as well as checked, if only we knew how, then P equals NP. The area has intrigued mathematicians and computer scientists since Alan Turing, in 1936, found that it's impossible to decide in general whether an algorithm will run forever on some problems. Resting on P versus NP is the security of all online transactions which are currently encrypted: if it transpires that P=NP, if answers could be found as easily as checked, computers could crack passwords in moments.

With

Colva Roney-Dougal Reader in Pure Mathematics at the University of St Andrews

Timothy Gowers Royal Society Research Professor in Mathematics at the University of Cambridge

And

Leslie Ann Goldberg Professor of Computer Science and Fellow of St Edmund Hall, University of Oxford

https://www.bbc.co.uk/programmes/b06mtms8

Great recommendation. When I first listened to this podcast, I was impressed by how the conversation managed to hit the sweet spot of engagement for both non technical (a friend I shared it with) and technical/mathematical (myself) audiences. Later learned that Melvyn Bragg hosted two of guests here (Gowers and Roney-Dougal) for another good conversation on the notions of randomness and pseudo-randomness.

https://www.bbc.co.uk/programmes/b00x9xjb

The show is remarkable for the breadth it covers. It brings in four academics -- scholars, not popularizers -- on anything from art, philosophy, history, culture, etc. Other recent topics are David Ricardo and The Bacchae.

And every week, Bragg intelligently moderates the conversation -- not as an expert, but as somebody who sounds like he's better informed than just feeding them the outlines they write for him.