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理论的经典书籍,几乎所有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的书,大作,值得看,值得下载。
7 The intractability of orthomodularity 40 8 Hilbert quantum logic and the orthomodular law 45 9 First-order quantum logic 50 10 Quantum set theories and theories of quasisets 56 11 The unsharp ...
• Computers and Intractability - A Guide to the Theory of NP-Completeness, M. R. Garey and D. S. Johnson, Editor: W.H. Freeman and Compagny, 1979. • Introduction to the theory of computa- tion. ...
7. Intractability 二. 请回答以下问题: (32分) 1. 算法的时间复杂性是如何度量的? 2. 为什么说在算法的时间和空间关系上, 时间是决定性因素(dominant factor)? 3. 我们通常所说的有效 (efficient) 算法或实际...
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 ...
详细介绍了密码学的基本思想,密码技术的基本应用,这部分的知识从总体上介绍了密码技术。
Unfortunately, due to mathematical intractability of most Bayesian models, the reader is only shown simple, artificial examples. This can leave the user with a so-what feeling about Bayesian ...
This paper investigates the routing among autonomous ... To avoid the intractability of the problem, abstract QoS capability must be informed among ASs, because the routhing which constralned QoS has b
Resent years, certificateless signatures have got fruitful ... The security of our scheme is proved based on the intractability of the computational Diffie-Hellman problem in the random oracle model.
目标和对这些目标的绩效反馈是组织学习和适应的基础。 然而,大多数研究都集中在单一的整体、高层次的组织目标上,而忽略了在目标层次结构中更靠后的重要运营目标。 本文探讨了具有共享任务环境的多个操作目标的相互...