Download presentation
Presentation is loading. Please wait.
Published byErin Hicks Modified over 9 years ago
1
NP Complexity By Mussie Araya
2
What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic Turing machine Informal Definition: NP contains all decision problems for which the 'yes'-answers have simple proofs of the fact that the answer is indeed 'yes' : More precisely, these proofs have to be verifiable in polynomial time by a deterministic machine.
3
Sub Classes P class and NP complete class –Definition of class P: all decision problems which can be solved by a deterministic Turing machine using in polynomial time. –Definition of NP complete –Let C be a decision problem: –C is in NP –C is NP hard.
4
NP Hardness C is NP hard iff every problem that is NP is reducible to C. How do I know C is in NP. Verify possible solution in polynomial time. How do I know C is NP hard? Show a known NP Complete problem can be reduced to C.
5
Reduction Reduction is a a relation that is transitive and reflexive on P(N), where P(N) is the power set of N and N is any set. Given two elements of P(N), A & B and a set of functions F from N N that is closed under composition: A is reducible to B under f iff –There exist f in F such that for all x in N, x is in A iff f(x) is in B
6
More On Reduction There exist many reductions Interesting one is Turing reduction Definition: Given two sets of natural numbers, we say A is Turing reducible to B : if there is an oracle that computes the characteristic function of A when run with oracle B.
7
Example of Turing reduction Reduction from multiplication to squaring Assume we want to compute multiplication knowing just addition and the following multiplication function A × B = ((A + B)^2 − A^2 − B^2)/2 –And For A & B є N we can compute the square A^2 + B^2 from A*B –Notice assuming we know multiplication We can compute the square, thus this type of reduction is Turing reduction –Further note that knowing squaring we can compute multiplication thus multiplication and squaring are equally hard!
8
Many One Reduction Assuming we have a restriction that we can only call square once at end of computation step –The problem of going from multiplication to squaring is not possible in such as sqrt(2) –However under same restriction: we can compute the square of any number from single multiplication –This reduction implies the two problems are not equally hard!
9
More On reduction In general reduction must be easy. relative to the complexity of typical problems in the class [...] If the reduction itself were difficult to compute, an easy solution to the complete problem wouldn't necessarily yield an easy solution to the problems reducing to it." Michael Sipser
10
SAT: Boolean Satisfiability Problem Proven NP by Steven Cook in 1971. Decision problem in a form of a Boolean formula consisting and, or, negation, variable. Also known as conjunctive normal form. Problem : is there on interpretation that satisfies the given formula. To See if a problem is NP hard reduce to SAT.
11
Independent Set Problem Given a graph G, an independent set is a subset of its vertices that are pair wise not adjacent. Problem given a graph G, does it have an Independent set of at least size K? Proof of NP completeness. –Is it in NP? Yes because we can check in any sub vertices if an edge is present between any two vertices. Is it NP hard? Can SAT be reduced to SAT? If so every problem can be reduce to SAT hence, every problem can be reduced to ISP.
12
Reduction of SAT to ISP Create a Boolean formula in CNF. Create vertices for every lateral in the formula. Place an edge between laterals which are –1. negations of each other. –2. In the same clause. Does the resulting graph have an independent set of size k where k is the number of clauses iff the original Boolean formula is Satisfiable?
13
Proof of an equivalence Find an interpretation I that satisfies the Boolean formula. Take one clause from each lateral which is true under I. Each clause forms an independent set because edges only exist between laterals in the same clause and no interpretation makes a lateral and its negation true.
14
Proof continued Assume we have an independent set of size k or grater. It can not contain any laterals in the same clause because are pair wise adjacent. It can not contain lateral and its negation because there exist an edge between them. Therefore it is easy to find an interpretation that satisfies the corresponding conjunction. Assign true to their interpretation. QED!
15
Current Conjecture P != NP –NP complete problems can not be solved in polynomial time using deterministic Turing machine Solution: Computer scientist use exhaustive, greedy algorithms and heuristics. Some Physicist have current research on developing Quantum Computers
16
Solutions Quantum computers. More on quantum computing Assuming classical computer based on a 3 bit register. Bits in register are in single definite state such as 000. Assume quantum computer on a register described by a wave function. Each bit can exist as superposition of all allowed states.
17
Quantum Algorithm 3 bit register 2^3 states Initialize all eight states In each step of algorithm, each vector or state is modified by a unitary operator. On termination: value is read from register via quantum measurement. Note the number of classical registers required to estimate state of n bit quantum computer is 2^n
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.