+ All Categories
Home > Documents > Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute...

Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute...

Date post: 22-Dec-2015
Category:
View: 213 times
Download: 0 times
Share this document with a friend
Popular Tags:
22
Hardness Results for Problems • Example Problems • P: Class of “easy to solve” problems • Absolute hardness results • Relative hardness results – Reduction technique
Transcript
Page 1: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Hardness Results for Problems

• Example Problems

• P: Class of “easy to solve” problems

• Absolute hardness results

• Relative hardness results– Reduction technique

Page 2: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Example: Clique Problem

Input: Undirected graph G = (V,E), integer k

Y/N Question: Does G contain a clique of size ≥ k?

k=4 k=5

Page 3: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Example: Vertex Cover

Input: Undirected graph G = (V,E), integer k

Y/N Question: Does G contain a vertex cover of size ≤ k?Vertex cover: A set of vertices C such that for every edge (u,v) in E,

either u is in C or v is in C (or both are in C)

k=3 k=2

Page 4: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Example: Satisfiability

Input: Set of variables X and set of clauses C over X

Y/N Question: Is there a satisfying truth assignment T for the variables in X such that all clauses in C are true?

Page 5: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Hardness Results for Problems

• Example Problems

• P: Class of “easy to solve” problems

• Absolute hardness results

• Relative hardness results– Reduction technique

Page 6: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Fundamental Setting

• When faced with a new problem , we alternate between the following two goals

1. Find a “good” algorithm for solving • Use algorithm design techniques

2. Prove a “hardness result” for problem • No “good” algorithm exists for problem

Page 7: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Complexity Class P

• P is the set of problems that can be solved using a polynomial-time algorithm

– Sometimes we focus only on decision problems– The task of a decision problem is to answer a yes/no question

• If a problem belongs to P, it is considered to be “efficiently solvable”

• If a problem is not in P, it is generally considered to be NOT “efficiently solvable”

• Looking back at previous slide, our goals are to:1. Prove that belongs to P2. Prove that does not belong to P

Page 8: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Hardness Results for Problems

• Example Problems

• P: Class of “easy to solve” problems

• Absolute hardness results

• Relative hardness results– Reduction technique

Page 9: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Absolute Hardness Results

• Fuzzy Definition– A hardness result for a problem without

reference to another problem

• Examples– Solving the clique problem requires (n) time

in the worst-case– Solving the clique problem requires (2n)

time in the worst-case.– The clique problem is not in P.

Page 10: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Proof Techniques

• Diagonalization – Can be used to prove some problems are not in P

• Information Theory argument – (nlog n) lower bound for sorting– Typically not a superpolynomial lower bounds

• “Size of input” argument– Prove that solving the graph connectivity problem requires

(V2) time– Prove that solving the maximum clique problem requires

(V2) time– Typically not a superpolynomial lower bound

Page 11: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Status

• Many natural problems can be shown to be in P– Graph connectivity– Shortest Paths– Minimum Spanning Tree

• Very few natural problems have been proven to NOT be in P– Variants of halting problem are one example

• Many natural problems cannot be placed in or out of P– Satisfiability– Longest Path Problem– Clique Problem– Vertex Cover Problem

Page 12: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Hardness Results for Problems

• Example Problems

• P: Class of “easy to solve” problems

• Absolute hardness results

• Relative hardness results– Reduction technique

Page 13: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Relative Hardness Results

• Fuzzy Definition– A hardness result for a problem with reference to

another problem

• Examples– Satisfiability is at least as hard as Clique to solve

– If Satisfiability is unsolvable, then Clique is unsolvable.

– If Satisfiability is in P, then Clique is in P

– If Clique is not in P, then Satisfiability is not in P

Page 14: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Important Observation

• We are interested in relative hardness results BECAUSE of our inability to prove absolute hardness results

• That is, if we could prove strong absolute hardness results, we would not be as interested in relative hardness results

• Example– If I could prove “Satisfiability is not in P”, then I

would be less interested in proving “If Clique is not in P, then Satisfiability is not in P”.

Page 15: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Relative Hardness Proof Technique

• We show that 2 is at least as hard as 1 in the following way

• Informal: We show how to solve problem 1 using a procedure P2 that solves 2 as a subroutine

Page 16: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Examples

• Multiplication and Squaring– square(x) = mult(x,x)

• Proves multiplication is at least as hard as squaring

– mult(x,y) = (square(x+y) – square(x-y))/4• Prove squaring is at least as hard as multiplication

• Assumes that addition, subtraction, and division by 4 can be done with no substantial increase in complexity

• Specific complexity of multiplication may be higher as there are two calls to square, but the difference is polynomially bounded

Page 17: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Hardness Results for Problems

• Example Problems

• P: Class of “easy to solve” problems

• Absolute hardness results

• Relative hardness results– Reduction technique

Page 18: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Decision Problems

• We restrict our attention to decision problems• Key characteristic: 2 types of inputs

– Yes input instances

– No input instances

• Almost all natural problems can be converted into an equivalent decision problem without changing the complexity of the problem

– One technique: add an extra input variable that represents the solution for the original problem

Page 19: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Optimization to Decision

• Example using clique problem– Optimization Problems

• Input: Graph G=(V,E)• Task: Output size of maximum clique in G• Task 2: Output a maximum sized clique of G

– Decision Problem• Input: Graph G=(V,E), integer k ≤ |V|• Y/N Question: Does G contain a clique of size k?

• Your task– Show that if we can solve decision clique in polynomial-time,

then we can solve the optimization clique problems in polynomial-time.

Page 20: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Polynomial-time Reduction Technique

• Can describe as a polynomial-time “Answer-preserving input transformation”

• Consider two problems П1 and П2, and suppose I want to show

– If П2 is in P, then П1 is in P– If П1 is not in P, then П2 is not in P

• The basic idea– Develop a function (reduction) R that maps input instances of

problem П1 to input instances of problem П2

– The function R should be computable in polynomial time– x is a yes input to П1 ↔ R(x) is a yes input to П2

• Notation: П1 ≤p П2

Page 21: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

What П1 ≤p П2 Means

P1 solves П1 in polynomial-time

P2 solvesП2 in poly

time

R

No Input to П1No Input to П2

Yes Input to П1

Yes Input to П2 Yes

No

If R exists, then:If П2 is in P, then П1 is in PIf П1 is not in P, then П2 is not in P

Page 22: Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.

Showing П1 ≤p П2

• For any x input for П1, specify what R(x) will be• Show that R(x) has polynomial size relative to x

– You should show that R runs in polynomial time; I only require the size requirement above

• Show that if x is a yes instance for П1, then R(x) is a yes instance for П2

• Show that if x is a no instance for П1, then R(x) is a no instance for П2

– Often done by showing that if R(x) is a yes instance for П2, then x must have been a yes instance for П1


Recommended