{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

23Reductions

# 23Reductions - Desiderata Desiderata Classify problems...

This preview shows pages 1–4. Sign up to view the full content.

Copyright © 2007 by Robert Sedgewick and Kevin Wayne. Reductions designing algorithms proving limits classifying problems polynomial-time reductions NP-completeness 2 Desiderata Desiderata. Classify problems according to their computational requirements. Frustrating news. Huge number of fundamental problems have defied classification for decades. 3 Desiderata Desiderata. Classify problems according to their computational requirements. Desiderata'. Suppose we could (couldn't) solve problem X efficiently. What else could (couldn't) we solve efficiently? Give me a lever long enough and a fulcrum on which to place it, and I shall move the world. -Archimedes 4 Reduction Def. Problem X reduces to problem Y if you can use an algorithm that solves Y to help solve X ! Cost of solving X = cost of solving Y + cost of reduction. Ex. Euclidean MST reduces to Voronoi . To solve Euclidean MST on N points ! solve Voronoi ! construct graph with linear number of edges ! use Prim/Kruskal to find MST in time proportional to N log N instance I (of X) Algorithm for X solution to I Algorithm for Y

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
5 Reduction Def. Problem X reduces to problem Y if you can use an algorithm that solves Y to help solve X ! Cost of solving X = cost of solving Y + cost of reduction. Consequences. ! algorithm design: given algorithm for Y, can also solve X. ! Establish intractability: if X is hard, then so is Y. ! Classify problems: establish relative difficulty between two problems. 6 Linear-time reductions Def. Problem X linear reduces to problem Y if X can be solved with: ! Linear number of standard computational steps for reduction ! One call to subroutine for Y. ! Notation: X ! L Y. Some familiar examples. ! Median ! L sorting. ! Element distinctness ! L sorting. ! Closest pair ! L Voronoi. ! Euclidean MST ! L Voronoi. ! Arbitrage ! L Negative cycle detection. ! Linear programming ! L Linear programming in std form. 7 designing algorithms proving limits classifying problems poly-time reductions NP-completeness 8 Linear-time reductions for algorithm design Def. Problem X linear reduces to problem Y if X can be solved with: ! linear number of standard computational steps for reduction ! one call to subroutine for Y. Applications. ! designing algorithms: given algorithm for Y, can also solve X. ! proving limits: if X is hard, then so is Y. ! classifying problems: establish relative difficulty of problems. Mentality: Since I know how to solve Y, can I use that algorithm to solve X?
9 Convex Hull Sorting. Given N distinct integers, rearrange them in ascending order. Convex hull. Given N points in the plane, identify the extreme points of the convex hull (in counter-clockwise order).

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 12

23Reductions - Desiderata Desiderata Classify problems...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online