One of the fundamental mathematics problems of modern times.
Millennium Prize Problems
- Birch & Swinnerton-Dyer Conjecture
- Hodge Conjecture
- Navier-Stokes Equations
- P vs. NP
- Poincare Conjecture
- Riemann Hypothesis
- Yang-Mill Theory
P vs NP asks whether every problem whose solution can be quickly verified (technically, verified in polynomial time) can also be solved quickly (again, in polynomial time).
Halting Problem: Some problems can't be computed:
Unsolvable (by computer) Problem
Suppose that you could write a program
boolean halts(Program p, Input i);
that returns true if p halts on input i, and false if it doesn’t.
Then I can write
boolean loopIfHalts(Program p, Input i) { if (halts(p,i)) while (true) ; else return true; }
which loops if p halts on input i, and true if it doesn’t
In number theory, integer factorization is the decomposition of a composite number into a product of smaller integers. If these integers are further restricted to prime numbers, the process is called prime factorization.
Semi-primes are the product of two primes. These are the hardest instance of the prime factorization problem.
Which is harder?
Factoring is in NP
Problem Types
By definition, it solves the problem if it’s capable of
generating and verifying a solution on one of its tries
Example: CNF satisfiability
Problem: is a boolean expression in its conjunctive normal form
(CNF) satisfiable, i.e., are there values of its variables that makes it
true?
This problem is in NP. Nondeterministic algorithm:
- Guess truth assignment
- Substitute the values into the CNF formula to see if it evaluates to true
Example:
A B C D E 0 0 0 0 0 … 1 1 1 1 1 Checking phase:
Some NP Problems
• Circuit Routing
• Travelling Salesman
• Knapsack problem
• Protein Folding
• Theorem Proving
• Crossword puzzle generation
• Sudoku
A decision problem D is NP-complete if it is as hard as any
problem in NP, i.e.,
Other NP-complete problems obtained through polynomial-time
reductions from a known NP-complete problem
Didn’t we solve this by Dynamic
Programming?
For a knapsack of capacity W, and n items,
how big is the table? n × W
What’s the efficiency of the Dynamic
Programming Algorithm?
A. O(n) B. O(W) C. O(nW) D. O(Wn) E. None of the above
Complexity of Dynamic Programming
algorithm is in O(nW)
DEFINITION 1 We say that an algorithm solves a
problem in polynomial time if its worst-case time
efficiency belongs to O(p(n)) where p(n) is a polynomial
of the problem’s input size n. [Levitin, p. 401]
A whole field of study that investigates classes of problems.
Co-NP is the class of all problems where a wrong answer can be quickly rejected
PSPACE - The set of all problems that can be solved using only a polynomial amount of addition space using a deterministic algorithm
NPSPACE The - the set of all problems that can be solved using only a polynomial amount of addition space using a nondeterministic algorithm
EXP - The set of all problems solvable in exponential time
BPP - Bounded-Error Probabilistic Polynomial-Time -The class of feasible problems given a genuine random-number source
EXPSPACE - The set of all problems that can be solved using only an exponential amount of addition space