lec25 - 6.006 Introduction to Algorithms Lecture 25:...

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

View Full Document Right Arrow Icon
6.006 Introduction to Algorithms Lecture 25: Complexity Prof. Erik Demaine
Background image of page 1

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

View Full DocumentRight Arrow Icon
Today Reductions between problems Decision vs. optimization problems Complexity classes P, NP, co‐NP, PSPACE, EXPTIME, … NP‐completeness
Background image of page 2
Reductions http://cdn.zedomax.com/blog/wp‐content/uploads/2010/02/reuse_reduce_recycle.jpg design by Gary Anderson http://en.wikipedia.org/ wiki/File:Recycle001.svg balsamic reduction http://www.allthingsolive. ca/2011/01/pecorino‐di‐ fossa‐cheese‐pears‐and‐ cinnamon‐pear‐balsamic/
Background image of page 3

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

View Full DocumentRight Arrow Icon
How to Design an Efficient Algorithm? 1. Define computational problem 2. Abstract irrelevant detail 3. Reduce to a problem you learn here (or 6.046 or algorithmic literature) 4. Else design using “algorithmic toolbox” 5. Analyze algorithm’s scalability 6. Implement & evaluate performance 7. Repeat (optimize, generalize)
Background image of page 4
Reductions Instead of solving a problem from scratch, convert your problem into a problem you already know how to solve Examples: Min‐product path shortest path (take logs) Longest path shortest path (negate weights) Min multiple‐of‐5 path shortest path ( ) Unweighted weighted shortest path (weight 1) 2D path planning shortest path (visibility graph)
Background image of page 5

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

View Full DocumentRight Arrow Icon
Polynomial Time Reductions Consider two problems & Polynomial time reduction : Solution to using solution to Polynomial‐time algorithm for , with free calls to subroutine to solve Write : “ is no harder than (up to polynomial overhead)
Background image of page 6
One Call Reductions Common polynomial‐time reduction : 1. Given input to problem 2. Polynomial‐time preprocessing 3. One call to solve problem 4. Polynomial‐time postprocessing
Background image of page 7

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

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

This note was uploaded on 11/11/2011 for the course MATH 180 taught by Professor Byrns during the Spring '11 term at Montgomery College.

Page1 / 27

lec25 - 6.006 Introduction to Algorithms Lecture 25:...

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

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