Explaining computational complexity theory

前端 未结 10 1665
花落未央
花落未央 2020-12-22 19:21

Assuming some background in mathematics, how would you give a general overview of computational complexity theory to the naive?

I am looking for an explanation of t

10条回答
  •  一向
    一向 (楼主)
    2020-12-22 19:55

    Michael Sipser's Introduction to the Theory of Computation is a great book, and is very readable. Another great resource is Scott Aaronson's Great Ideas in Theoretical Computer Science course.

    The formalism that is used is to look at decision problems (problems with a Yes/No answer, e.g. "does this graph have a Hamiltonian cycle") as "languages" -- sets of strings -- inputs for which the answer is Yes. There is a formal notion of what a "computer" is (Turing machine), and a problem is in P if there is a polynomial time algorithm for deciding that problem (given an input string, say Yes or No) on a Turing machine.

    A problem is in NP if it is checkable in polynomial time, i.e. if, for inputs where the answer is Yes, there is a (polynomial-size) certificate given which you can check that the answer is Yes in polynomial time. [E.g. given a Hamiltonian cycle as certificate, you can obviously check that it is one.]

    It doesn't say anything about how to find that certificate. Obviously, you can try "all possible certificates" but that can take exponential time; it is not clear whether you will always have to take more than polynomial time to decide Yes or No; this is the P vs NP question.

    A problem is NP-hard if being able to solve that problem means being able to solve all problems in NP.

    Also see this question: What is an NP-complete in computer science?

    But really, all these are probably only vague to you; it is worth taking the time to read e.g. Sipser's book. It is a beautiful theory.

提交回复
热议问题