| ▲ | FailMore 2 hours ago | ||||||||||||||||||||||||||||
Would anyone mind explaining what P and NP are? | |||||||||||||||||||||||||||||
| ▲ | random3 an hour ago | parent | next [-] | ||||||||||||||||||||||||||||
It's a vast generalization of the cost to verify a problem/solution. - P means polynomial - NP means nondeterministic polynomial Roughly polynomial (P) represents the upper bound of the cost to verify, and the polynomial characterization says that given a problem with a certain input (e.g. the input can be the number of training examples in ML training set or the number of constraints/conditions in a general problem— e.g. all the places you want to visit on your next trip, given many "wants" in a group) When the cost is polynomial relative to the input size it means it can only be finitely larger than the input - that's a characteristic of the polynomial which is just a finite sum of powers of x (the input). When the cost is nondeterministic polynomial, one way to think about it in what is called a nondeterministic Turing machine. The nondeterministic part refers to the "states" that the machines can transition to from any current state. When the transition can happen to more than one state, we say it's non-deterministic— and can imagine it's determined by some probability. The general assumption is that polynomial (P) is easier than nondeterministic polnomial (NP). This isn't necessarily the case as there can be arbitrarily large finite numbers (making P solutions intractible) The P vs NP problem is one of the main open problems and generally considered a crank magnet and general confusion. For a good (likely the best) resource see https://scottaaronson.blog/ | |||||||||||||||||||||||||||||
| ▲ | dpweb 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
P and NP are classes of computational problems. A problem in P can be solved in polynomial time - the computation required grows relatively slowly as the input size increases. Like sorting a list of numbers. A problem in NP requires exponential time or greater, but a proposed solution can be verified quickly. For example, checking a completed Sudoku puzzle. It is believed but unproven that all problems in NP are NOT in P. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ▲ | PandaRider 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
I have taken algorithms courses. This video explains in detail: https://www.youtube.com/watch?v=YX40hbAHx3s In short, P means Polynomial time (i.e. markets can solve computation problems efficiently) and NP means Non-Deterministic Polynomial time (i.e. markets can verify solutions of computation problems efficiently but solutions are found by luck). If P != NP, it means luck CANNOT be engineered and markets are competitive. | |||||||||||||||||||||||||||||
| ▲ | super_mario 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
Wikipedia is a good source on this P complexity class https://en.wikipedia.org/wiki/P_(complexity) NP complexity class https://en.wikipedia.org/wiki/NP_(complexity) P vs NP question | |||||||||||||||||||||||||||||
| ▲ | VMG 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
well obviously N=1 | |||||||||||||||||||||||||||||
| ▲ | convolvatron 2 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||
in CS we define a complexity class as a set of problems that have the same growth characteristic. that is for a problem size N, how long does it take in the worst case to find the solution for that problem. one such class is the Polynomial class, or P, where the time to solution is some fixed exponent of N (like N^2, or 3). the next big step is NP, which require a polynomial number of nondeterministic steps, whose solution can only be verified in polynomial time. usually solutions to NP problems are exponential in cost with respect to N (like 2^N), but thats not part of their definition. problems in NP are generally identified by mapping them into a well known problem known to be in NP, where the mapping has to occur in polynomial time. its an open question as to whether NP as a class can actually be solved in P time, but most people doubt that that is really the case. | |||||||||||||||||||||||||||||