77intractability

77intractability - A Reasonable Question about Algorithms...

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

View Full Document Right Arrow Icon
7.7 Intractability Introduction to Computer Science · Robert Sedgewick and Kevin Wayne · Copyright © 2008 · * * 3 Q. Which algorithms are useful in practice? A. [von Neumann 1953, Gödel 1956, Cobham 1964, Edmonds 1965, Rabin 1966] ! Model of computation = deterministic Turing machine. ! Measure running time as a function of input size n . ! Useful in practice ("efficient") = polynomial time for all inputs. Theory. Definition is broad and robust. Practice. Poly-time algorithms scale to huge problems. A Reasonable Question about Algorithms Ex 1. Sorting n elements takes n 2 steps using insertion sort. Ex 2 . Finding best TSP tour on n elements takes n ! steps using exhaustive search. constants a and b tend to be small a n b 4 Exponential Growth Exponential growth dwarfs technological change. ! Suppose you have a giant parallel computing device… ! With as many processors as electrons in the universe… ! And each processor has power of today's supercomputers… ! And each processor works for the life of the universe… ! Will not help solve 1,000 city TSP problem via brute force. quantity electrons in universe supercomputer instructions per second value 10 79 10 13 age of universe in seconds 10 17 estimated 1000! >> 10 1000 >> 10 79 ! 10 13 ! 10 17 6 Q. Which problems can we solve in practice? A. Those with guaranteed poly-time algorithms. Q. Which problems have poly-time algorithms? A. Not so easy to know. Focus of today's lecture. Reasonable Questions about Problems no known poly-time algorithm for TSP many known poly-time algorithms for sorting
Background image of page 1

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

View Full DocumentRight Arrow Icon
7 LSOLVE. Given a system of linear equations, find a solution. LP. Given a system of linear inequalities , find a solution. ILP. Given a system of linear inequalities, find a binary solution. 48 x 0 + 16 x 1 + 119 x 2 " 88 5 x 0 + 4 x 1 + 35 x 2 # 13 15 x 0 + 4 x 1 + 20 x 2 # 23 x 0 , x 1 , x 2 # 0 x 0 = 1 x 1 = 1 x 2 = 1 5 Three Fundamental Problems 0 x 0 + 1 x 1 + 1 x 2 = 4 2 x 0 + 4 x 1 " 2 x 2 = 2 0 x 0 + 3 x 1 + 15 x 2 = 36 x 0 = " 1 x 1 = 2 x 2 = 2 x 1 + x 2 " 1 x 0 + x 2 " 1 x 0 + x 1 + x 2 # 2 x 0 = 0 x 1 = 1 x 2 = 1 each x i is either 0 or 1 8 LSOLVE. Given a system of linear equations, find a solution. LP. Given a system of linear inequalities, find a solution. ILP. Given a system of linear inequalities, find a binary solution. Q. Which of these problems have poly-time solutions? A. No easy answers. LSOLVE. Yes. Gaussian elimination solves n -by- n system in n 3 time. LP. Yes. Celebrated ellipsoid algorithm is poly-time. ILP. No poly-time algorithm known or believed to exist! Three Fundamental Problems ? " " 9 Search Problems Search problem. Given an instance I of a problem, find a solution S . Requirement. Must be able to efficiently check that S is a solution. poly-time in size of instance I or report none exists 10 Search Problems Search problem. Given an instance I of a problem, find a solution S . Requirement. Must be able to efficiently check that S is a solution.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/16/2008 for the course COS 126 taught by Professor Douglasw.clark during the Fall '08 term at Princeton.

Page1 / 10

77intractability - A Reasonable Question about Algorithms...

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

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