1. A simple model of computation: DFAs
-- Tape:
- Stores input.
- One arbitrarily long strip, divided into cells.
- Finite alphabet of symbols.
-- Tape head:
- Points to one cell of tape.
- Reads a symbol from active cell.
- Moves one cell at a time.
-- Machine:
- After finishing reading the input, output yes or no
2. A universal model of computation: Turing machines
-- Tape:
- Stores input, output, and intermediate results.
- One arbitrarily long strip, divided into cells.
- Finite alphabet of symbols.
-- Tape head:
- Points to one cell of tape.
- Reads a symbol from active cell.
- Writes a symbol to active cell.
- Moves one cell at a time.
-- Machine:
- controls move back/forward, read/write
- After finishing reading the input, output yes or no
3. Church-Turing thesis:
-- Proposition. Turing machines can compute any function that can be computed by a physically harnessable process of the natural world.
-- "Thesis" and not a mathematical theorem because it's a statement about the physical world and not subject to proof.
-- Implications
- No need to seek more powerful machines or languages.
- Enables rigorous study of computation (in this universe).
-- Bottom line. Turing machine is a simple and universal model of computation.
-- Many models of computation that turned out to be equivalent(Use simulation to prove models equivalent):
3. A problem is intractable if it can't be solved in polynomial time.
4. Two problems that provably require exponential time.
-- Given a constant-size program, does it halt in at most K steps? (input size = c + lg K)
-- Given N-by-N checkers board position, can the first player force a win?
5. Four fundamental problems:
-- LSOLVE: Given a system of linear equations, find a solution. Gaussian elimination solves N-by-N system in N^3 time.
-- LP: Given a system of linear inequalities, find a solution. Ellipsoid algorithm is poly-time, but was open problem for decades.
-- ILP: Given a system of linear inequalities, find a 0-1 solution. No poly-time algorithm known
-- SAT: Given a system of boolean equations, find a binary solution. No poly-time algorithm known.
6. Search problems:
-- Given an instance I of a problem, find a solution S(or reportnone exists). Must be able to efficiently(poly-time in size of instance I) check that S is a solution.
-- Factor problem is search problem: Given an n-bit integer I(input size = number of bits), find a nontrivial factor. To check solution S, long divide I by S.
7. P VS NP
-- NP: NP is the class of all search problems.
-- P: P is the class of search problems solvable in poly-time.
-- P = NP ?
8. Classifying problems:
-- Problem X poly-time reduces to problem Y if X can be solved with:
-- Polynomial number of standard computational steps.
-- Polynomial number of calls to Y.
-- If SAT poly-time reduces to Y, then we conclude that Y is (probably) intractable.
-- SAT poly-time reduces to ILP:
-- More poly-time reductions from SAT:
9. NP-completeness
-- An NP problem is NP-complete if every problem in NP poly-time reduce to it.
-- Cook-Levin theorem: SAT is NP-complete. (every NP problem is a SAT problem in disguise.)
-- Extremely brief proof sketch :
- Nondeterministic machine can guess the desired solution. (NFA)
- Nondeterministic: more than one possible next state.
- NP: Search problems solvable in poly time on a nondeterministic TM.
- Convert non-deterministic TM notation to SAT notation.
- If you can solve SAT, you can solve any problem in NP.
-- Corollary:
- Poly-time algorithm for SAT iff P = NP.
- No poly-time algorithm for some NP problem ⇒ none for SAT.
-- Extended Church-Turing thesis : P = search problems solvable in poly-time in the natural world.
10. Implications of Cook-Levin theorem:
11. Implications of Karp + Cook-Levin
12. Use theory as a guide:
-- A poly-time algorithm for an NP-complete problem would be a stunning breakthrough (a proof that P = NP).
-- You will confront NP-complete problems in your career.
-- Safe to assume that P ≠ NP and that such problems are intractable.
-- Identify these situations and proceed accordingly.
13. Coping with intractability: Relax one of desired features.
-- Solve arbitrary instances of the problem: Special cases may be tractable.
-- Linear time algorithm for 2-SAT.(at most two variables per equation)
-- Linear time algorithm for Horn-SAT.(at most one un-negated variable per equation)
-- Solve the problem to optimality: Develop a heuristic, and hope it produces a good solution.
-- No guarantees on quality of solution.
-- TSP assignment heuristics.
-- Metropolis algorithm, simulating annealing, genetic algorithms.
-- MAX-3SAT: provably satisfy 87.5% as many clauses as possible.
-- Solve the problem in poly-time.
-- Complexity theory deals with worst case behavior.
-- Instance(s) you want to solve may be "easy."
14. Hamilton path
-- Goal: Find a simple path that visits every vertex exactly once.
-- Euler path(visit every edge exactly once) is easy, but Hamilton path is NP-complete.
-- Java Implementation:
public class HamiltonPath { private boolean[] marked; // vertices on current path private int count = 0; // number of Hamiltonian paths public HamiltonPath(Graph G) { marked = new boolean[G.V()]; for (int v = 0; v < G.V(); v++) dfs(G, v, 1); } //depth is the length of current path (depth of recursion) private void dfs(Graph G, int v, int depth) { marked[v] = true; if (depth == G.V()) count++; for (int w : G.adj(v)) if (!marked[w]) dfs(G, w, depth+1); //backtrack if w is already part of path marked[v] = false; // clean up } }
15. Summary
-- P. Class of search problems solvable in poly-time.
-- NP. Class of all search problems, some of which seem wickedly hard.
-- NP-complete. Hardest problems in NP.
-- Intractable. Problem with no poly-time algorithm.
16. Princeton CS Building, West Wall, Circa 2001:
相关推荐
1970's, this term has come to symbolize the abyss of inherent intractability that algorithm designers increasingly face as they seek to solve larger and more complex problems. A wide variety of ...
COMPUTERS AND INTRACTABILITY: A Guide to the Theory of NP-Completeness by Michael R. Garey & David S. Johnson Content 1 Computers, Complexity, and Intractability 1 1.1 Introduction 1 1.2 ...
Computers And Intractability A Guide To The Theory Of
计算复杂性理论经典教材,Garey&Johnson
《计算机与难解性:NP完全性理论指南》是一本由Michael R. Garey和David S. Johnson共同编写的经典著作,深入探讨了计算复杂性理论中的NP完全性问题。该书是理解NP完全性概念及其在算法设计、优化问题解决以及计算...
Overcoming Intractability in Machine Learning Lecture Notes (Princeton COS598D)
Computers And Intractability A Guide To The Theory Of Np Completeness. PDF版
Garey M R & Johnson D S - Computer And Intractability - A Guide To The Theory Of NP-Completeness
非常经典的computational complexity的书,大作,值得看,值得下载。
在算法设计中,无法追溯性(Intractability)是指无法在多项式时间内解决某些问题的现象。这种问题被称为NP-hard问题。那么,当我们遇到NP-hard问题时,该怎么办? 首先,我们需要理解NP-hard问题的特点。NP-hard...
Computers and intractability: A guide to the theory of NP-completeness. W.H. Freeman and Company. (3) Liu, Z., & Tang, G. (2017). A survey on multi-agent scheduling. Journal of Intelligent ...
- **《计算机与探究旅行商问题》**(Computers and Intractability: A Guide to the Theory of NP-Completeness):由迈克尔·里希特(Michael R. Garey)和大卫·S·约翰逊(David S. Johnson)合著。该书是理解 NP...
在计算机科学领域,特别是理论计算机科学中,"不可解性"(Intractability)是指某些问题在计算上难以解决,尤其是在有限的时间内。本讲座主要讨论了四个关键概念:P、NP、NP完全和co-NP。 首先,P类问题...
Computers And Intractability A Guide To The Theory Of Np-Completeness - Michael Garey(djvu) 15. Elementary Recursion Theory and its Applications to Formal Systems - Saul Kripke(pdf) 16. Elemnts Of ...
Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman and Company. 这些文献提供了更深入的理论背景和算法解析,对于理解 N 皇后问题及其解决方案非常有帮助。
- Intractability:不可计算性,关注NP难问题等。 6. 计算机系统 - Cryptography:加密技术,包括对称和非对称加密算法。 - A Computing Machine:计算机基本概念,包括信息的表示和TOY机器模型。 - Building a...
7. 不可约性 (Intractability):描述一类问题在计算上难以解决的特性,通常与P和NP类问题相关。 **二、理论问题** 1. 算法的时间复杂性度量了算法运行时间与输入规模之间的关系,通常使用大O记法表示,如O(n),O...