7 ms·
What P vs. NP is about
- vouaobrasil 2y ago> We recently made a Polylog video about the P vs NP problem. As usual, our goal was to present an underrated topic in a broadly understandable way Interesting post but not sure why the author calls it underrated. It seems to get a fare share of attention and love amongst those that care about such things.
- karmakurtisaani 2y agoIt's hardly an underrated topic. In fact, probably the most well-known from all the millennium prize problems. Edit: presenting the problem with inverting functions is an unusual approach tho.
- theturtletalks 2y agoI was introduced to the P vs. NP problem via the traveling salesman problem and honestly seems like easiest way to explain it to people.
- vlovich123 2y agoInterestingly the shortest route question of the salesman problem (which is what everyone associates it with) is NP-hard and thus not necessarily even within NP. P vs NP is specifically about P vs NP complete whereas NP-hard is problems that are at least as hard as NP-complete but need not be in NP nor decision problems. So make sure you give the “is there a route <= k” version because the much more common “find the shortest route version” is not NP. https://stackoverflow.com/questions/1857244/what-are-the-differences-between-np-np-complete-and-np-hard#1857342 https://stackoverflow.com/questions/1857244/what-are-the-dif... https://en.m.wikipedia.org/wiki/Travelling_salesman_problem https://en.m.wikipedia.org/wiki/Travelling_salesman_problem
- pyrale 2y agoIn this case np-complete and np-hard are closely linked: the optimization problem can be reduced to the decision version. Not all decision problems are like that (e.g. happy net problem), but for this one I don’t see the point making the distinction.
- Maxatar 2y agoAn optimization problem can always be reduced to a decision problem of the form "Is X one of the optimal solutions to problem Y for input I?"
- alex_smart 2y agoNope, the usual way of reducing optimization problem is to ask the corresponding yes/no question - for some fixed value x, is the optimal value greater than x? If you can solve the decision problem, you can solve the optimization problem by doing a binary search on the x.
- Delk 2y agoThat doesn't necessarily tell you what the solution with the optimal cost of x is, though.
- pyrale 2y agoYou can always reduce anything to anything, but in this case, the reduction is relevant because it only adds a polynomial factor. Showing that a problem can be reduced to another one in polynomial time is core to proving np-completeness. That means that tsp and tso-opt are in the same ballpark of complexity. The reason tsp-opt isn't called np-complete isn't related to its complexity, but to the fact that only decision problems get to be called that. As I said, there are problems where the decision problem and the optimization problem are completely unrelated in terms of complexity, but tsp isn't one of those.
- thaumasiotes 2y ago> Not all decision problems are like that (e.g. happy net problem) Assuming you have an oracle for any question that you know how to verify, this is very easy to reduce: Is there a solution in which vertices {1, 4, 6} are all positive? First, let's establish that the question is legal: presented with a working solution, we can calculate the defining constraint of the problem, and we can check the polarity of vertices 1, 4, and 6. If this problem is in NP, verifying the constraint will take at most polynomial time. If not, not, but our question can be verified in however much time it takes to calculate the constraint. The complexity of determining a solution by getting answers to questions of this form is interesting. Case 1: The answer is "no" for all single-vertex sets. All vertices must be negative. This cannot actually happen, because all vertices being negative is the same thing as all vertices being positive. Case 2: All vertices may be simultaneously positive. In this case, the answer to every question will be "yes", and we'll ask one question for every vertex in the input graph, solving the problem in sublinear time. Case 3: We need some positive and some negative vertices. By asking about single-vertex sets, we can quickly identify a vertex that can be positive, vertex A. We will include that vertex in every subsequent question. By the time we get there, we will have already asked about zero or more other vertices and been answered "no". We need never ask about those vertices again; they have to be negative and if we include them in any set, we'll get another "no". So, let's ask about a never-before-examined vertex, vertex B. Can {A, B} be simultaneously positive? If not, we can toss B into the "must be negative" pile, since we know A can be positive. If so, we can include it in our developing solution; future questions will include vertices A and B. We still never need to reexamine any vertex that has ever been included in any of our questions. So, unless I'm missing something, in this case we'll also produce a solution using one question per vertex in the graph. > but for this one I don’t see the point making the distinction. The distinction between NP-complete and NP-hard has nothing to do with the distinction between yes/no questions and open-ended questions. Those are unrelated concepts. An NP-hard problem is at least as hard as any NP problem. It might be much harder. An NP-complete problem is NP-hard, but it's also guaranteed to be an NP problem. That's the distinction.
- KPGv2 2y agoPersonally, I think it's fair to say all Millennium Prize problems are underrated because 99.9% of humans alive have no idea what that is.
- karmakurtisaani 2y agoWell, better start making some more YouTube videos then.
- raincole 2y agoI'm willing to bet most people who knows what P vs. NP is can't explain all the 7 problems (especially Hodge conjecture) even at pop-sci level.
- thanksgiving 2y agoI can't even name all seven! > Hodge conjecture I for one have no idea about topology in general. I had to look up what a nice shape was... I thought it was some mathematical term. The only thing I remember about is topology is someone telling me how it would be easier for me to untangle cables if I knew topology but alas I never learned.
- gosub100 2y agoI think that word is in the process of being re-defined. I see it used a lot in the context of older pop music or singers/bands that are no longer at their peak. My own pet theory is that it's an evolution of speech towards "hardened" claims that you can't easily disagree with. You cannot disagree with "over/under-rated" because there's no official "rating" method. You cannot disagree with "vibes" because the source of a vibration is impossible to determine. They both allow a speaker to make a claim without evidence.
- tgv 2y agoMight be the clickbait treadmill, indeed, or algospeak. But it doesn't need an objective meaning to be treated that way. The word "literally" can no longer be trusted to mean "in a literal sense". It's frequently used as an intensifier.
- ttctciyf 2y ago> The word "literally" can no longer be trusted to mean "in a literal sense". It's frequently used as an intensifier. It was ever thus. See, for example, https://blogs.illinois.edu/view/25/96439 https://blogs.illinois.edu/view/25/96439
- tgv 2y agoThat's a bad case of gotcha linguistics.
- deleted 2y ago[deleted]
- magicalhippo 2y agoYeah was gonna say the same. As seen on a recent video: "Blondie is so underrated!"... Though I guess for a lot of young people it feels like that, with none of their friends talking about such bands.
- genewitch 2y ago
- edanm 2y agoI'm pretty sure the author is specifically referring to the framing of P vs NP used in the video, not to the problem itself, since a bit into the article they write this: "I think that the framing with inverting a function f is quite underrated."
- vasekrozhon 2y agoYes! We are not trying to claim that P vs NP is underrated in the video, just the bit with interpreting it as a question about inverting functions. I think using "underrated" is justified, I talked with a bunch of people about this topic and it was a new way of looking at it for a lot of them. Of course, using the title "What P vs NP is actually about" is a bit of a stretch -- "Interesting take on P vs NP" would be more honest.
- edanm 2y agoTotally justified, I hadn't thought about that framing of it myself. I think it's just that the first time you use underrated, it seems to be referring to the problem itself, not to your specific take. With the video as context, or even just reading a few sentences in, the meaning is clearer.
- munchler 2y agoFraming this as inverting a function is interesting, but raises a question, since any function that maps multiple inputs to the same output is not invertible. For example, let's say we invert a checker algorithm and "run it backward from YES". Does that find an arbitrary single solution? Does it find all solutions? What if there are an infinite number of solutions?
- LegionMammal978 2y ago"An arbitrary single solution" would be the proper answer for NP. The goal is to find some solution that the verifier accepts, like how in SAT the goal is to find some satisfying assignment for all clauses.
- delusional 2y agoGiven that there is potentially an exponential number of solutions, it would be impossible to enumerate them all in anything smaller than exponential time.
- chupasaurus 2y agoThere is potentially a factorial number of solutions for NP-complete problems.
- cvoss 2y agoIn some contexts, the inverse of a function f : A -> B is defined as a function g : B -> A such that g(f(x)) = x and f(g(y)) = y for all x,y. In other contexts, what is meant is g : B -> 2^A such that x is in g(f(x)) for all x and f(x') = f(x) for all x' in g(f(x)). Here, g is said to produce the pre-image under f, and is a generalization of the above definition of inverse for non-injective functions. In other contexts still, what is meant is g : B -> A such that f(g(y)) = y for all y such that there exists some x with f(x) = y. This is a different generalization called a one-sided inverse. (People probably call it a left inverse or right inverse, but I can never remember which is which because it emerges from an arbitrary notational convention.) The article uses inverse in this third sense. "Find some input to f which would yield a given output y, if one exists."
- nick_g 2y agoDespite being mentioned throughout the post, I don't see a link to the video in question. I saw it when it was posted a few weeks back and really enjoyed it. I would highly recommend giving it a watch, especially if the ramifications of P vs NP are new to you [1] [1] https://www.youtube.com/watch?v=6OPsH8PK7xM https://www.youtube.com/watch?v=6OPsH8PK7xM
- vasekrozhon 2y agoThanks. I also added the link to the post now. Frankly, I did not count on people getting to the blog post in any other way than being curious after watching the video. :D
- Pikamander2 2y agoI've never understood why this problem is considered so difficult. I'm not a fancy schmancy computer scientist but even I can see that N = 1 or P = 0.
- deleted 2y ago[deleted]
- HappMacDonald 2y ago> even I can see that N = 1 or P = 0 wat?
- Dylan16807 2y agoIt's a joke, they're doing algebra on the letters.
- acchow 2y agoI would recommend reading the article. P vs NP is one of the foundational open problems in computer science.
- dehrmann 2y agoThey're almost certainly not equal because solving NP in P time requires magically making exponential decisions in P time. What's interesting that it's been so hard to prove one way or the other.
- seanhunter 2y agoI realise you're probably joking but on the off-chance you are not, P and NP are sets containing classes of algorithms. They aren't numbers. See https://www.claymath.org/wp-content/uploads/2022/06/pvsnp.pdf https://www.claymath.org/wp-content/uploads/2022/06/pvsnp.pd... for a formal description of the problem.
- kens 2y agoI wasn't expecting to see my (uncredited) die photo of the 8008 processor in the middle of an article about P vs NP!
- y42 2y agojust in case someone is wondering.... I assume it's this little beauty https://www.righto.com/2016/12/die-photos-and-analysis-of_24.html?m=1 https://www.righto.com/2016/12/die-photos-and-analysis-of_24...
- vasekrozhon 2y agoSorry, I added the credit now. Hope you don't mind it now? :) I have to say that I find these pictures extremely aesthetical. It's crazy how the brutally powerful CPUs we have today are successors to processors created not so long ago that also, though very intricate, fit into one picture...
- kens 2y agoThanks! No worries, I just found it amusing to randomly encounter one of my die photos. I agree, it's remarkable how much complexity there is in a modern CPU compared to the early ones.
- pipes 2y agoBBC "in our time" radio show did an outstanding episode on the topic. As usual it had an amazing calibre of guests but a totally understated style. Also no long pointless intro full of terrible banter or lengthy bullet list of what will be discussed. I wish podcasts could follow this example: https://www.bbc.co.uk/programmes/b06mtms8 https://www.bbc.co.uk/programmes/b06mtms8
- seanhunter 2y agoI love "In our time". When you said this I thought "I'll know if they're really serious if Tim Gowers[1] is one of the guests". Sure enough, he is. The BBC also had him on (the Today programme iirc but it was a while ago) the one time to comment when someone claimed to have proved it. [1] https://en.wikipedia.org/wiki/Timothy_Gowers https://en.wikipedia.org/wiki/Timothy_Gowers
- pipes 2y agoThanks, it's been years since I listened to this. Now after reading about Timothy gowers I want to listen to it again.
- dleink 2y agoThe only banter is when the producer offers tea at the end, which seems incredibly necessary to me.
- antoine-levitt 2y agoI just skimmed the article and didn't watch the video, but the bit about backpropagation is just wrong. Backpropagation doesn't compute an inverse of the jacobian, it computes its transpose. (although a similar idea to backpropagation could possibly be used to compute an inverse of several reversible layers, but that's not typically how neural networks work)
- bigallen 2y agoThis is one of the many comments I see on HN where I genuinely have no idea whether it’s satire or just high-level technical talk. I assume the latter, but I don’t know enough to disprove the former
- seanhunter 2y agoIt's not satire. If you have some function with several inputs, the Jacobian is a matrix of all the partial derivatives of this function with respect to each input variable[1]. Since derivatives give the slope of a function, if you think about your function as being like a bumpy surface with the height at each point being the output, this matrix tells you which way (and how far) to change any input if you want to go "up" or "down" in the output. Backpropogation is a way to optimise a neural network. You want to know how best to nudge the weights of the network to optimise some loss function, so what you do is compute the gradient (ie partial derivative) of that function with respect to each of the weights. This allows you to then tweak the weights of the function so your network gets better at whatever task you're trying to get it to learn. See [2] to understand how this works and and [3] to understand how this relates to the Jacobian, but generally if you're trying to go "downhill" in your loss function it's easy to see intuitively that knowing which way the function slopes (ie the effect of tweaking each of the weights) is important and that's what the Jacobian tells you. The inverse of a matrix[4] and its transpose[5] are two different operations in linear algebra. Transpose turns rows into columns and columns into rows and the inverse of a matrix is a little harder to grasp maybe without background, but you could think of multiplying one matrix by the inverse of another as a little like division (since you can't actually divide matrices).[6] [1] https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinan... [2] https://www.youtube.com/watch?v=Ilg3gGewQ5U https://www.youtube.com/watch?v=Ilg3gGewQ5U [3] https://www.youtube.com/watch?v=tIeHLnjs5U8 https://www.youtube.com/watch?v=tIeHLnjs5U8 [4] https://math.libretexts.org/Workbench/1250_Draft_4/07%3A_Matrices/7.06%3A_Inverse_Matrices https://math.libretexts.org/Workbench/1250_Draft_4/07%3A_Mat... [5] https://math.libretexts.org/Bookshelves/Linear_Algebra/Fundamentals_of_Matrix_Algebra_(Hartman)/03%3A_Operations_on_Matrices/3.01%3A_The_Matrix_Transpose https://math.libretexts.org/Bookshelves/Linear_Algebra/Funda... [6] algebraists please don't shoot me for that.
- usednoise4sale 2y agoI know no one will believe this but I'm reasonably sure I proved P!=NP earlier this week. It was very similar to a previous unsolved problem in a "haha, history repeats itself" sort of way. This comment might have a lot more comments someday.
- OrigamiPastrami 2y agoI don't believe you, but you can always prove me wrong and share your proof.
- usednoise4sale 2y agoWell, it was recent, so I'm currently in the 'feedback and validation' stage. I've reached out to experts for feedback, but these things do take time. If you have a genuine interest, and especially if you could provide feedback or warm introductions to someone who can, I'm happy to share. You can email me at atmanthedog at Google's free email service domain. Put something HN related in the subject. *If you do, please share your mathematical background so I can better tailor a response.
- geysersam 2y ago"I have discovered a truly marvelous demonstration of the proposition that P/=NP but this HN comment is too short to contain it..." Eagerly awaiting your published proof
- seanhunter 2y agoThat's fantastic if true. Make sure you check out the Clay institute's page and collect your prize.[1] [1] https://www.claymath.org/millennium/p-vs-np/ https://www.claymath.org/millennium/p-vs-np/ and especially https://www.claymath.org/wp-content/uploads/2022/06/pvsnp.pdf https://www.claymath.org/wp-content/uploads/2022/06/pvsnp.pd...
- fbarred 2y agoYou might avoid common pitfalls by reading "Eight Signs A Claimed P≠NP Proof Is Wrong": https://scottaaronson.blog/?p=458 https://scottaaronson.blog/?p=458.
- variadix 2y agoIs the interesting part of P vs NP (since it seems very unlikely that P = NP) the mathematical machinery that would be required to prove that P != NP? Presumably doing so would require a way to determine a lower bound for _all_ possible algorithms that solve a particular problem.
- vasekrozhon 2y agoExactly! In theoretical computer science, we have a lot of experience coming up with new algorithms but no idea how to prove lower bounds. So I would say that new lower-bound technique is perhaps the most interesting thing we would learn from the proof of P!=NP. But, of course, P vs NP is clearly central to computer science and math for a bunch of other reasons, hopefully, our video provided some intuitions.
- stefantalpalaru 2y ago[dead]
- bloaf 2y agoFor an example of harder-than-np-complete, I was shocked to find out how hard vector reachability is after being presented with a vector reachability problem and assuming I could just look up a reasonable-time algorithm. I incorrectly assumed it would have some basic linear algebra solution because of how simple the problem seemed.
- enugu 2y agoThis is a good insight. > To me, the essence of deep learning has nothing to do with trying to mimick biological systems or something in that sense; it’s the observation that if your circuits are continuous, there’s a clear algorithmic way of inverting/optimizing them using backpropagation. > From the perspective of someone used to algorithms like Dijkstra’s algorithm, quicksort, and so on, this declarative approach of thinking in terms of loss functions and architectures, rather than how the net is actually optimized, sounds very alien. But this is how the whole algorithmic world would look like if P equaled NP! In that world, we’d all program declaratively in Prolog and use some kind of .solve() function at the end that would internally run a fast SAT solver to solve the problem defined by our declarations.
- yldedly 2y agoI think a much closer analogy to function inversion is MCMC (or Bayesian inference in general), where we can easily compute the density p(x) of any point x, but finding the x given a p(x) is intractable. Strictly speaking it's about finding a set of x's that are distributed as p(X), not finding the x given any single density p(x), but it's close. Relatedly, probabilistic programming was originally imagined pretty much like your second quote: you define a model, get some data, run them both through the built-in inference engine, and you get the parameters of the model likely to have produced the data. In practice though, there's no universal inference engine that works for everything (some people disagree, but they're NUTS ;) I guess pretty much for the same reason P is probably not equal to NP.
- vasekrozhon 2y ago> I guess pretty much for the same reason P is probably not equal to NP. Yep, in particular there are classes called #P and PP that are closely connected to NP that can capture the hardness of problems like computing partition functions, sampling from posterior distribution and so on.
- yldedly 2y agoDidn't know about these, thanks for the pointer! Do you have a good resource for learning about these (specifically about the hardness of sampling from posterior distributions)?
- vasekrozhon 2y agoHi, the author of the blog post here. 1) With others, I work on high-effort Youtube videos, our channel's called Polylog. We recently made a video about an underrated take on P vs NP. [1] 2) After working on the high-effort video, I always write a low-effort stream-of-consiousness-style very-much-unedited blog post where I clarify some details or explain some more esoteric stuff that did not make it into the video. The blog post you are discussing is such a blog post. So you should watch the video first and read the blog post only if you really liked the video and want to know more. :) 3) If you have any questions, I'll be happy to answer them! [1] https://www.youtube.com/watch?v=6OPsH8PK7xM https://www.youtube.com/watch?v=6OPsH8PK7xM