1 / 164

Computational Complexity:

Computational Complexity:. P, NP and beyond CSA Summer School 2013. Chandan Saha. What is Computational Complexity?. Study of the amount of resources required by an algorithm to solve a problem . What is Computational Complexity?.

felcia
Télécharger la présentation

Computational Complexity:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computational Complexity: P, NP and beyond CSA Summer School 2013 ChandanSaha

  2. What is Computational Complexity? • Study of the amount of resources required by an algorithm to solve a problem.

  3. What is Computational Complexity? • Study of the amount of resources required by an algorithm to solve a problem. • Time (bit operations) • Space (bits) • Randomness • Communications

  4. What is Computational Complexity? • Study of the amount of resources required by an algorithm to solve a problem. • Mathematically formalized as Turing Machines

  5. What is Computational Complexity? • Study of the amount of resources required by an algorithm to solve a problem. • Language: Set of {0,1}* strings.

  6. Turing Machines 1 0 1 … 0 1 1 Input :

  7. Turing Machine 1 0 1 … 0 1 1 Input : Work tape: 1 1 0 … 1 1 1 Head

  8. Turing Machine 1 0 1 … 0 1 1 Input : Work tape: Output: 1 1 0 … 1 1 1 1 1 1 … 0 0 1

  9. Turing Machine 1 0 1 … 0 1 1 Input : Work tape: Output: 1 1 0 … 1 1 1 1 1 1 … 0 0 1 Processor (states)

  10. Turing Machine 1 0 1 … 0 1 1 Input : Work tape: Output: 1 1 0 … 1 1 1 1 1 1 … 0 0 1 Finite set of instructions (transition functions) Processor (states)

  11. Why Turing Machines ? • Natural & intuitive.

  12. Why Turing Machines ? • Natural & intuitive. • A formal model helps us study the power and limitations of computation mathematically.

  13. Why Turing Machines ? • Natural & intuitive. • A formal model helps us study the power and limitations of computation mathematically. • Church-Turing thesis: “Everyphysically realizable computation device – whether it’s based on silicon, DNA, neurons or some other alien technology – can be simulated by a Turing machine”. --- [quote from Arora-Barak’s book]

  14. Why Turing Machines ? • Natural & intuitive. • A formal model helps us study the power and limitations of computation mathematically. • Church-Turing thesis: “Everyphysically realizable computation device – whether it’s based on silicon, DNA, neurons or some other alien technology – can be simulated by a Turing machine”. --- [quote from Arora-Barak’s book] Might or might not be true!

  15. Why Turing Machines ? • Natural & intuitive. • A formal model helps us study the power and limitations of computation mathematically. • Church-Turing thesis: “Everyphysically realizable computation device – whether it’s based on silicon, DNA, neurons or some other alien technology – can be simulated by a Turing machine”. --- [quote from Arora-Barak’s book] Might or might not be true! Quantum computers ?

  16. In support of the CT thesis • Several other computational models like, “lamda calculus, cellular automata, pointer machines, bouncing billiard balls, Conway’s game of life, and so on..” are all equivalent to the Turing machine model of computation.

  17. In support of the CT thesis • Several other computational models like, “lamda calculus, cellular automata, pointer machines, bouncing billiard balls, Conway’s game of life, and so on..” are all equivalent to the Turing machine model of computation. Can Turing machines solve any computational problem?

  18. In support of the CT thesis • Several other computational models like, “lamda calculus, cellular automata, pointer machines, bouncing billiard balls, Conway’s game of life, and so on..” are all equivalent to the Turing machine model of computation. Can Turing machines solve any computational problem? Not really!

  19. Example: Solving Diophantine equations Input: A system of polynomial equations in many variables with integer coefficients. Output: Check if the system has integer solutions . Question: Is there an algorithm to solve this problem?

  20. Example: Solving Diophantine equations Input: A system of polynomial equations in many variables with integer coefficients. Output: Check if the system has integer solutions . Question: Is there an algorithm to solve this problem? x2y + 5y3 = 3 x2 + z5 – 3y2 = 0 y2 – 4z6 = 0 Integer solutions for x, y, z?

  21. Example: Solving Diophantine equations Input: A system of polynomial equations in many variables with integer coefficients. Output: Check if the system has integer solutions . Question: Is there an algorithm to solve this problem? x2y + 5y3 = 3 x2 + z5 – 3y2 = 0 y2 – 4z6 = 0 Integer solutions for x, y, z? A question posed by David Hilbert in 1900

  22. Computational limitations of TM • The problem, Solving Diophantine equations, cannot be solved by any Turing machines (no matter how much time & space we allow).

  23. Computational limitations of TM • The problem, Solving Diophantine equations, cannot be solved by any Turing machines (no matter how much time & space we allow). • Such problems are known as undecidableproblems. There are many other examples.

  24. Computational limitations of TM • The problem, Solving Diophantine equations, cannot be solved by any Turing machines (no matter how much time & space we allow). • Such problems are known as undecidableproblems. There are many other examples. • For the rest of this talk, we’ll restrict our attention to computable (or decidable) problems.

  25. Computational limitations of TM • The problem, Solving Diophantine equations, cannot be solved by any Turing machines (no matter how much time & space we allow). • Such problems are known as undecidableproblems. There are many other examples. • For the rest of this talk, we’ll restrict our attention to computable (or decidable) problems. Good idea to have a list of computable problems in mind!

  26. Problem set 1 • Multiplication: Given two integers a & b compute ab

  27. Problem set 1 • Multiplication: Given two integers a & b compute ab • Solving linear system: Solve a system of m linear equations in n variables over rationals.

  28. Problem set 1 • Multiplication: Given two integers a & b compute ab • Solving linear system: Solve a system of m linear equations in n variables over rationals. 1.5x + 0.5y – z = 1.25 x + 2y = 0.25 2x - 0.33y + 0.7z = 2 rational solutions for x, y, z?

  29. Problem set 1 (contd.) • Shortest path: Given a weighted graph and two vertices s & t, find the shortest path from s to t.

  30. Problem set 1 (contd.) • Shortest path: Given a weighted graph and two vertices s & t, find the shortest path from s to t. • Maximum matching: Given a graph, find a maximum matching.

  31. Problem set 1 (contd.) • Shortest path: Given a weighted graph and two vertices s & t, find the shortest path from s to t. • Maximum matching: Given a graph, find a maximum matching. Matching

  32. Problem set 2 • Vertex cover: Given a graph G and an integer k, check if there’s a set of k vertices that covers all the edges. Vertex cover of size 5

  33. Problem set 2 (contd.) • Boolean 3-satisfiability: Given a set of m clauses in n variables check if there’s an assignment that satisfies all the clauses. ¬x + y + z + u = 1 x + ¬y + ¬u = 1 x + ¬y + z = 1 Boolean solution for x,y,z,u?

  34. Problem set 2 (contd.) • Travelling salesman problem: Given a list of pairwise distances between n cities, is there a route of length at most k that travels through all of them?

  35. Problem set 3 • Smallest Boolean circuit: Find the smallest Boolean circuit equivalent to a given Boolean circuit. (VLSI design)

  36. Problem set 3 • Smallest Boolean circuit: Find the smallest Boolean circuit equivalent to a given Boolean circuit. • Number of Cycles: Given a directed graph G, count the number of simple cycles in G. (VLSI design)

  37. Which of the problems in Set 1, 2 and 3 can be solved efficiently?

  38. Which of the problems in Set 1, 2 and 3 can be solved efficiently? We need to formalize the notion of computational efficiency.

  39. Defining `Efficiency’: Class P • Polynomial time computation: An algorithm runs in polynomial time if for every input of size n the running time of the algorithm is bounded by nc, where c is a constant independent of the input. c may vary from one algorithm to the other

  40. Why `polynomial time’? All computational models that are `equivalent’ to Turing machines, reduce to each other in polynomial time If you can solve one problem in one computational model, you can also solve it any other `equivalent’ computational model with just a polynomial slow down in the running time of the algorithm.

  41. Problems in class P • All the problems in Set 1: • Integer Multiplication • Solving linear system • Shortest path • Maximum matching can be solved in polynomial time.

  42. Problems in class P • All the problems in Set 1: • Integer Multiplication • Solving linear system • Shortest path • Maximum matching (Edmonds 1965) can be solved in polynomial time.

  43. Are all computable problems in P? Certainly not!

  44. Are all computable problems in P? Certainly not! • Ideal membership problem: Given multivariate polynomials g, f1, …., fn, check if there exist polynomials h1, …, hnsuch that • g = h1f1 + … + hnfn

  45. Are all computable problems in P? Certainly not! • Ideal membership problem: Given multivariate polynomials g, f1, …., fn, check if there exist polynomials h1, …, hnsuch that • g = h1f1 + … + hnfn IM is not in class P

  46. A simpler version of Ideal membership A valid set of polynomials h1, …, hnis a certificate of the fact that g = h1f1 + … + hnfn

  47. A simpler version of Ideal membership A valid set of polynomials h1, …, hnis a certificate of the fact that g = h1f1 + … + hnfn Simpler version of IM: Suppose an `alleged certificate’ h1, …, hn is given. Check if g = h1f1 + … + hnfn Verification version of IM

  48. A simpler version of Ideal membership A valid set of polynomials h1, …, hnis a certificate of the fact that g = h1f1 + … + hnfn Simpler version of IM: Suppose an `alleged certificate’ h1, …, hn is given. Check if g = h1f1 + … + hnfn Is this problem easy?

  49. A simpler version of Ideal membership A valid set of polynomials h1, …, hnis a certificate of the fact that g = h1f1 + … + hnfn Simpler version of IM: Suppose an `alleged certificate’ h1, …, hn is given. Check if g = h1f1 + … + hnfn Is this problem easy? The certificate h1, …, hn can be much larger than the original polynomials g, f1, …., fn ; implying that verification cannot be done in time polynomial in the size of g, f1, …., fn.

  50. Class NP A problem is in NP if: • its solution or certificate size is small, • solution or certificate can be verified efficiently.

More Related