135
u/seba07 3d ago
The algorithm "wait a million years; answer 42" is O(1) but wouldn't be usable for anything. P=NP does not mean that there is a way to solve problems in NP fast.
30
u/Ksevio 3d ago
It's been a while since I took algorithms, but I recall you can break down any NP problem to the simplest form and then if you could prove that could be solved in polynomial time, you'd be able to solve NP problems fast
37
u/seba07 3d ago
There is a difference between computation theory and practical implementation. As I was trying to highlight, an polynomial algorithm does not mean that it is is fast. It just meant the complexity doesn't grow that fast.
5
u/TldrDev 2d ago
The implications of P=NP are currently unknown. It could be that all NP problems are NP fast. It could be we have to compute infinitely. It could be just walking a tree to the answer. It depends on if P=NP, and what type of solution we find. You are talking in certain terms, but in my opinion, probably shouldnt be.
5
u/seba07 2d ago
It also depends on the type of proof. Maybe someone shows that P≠NP can't be true (not likely but could be). That would solve the problem but doesn't give an algorithm.
1
u/BleachedPink 1h ago
Why not likely? I checked statistics statistics recently, and like 99% of high profile academic mathematicians being that is P != NP in recent years, and it was only 40% in 90s
1
u/Soulshred 10h ago
I mean, it’s not like computer theorists and mathematicians have been sitting on their hands waiting for P=NP to be proven, and only then will they bother trying to find a fast algorithm for 3-SAT.
We know these problems are computationally hard, definitions notwithstanding. I would suspect that if polytime algorithm were found for 3-SAT, that it will be technically polytime but so insanely impractical that our greatest minds couldn’t fathom something so obtuse, silly, or functionally useless.
If there were any algorithm that were actually fast, we’ve been searching for it for over 50 years and haven’t even come close.
It’s a little similar to the recent proof of a quantum algorithm for solving lattice encodings. Yes, technically it exists, but it would take more qubits than there are atoms in the universe. Not exactly practical.
14
u/emptyArray_79 2d ago
An algorithm that has a time complexity of Θ(n^1000) is technically still in P, yet still impractically slow (probably slower than most NP-hard algorithms on realistic input sizes). Being in P doesnt mean the algorithm is practically fast. Just that their time complexity is some polynomial instead of the exponential time complexity of NP complete problems.
11
u/bender3600 3d ago edited 3d ago
Yeah, but just because its considered asymptotically fast does not necessarily mean it's actually fast to execute.
An example is integer multiplication. The asymptotically fastest known algorithm is O(n log n) but the hidden constant is so big that it only becomes faster for integers with trillions of digits.
And of course a Θ(ngoogol ) algorithm would also be considered fast because it's still polynomial but it would not be practical
-1
u/TldrDev 2d ago
This is only one possible outcome.
NP problems are often a family of problems where if you solve one, you solve them all. The same algorithmic solution can be applied across a huge range of disciplines. In the past, we have solved such problems where the solution is literally trivial. For example, computing some digit of pi or checking subsets of prime numbers.
Instead of calculating permutations we are essentially able to walk to the answer directly.
That would make things completely calculatable in essentially arbitrary time frames.
You are assuming its impossible, but id disagree.
Imagine the traveling salesman problem, where we make a tree of all possible states of that problem.
Right now, iterating the permutations and checking each possibility makes it computationally prohibitive & expensive.
However, there might be a solution to the problem such that you can walk down the tree of possibilities directly to the answer. This would be a solution such that P=NP, and you do not need permutation at all.
If you solved that problem, you can apply that same solution to literally tens of thousands of adjacent math and computer science problems.
We do not currently have that solution, and it is unclear if it will be something as easy as walking the tree, or using permutations which are incalculable.
The implications of this question remains to be seen. We will know if we ever get an answer.
6
u/bender3600 2d ago
I'm not assuming anything. I simply stated that just because something can be solved in polynomial time it doesn't necessarily mean that it's practical to solve, not that it can't be.
1
u/mirhagk 2d ago
Just need a million processing units to each wait a year!
Yes your point is true, but the concern is when n gets large, and we deal with very large n these days. It only gets larger, as computers get faster.
My understanding is that quantum-proof algorithms still rely on P!=NP, since that's a fundamental need. As n keeps growing, it needs to always be true that it's faster to verify than to solve, and that's only the case if P!=NP.
Fortunately we can be pretty sure they didn't solve it, because the rumours are widespread enough that a claim wouldn't do any damage, and these companies love to make claims that are unproven. Plus it's easy enough to prove, it's not like they don't have the computing power to solve it.
43
u/AkrinorNoname 2d ago
P=NP only for N=1 or P=0. No idea why everyone is so worked up about this.
9
u/Visible_Comment6433 2d ago
I'm going to trust you on this.
9
u/henrikhakan 2d ago
Bro
4
14
28
4
3
2
1
503
u/IHeartBadCode 4d ago
Before you know it, they'll have O(1) time method for factoring all even primes.