reductions

reductions - Desiderata Reductions Desiderata. Classify...

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

View Full Document Right Arrow Icon
Robert Sedgewick and Kevin Wayne • Copyright © 2006 • http://www.Princeton.EDU/~cos226 Reductions 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 given a subroutine for Y, can solve X. ! Cost of solving X = cost of solving Y + cost of reduction. Ex. X = Euclidean MST, Y = Voronoi. don't confuse with reduces from instance I (of X) Algorithm for X solution to I Algorithm for Y
Background image of page 1

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

View Full DocumentRight Arrow Icon
5 Reduction Def. Problem X reduces to problem Y if given a subroutine for Y, can solve X. ! Cost of solving X = cost of solving Y + cost of reduction. Consequences. ! Classify problems: establish relative difficulty between two problems. ! Design algorithms: given algorithm for Y, can also solve X. ! Establish intractability: if X is hard, then so is Y. don't confuse with reduces from 6 Linear Time Reductions 7 Linear Time Reductions Def. Problem X linear reduces to problem Y if X can be solved with: ! Linear number of standard computational steps. ! 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. 8 Linear Time Reductions Def. Problem X linear reduces to problem Y if X can be solved with: ! Linear number of standard computational steps. ! One call to subroutine for Y. Consequences. ! Design algorithms: 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.
Background image of page 2
9 Shortest Paths on Graphs and Digraphs Claim. Undirected shortest path (with nonnegative weights) linearly reduces to directed shortest path. Pf. Replace each undirected edge by two directed edges. s 2 3 5 6 t 5 10 12 15 9 12 10 15 4 s 2 3 5 6 t 5 10 12 15 9 12 10 9 10 4 15 12 12 10 15 15 4 10 Shortest Paths with Negative Weights Caveat. Reduction invalid in networks with negative weights (even if no negative cycles). Remark. Can still solve shortest path problem in undirected graphs if no negative cycles, but need more sophisticated techniques. t v s 7 -4 t v s 7 -4 7 -4 reduce to weighted non-bipartite matching (!) 11 Convex Hull and Sorting Sorting. Given N distinct integers, rearrange them in ascending order. Convex hull.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

reductions - Desiderata Reductions Desiderata. Classify...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online