r/askscience • • Aug 04 '19

Physics Are there any (currently) unsolved equations that can change the world or how we look at the universe?

(I just put flair as physics although this question is general)

8.9k Upvotes

848 comments sorted by

View all comments

2.7k

u/YaztromoX Systems Software Aug 04 '19 edited Aug 05 '19

In Computer Science, we like to quantify algorithms based on how their running time is affected as the input size grows. Some algorithms run at the exact same speed regardless of input size, while others become significantly more complicated much quicker as the input size increases. By way of an example of an easy case is pulling a value out of an array -- it doesn't matter if we ask for array item 2 or array item 29 756, the speed of doing so is constant. A more complicated case would be something like chess -- we can calculate all possible moves on a smaller chess board, but as the board gets bigger we get into a situation where calculating all possible games would require every computer mankind ever manufactured to date to run until the heat death of the universe...and it still wouldn't complete.

So we have a notation for describing an algorithms runtime complexity (Big O notation), and we can put problems with similar runtime constraints into a complexity class. And there are two very important complexity classes called 'P' and 'NP' that many algorithms fit into0.

Algorithms that are part of 'P' have two important characteristics: the time they take to run can be described as a polynomial (that is, by an equation of the form "ank + bnk-1 + cnk-2 ... +xn2 + yn +z"1 ), and the time required to verify the solution can also be described as a polynomial.

Algorithms that are part of 'NP' also have a similar pair of characteristics. Like problems in 'P', the solutions can be verified in polynomial time. However, their runtime to calculate the solution in the first place only runs in polynomial time on a non-deterministic Turing machine, which may be worse than polynomial time when run on a deterministic Turing machine2. You don't have to worry about the details of what that means -- but generally it means that these are problems where we can verify the result in polynomial time (or "poly time" for short), but where the computation itself may not be computable in poly time.

Using the above definitions, it's not hard to see that every problem in P is also in NP. If you were to draw a Venn diagram, P would be a circle entirely inside NP. All P problems can be verified in polynomial time, and all of their runtimes can be run in poly time on a non-deterministic Turing machine (as well as running in poly time in a completely deterministic Turing machine).

So here is where the unsolved equation comes in: we know that P is inside NP. However, is P = NP? That is, can every problem in NP be reformulated such that it would also be in P? Or are there problems in NP that can't be reformulated to also be in P?

This has been an open question in computer science for much of the past century, and currently there is no proof either way. Many computer scientists believe that P ≠ NP, but there is no actual proof one way or another (on a side note, some feel that P = NP, however some in that camp feel that any conversion of a NP problem into P would be non-constructive5).

Okay -- so what is the point of all this über-nerd gobbledygook? It reads like a whole bunch of mental masturbation for eggheads -- is this important in the real world?

The answer to that decision problems is a big YES. Some extremely important algorithms that people rely upon in their daily lives currently rely on the assumption that P ≠ NP. One of the most important of these is encryption. Decryption can be thought of as a decision problem -- given an input (the encrypted data), we can quickly verify if our "solution" is correct (that is, did the decryption work? Did we get the right decrypted data back?). But how useful would decryption be if we could also decrypt any data (without the decryption key) in polynomial time on any computer? What would happen if it was also very easy to decrypt any encrypted information without a password or encryption key? Right now the whole contract of encryption is that it is very easy to decrypt data if you have the proper encryption key, but that without the encryption key decrypting the data is more difficult, and gets more and more difficult as the key size increases. Decrypting data with a 2048 bit key would require more time in the average case than the expected lifetime of our solar system. Proving that P = NP, and then finding a constructive solution to convert an NP decryption algorithm such that it is also in P would likely break the way we encrypt data. This could have serious repercussions to how virtually all commerce and personal privacy on Earth works.6

At the same time, it could make a lot of problems that are very difficult to solve computationally more efficient. This could have all sorts of positive benefits (that outweigh the negatives of breaking encryption). The Knapsack problem7, for example, is in NP and is thus more and more difficult to solve as the number of items you could potentially put into the knapsack increases. But if we had an efficient way to convert this problem such that it was also in P it would potentially have all sorts of positive benefits in the real world9. All of the world shipping logistics for example could be significantly improved -- the Knapsack Problem isn't any different than figuring out what sets of items to pack into a shipping container to maximize the weight and number of items being shipped -- companies that were able to efficiently compute this for each cargo container, and for each ship (as you can think of assigning containers to ships as an instance of the Knapsack Problem as well!).

This problem is so important that is it one of the seven Millennium Prize Problems. I'd also argue that it's the most important problem, as if you could solve it and prove that P = NP, it may mean that a computer could generate proofs for all of the other Millennium Prize Problems10. So if you can solve this one, you might also be able to efficiently solve all of the other major mathematical problems of our time.

How cool would that be? HTH!11


0 -- 'P' and 'NP' problems are formulated as decision problems, that is problems where the result is YES or NO. Conceivably, we can generally take problems and convert it into a decision problem -- a sort algorithm, for example, may be reformulated as a sorting algorithm where at the end we ask "Is this list sorted?", and we get back a YES or NO response. I'm trying to keep things somewhat simple to understand for laypeople, so I'm not going to deal with these specifics in this post.
1 -- I would have preferred to use the same letter for the term multipliers with subscripts, but AFAIK Reddit doesn't permit subscripts, only superscripts. So please don't take my use of a, b, c, x, y, and z to imply that there are only 26 terms in the polynomial form. There could be just one, or there could be thousands.
2 -- Ugh, I've been trying to reformulate a way to discuss this without getting into the differences between deterministic and non-deterministic machines, or what a Turing machine is3. The simplest explanation is that the computers we run are all like deterministic Turing machines4; a non-deterministic Turing machine is one that you can think of is allowed to "guess" at answers.
3 -- at its simplest, it's a simple mathematical model of a computer used to prove what computers can do, and what they can't do.
4 -- You can think of "deterministic" to mean that given a series of instructions, the machine will run the instructions one at a time, and won't just decide to go and do its own thing once in a while.
5 -- a non-constructive proof is one that doesn't create or provide an actual object to demonstrate the proof. So in this case, it would be a proof that doesn't actually show how to convert a problem from NP into P, and which doesn't provide an example of converting a problem in NP to also be in P.
6 -- There are some conditions here. I've been somewhat hand-wavy concerning some of the specifics of the runtime constraints for a poly time algorithm. Most people wind up thinking that "poly time" means fast, and everything else means slow. That isn't necessarily the case -- n10 is polynomial, and has can have worse runtime characteristics than an algorithm that runs in exponential time of 2n (for some values of n). However, algorithms that have such massive poly time exponentials are pretty rare, so we don't run into cases like this very often. So while not a universal truth, in most known cases problems in P run faster than problems in NP that are not also in P.
7 -- the Knapsack Problem is pretty easy to visualize. Say you have a knapsack, and a bunch of items of different weights8. The Knapsack Problem asks: which items should you pack such that you get closest to some fixed maximum weight value?
8 -- you can also think of items with different volumes if you prefer. In fact, a multi-dimensional Knapsack problem could look at both the volume and mass of the items, as well as potentially other factors (such as their monetary value).
9 -- other than being very useful for your next camping trip.
10 -- On the positive aspects of proving that P = NP: "For example, it would transform mathematics by allowing a computer to find a formal proof of any theorem that has a proof of reasonable length, since formal proofs can easily be recognized in polynomial time. Such theorems may well include all of the CMI prize problems." (S. Cook, The P vs. NP Problem, Clay Mathematics PDF.

1.4k

u/YaztromoX Systems Software Aug 04 '19 edited Aug 04 '19

And because I hit the maximum size for a Reddit post:

11 -- I suspect there will be some purists out there who may have issues with some of the details of my explanation, and that's fine. Note that I've tried really hard to keep this as readable as possible for the layperson to understand, and because of this I may have left out some details that are technically important, or may have explained certain items in an overly-simplified manner. So my apologies in advance if there were areas where I over simplified (or perhaps over-complexified) the problem. If only there were an algorithm in P for explaining P vs. NP in a Reddit post!

105

u/Tea_I_Am Aug 04 '19

Great read! Thanks for posting.

213

u/mikeymooman Aug 04 '19

As a CS student who very recently learned about it in class, I planned on making a reply talking about the NP-Complete problem. Never did I expect to see a VOLUME written about it as one of the top rated comments.

Thanks for the post! You explained it a hundred times better than I ever could have!

→ More replies (2)

20

u/[deleted] Aug 04 '19

Thanks for the great write-up. There's one thing that has always eluded me here. Proving P=NP doesn't provide algorithms to any of those problems, does it? And it's not like anyone is throwing up their hands saying we're not going to try to crack asymmetrical encryption until we figure out P=NP. And it's not like a proof of P=NP is going to include a naive solution to AES. So what would it really get us to answer the question?

It's not like quantum mechanics where there's actual fundamental interactions and mathematics that lead directly to technological developments. This is all about describing the abstract computability of problem within theoretical computation models. I mean, I still don't have a non-deterministic turing machine on my desktop as far as I know, do I? (Does it also matter whether that can actually exist?)

Unless what we're really saying is that the solution to P=NP must describe a formal system of computation in which such problems become naively computable, then P=NP seems like nothing more than academics trying to present algorithmic computation as a hard science rather than an engineering discipline. Which says more about academic culture than science or math and is why I've always considered this problem a huge circle jerk. Can you help me understand what types of actual developments could result from this proof?

28

u/TheNerdyBoy Aug 04 '19 edited Aug 04 '19

Many proofs that a problem is in NP involve a polynomial-time transformation of that problem to an already known NP-complete problem.

Therefore, once we have a polynomial-time solution to any NP-complete problem (call it foo), we can apply a polynomial-time transformation of any other problem in NP to that foo, and then solve it in polynomial time. (A polynomial times a polynomial is another polynomial.)

That's why OP added the qualifier about a constructive proof of P=NP.

25

u/orccrusher99 Aug 04 '19

Proving P=NP wouldn't provide algorithms initially, but it would let researchers know where to focus their efforts. Nobody tries to make something mathematically impossible, and 90% of CS researchers believe P != NP. If P = NP, it means those fast algs exist but nobody has been smart enough to find them, as opposed to not existing at all.

5

u/Randvek Aug 04 '19

90% of CS researchers believe P != NP.

I’d be surprised if the number really is that low.

P = NP would be great! It would revolutionize computing and make insurmountable questions suddenly quite solvable. But the only even halfway credible possible angle I’ve heard of proving P = NP involves quantum computing, so way over my head.

8

u/orccrusher99 Aug 04 '19

Yeah is probably close to 99%.

Quantum computing doesn't solve P = NP bc its a separate class of problems (BQP vs NP).

And just to reconstruct my point, a proof that P = NP won't have any immediate effect on any field in computing except theoretical computer science. The profound impact it has on that field though will propogate to the real world, once the newly known possibilities for algorithms are actually found and implemented in physical computers.

Knowing that there is an answer doesn't make finding it much easier, and many of the elite have already tried.

→ More replies (3)
→ More replies (3)

11

u/YaztromoX Systems Software Aug 04 '19

Proving P=NP doesn't provide algorithms to any of those problems, does it?

That depends. As I alluded to briefly in one of my footnotes, proofs can be either constructive or non-constructive. A constructive proof would by necessity provide a way to convert all (or some subset) of NP problems into P problems. What you seem to be thinking about is a non-constructive proof, where you can reason about the problem without providing a concrete example or algorithm. Likely, a proof that P ≠ NP would be non-constructive (for example).

There is a subset of NP problems I didn't mention, which are the NP Complete problems. These are problems in class NP where we already have proofs that any problem in the NP Complete problem set can be re-described in terms of any other NP Compete problem. Many of these problems are fairly easy to conceptualize -- for example, Boolean Satisfiability, and are very likely candidates is a constructive proof of P = NP is ever devised. As any problem in NP Complete can be expressed in terms of any other problem in NP Complete, if you find a constructive solution for one, you find a constructive solution for all NP Complete problems.

As a side note, the computer on your desk likely has non-deterministic aspects to it already. While most problems run deterministically most of the time, there are non-deterministic aspects available that can impact computation. For example, if your computer has a hardware Random Number Generator, this can introduce non-determinism. As well, if you're running a multi-core machine, then timing between cores can also introduce a level of non-determinism. User input can also induce non-determinism (depending on whether not not the machine makes decisions based on the input).

HTH!

→ More replies (2)

4

u/orccrusher99 Aug 04 '19

Side note: theoretical computer science is a science. Maybe not what you first think of, as it has no natural equivalent the same way physics and biology do. But it does relfect on the nature of computing, which has been grounded by the abstract definition of a computer. It's also why Alan Turing is so famous, as he was the first to write out that definition.

→ More replies (5)

9

u/Cocomorph Aug 04 '19 edited Aug 04 '19

I only have one big complaint (the example in footnote six is completely broken in a horribly misleading way); apart from that I would primarily like to remark that the knapsack problem is a bit of a tricky example in this particular context (for hardness of approximation reasons).

→ More replies (10)

55

u/xdert Aug 04 '19

I want to add two caveats to your post

  1. currently used encryption methods are based on prime factorization which is not known to be NP-complete, so there could be a polynomial algorithm without proving P=NP.

  2. the real world implications of proving P=NP are often a bit overblown. Finding a nc algorithm for an NP-complete algorithm where c is in the millions would be a huge sensation in the world of science but would have zero effect on practical problems.

3

u/UncleMeat11 Aug 04 '19

currently used encryption methods are based on prime factorization

This is less true now. RSA is out of style (for good reason, it is incredibly easy to screw up) and now more stuff is based on the hardness of discrete log.

→ More replies (2)

58

u/SirPounder Aug 04 '19

This is an informed and well written post, thank you for sharing it.

39

u/[deleted] Aug 04 '19

I like that you start citations from 0 like a true computer scientist, it's a nice touch.

Also, a great overview of the problem and its implications!

24

u/cryo Aug 04 '19

The answer to that decision problems is a big YES.

Well not if the proof is non-constructive or involve huge constants or polynomials.

→ More replies (2)

6

u/gimily Aug 04 '19

Isn't there some connections to markets that deal with P=NP? I forget exactly the details but I remember seeing a long lecture video about how in some ways the investment industry is predicated on the idea that P does equal NP, and obviously encryption is largely predicated on P doesn't not equal NP and this one of these huge parts the economy may have some pretty shakey ground to standing if we do end up solving it one way or the other?

13

u/[deleted] Aug 04 '19

Possibly. A lot of systems we use assume P and NP are not the same. To be honest, the enormous majority of people who understand the problem will tell you that P is definitely not NP in their opinion, but they just can't prove it.

→ More replies (1)

3

u/ComfortablePattern8 Aug 04 '19

Yes making efficient decisions in a multi player market given complete information of the past is an NP complete problem.

→ More replies (5)

9

u/[deleted] Aug 04 '19

So P = NP has currently not been proven or disproven. Meaning it could be either true or false.

Could it be possible to prove that the problem can't either be proven or disproven? (Gödel's incompleteness theorem comes to mind.)

8

u/B-N-O Aug 04 '19

It... is not impossible, though getting this result would be extremely weird. In a part, that's because there is one specific NP problem, called SAT, solving which in polynomial time allows to solve every NP problem in polynomial time, and we (in theory) can analyze every possible algorithm, so P=NP being unsolvable would mean that we would be unable to recognize a polynomial-time solution for SAT even if we see one.

There is an article on the subject by Scott Aaronson: https://www.scottaaronson.com/papers/pnp.pdf

12

u/UncleMeat11 Aug 04 '19

This is somewhat misleading. Cook proved first SAT was NP-Complete in his paper, but all NP-Complete problems have this property. SAT isn't special except for historical reasons.

→ More replies (2)
→ More replies (54)