NP-HARDNESS

  • 格式:pdf
  • 大小:559.87 KB
  • 文档页数:12

Are mysterious problems unrelated?
• How does this happen? • The notion of reduction
Is this is a coincidence?
• The class of problems P: • All decision problems that can be solved in polynomial time by a usual algorithm.
NP-HARDNESS
May 07: Lecture 24
Clay Institute problems
• Your chance to be a millionaire
Problems with efficient algorithms
• The diameter problem: Find the diameter in the input graph
• The diameter problem: • Find the diameter in the input graph • Shortest path decision problem • Given a graph and a parameter k, is the diameter of the graph k? • Decision inhe class of problems NP:
• All decision problems that can be solved in polynomial time by a non-deterministic algorithm. • All decision problems that can be verified in polynomial time
Innocent changes, huge gaps
• 2-SAT problem: Input is a formula like below, with n Boolean variables, and m clauses of two literals each (xy)(yz)(xz)(zy) • Question for decision: Is this formula satisfiable? • 3-SAT problem: Input is a formula like below, with n Boolean variables, and m clauses of three literals each (xy z)(yz w)(xz w)(zy x) • Question for decision: Is this formula satisfiable?
How common are mysterious problems?
• There are thousands of problems that people meet in the “realworld” that are mysterious. Nobody can find a polynomial time
• If max-clique has a polynomial time algorithm then longest path has one too • If longest path has a polynomial time algorithm then max-clique has one too
Another mysterious problem
• The k-clique: • Given a graph and a parameter k, does the graph contain a subgraph which consists of k nodes and has all edges (clique) • Fastest known algorithm:
Problems without known efficient algorithms
• Longest path problem: Find the longest no-cycles path in the input graph
Search and decision (yes or no) problems
algorithm and nobody can be sure that there is not a polynomial time algorithm.
Are mysterious problems unrelated?
• Most of them are related:
• • • •
If 3SAT has a polynomial time algorithm then max-clique has one too. If max-clique has a polynomial time algorithm then 3SAT has one too. If 3SAT has a polynomial time algorithm then longest path has one too. If longest path has polynomial time algorithm then 3SAT has one too.
Search and decision (yes or no) problems
• Longest path search problem: Find the longest no-cycles path in the input graph • Longest path decision problem: • Given a graph and a parameter k, is there a no-cycles path of length equal to k? • Fastest known algorithm: O(2k n3)