Andrew Ducker (andrewducker) wrote,
Andrew Ducker
andrewducker

A simple explanation to P and NP

lebeautemps asked for a simple explanation of the whole P=NP thing that's been circulating the internet recently. I figured I'd give it a go - I'd appreciate it if the more knowledgable on my friends list could correct anything particularly stupid I'd said...

A "P" problem is one that is easily solved through a series of steps, without trying every single combination - such as "sort a bunch of names into alphabetical order". You don't have to try every single possible list of names in order to sort a list of names, you can just use a series of comparisons to shuffle them up and down until they're sorted.

An non-P problem is one that has no known efficient set of steps for producing an answer, and thus requires you to try possibilities until you find one that's right. A common example of one that is thought to be hard is The Travelling Salesman problem - "given a bunch of cities and a bunch of roads connecting them, what is the shortest route that will take the salesman to each city exactly once?" There's no known solution to this problem other than "start trying solutions and keep going until you've found one." (although there are ways of excluding obviously wrong answers quickly).

NP is the superset of all problems that are easy to check, P is the smaller subset of all problems that are easy to solve, and proving that they are the same thing would mean that all problems that are easy to check are also easy to solve.

One of the reasons this is important is that pretty much all of the security methods we use online rely on things like "integer factorization" not being P - the fact that we can multiply two large numbers together to get an answer very quickly, but breaking that large number back into the two component parts requires every possibility to be checked (which takes years/decades for very large numbers).

The recent fuss is because of a paper that was published claiming that P!=NP - i.e. that there are definitely problems that are easy to check, but not easy to solve. This would mean, for example, that there is no simple way to convert the big number back into its two components, and thus that all of our security is safe (from that particular direction, anyway).
Subscribe

  • Interesting Links for 26-02-2021

    Why do video games matter? 20 books every player should read (tags: games books ) Trying to weed out the good criticisms of Scott…

  • Interesting Links for 25-02-2021

    '10-year prison sentences for breaching COVID-19 entry requirements into the United Kingdom'. How Governmental Decree is undermining the Rule of…

  • Interesting Links for 24-02-2021

    The bitcoin blockchain is helping keep a botnet from being taken down (tags: bitcoin malware ) Firefox enables Total Cookie Protection to stop…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 17 comments

  • Interesting Links for 26-02-2021

    Why do video games matter? 20 books every player should read (tags: games books ) Trying to weed out the good criticisms of Scott…

  • Interesting Links for 25-02-2021

    '10-year prison sentences for breaching COVID-19 entry requirements into the United Kingdom'. How Governmental Decree is undermining the Rule of…

  • Interesting Links for 24-02-2021

    The bitcoin blockchain is helping keep a botnet from being taken down (tags: bitcoin malware ) Firefox enables Total Cookie Protection to stop…