Presentation is loading. Please wait.

Presentation is loading. Please wait.

Complexity, Decidability, Computability and other impossible questions Stephen Dolan, IMSA 2010.

Similar presentations


Presentation on theme: "Complexity, Decidability, Computability and other impossible questions Stephen Dolan, IMSA 2010."— Presentation transcript:

1 Complexity, Decidability, Computability and other impossible questions Stephen Dolan, IMSA 2010

2 Turing machines ● A Turing machine is a guy in a box on an infinite rail of tape. ● He is always in one of a finite number of states ● He decides, based on the current state and what he can see on the tape under the box: ● whether to go left or right ● what symbol (from a finite set) to write to the tape ● what his next state will be

3 ...or whatever ● Lambda calculus ● Most programming languages ● These are all Turing-complete ● According to the Church-Turing thesis, that's all you need to compute anything computable.

4 Halting ● Turing machines don't necessarily ever halt ● It's impossible to algorithmically determine whether an arbitrary Turing machine will halt ● A problem is decidable (or a function computable) if it's answer can be determined by a Turing machine which halts on all inputs.

5 Time and space ● For programs (Turing machines) that do terminate, we're interested in: ● How long it takes (how many steps of the machine) ● How much space it needs (how many bits of tape) ● A truly horrible notation known as big-Oh is used to describe complexities

6 Some examples ● Finding the maximum in a list of n numbers This takes time O(n) (obvious) ● Sorting a list of n numbers This can be done in time O(n lg n) (less obvious) ● Determining whether an n-digit number is prime This can be done in time O(n^5) (not even slightly obvious) ● Given a family of n sets, finding a subset of k of them whose union is as big as the full union. This can definitely be done in O(2^n). Trying to do better is... interesting (more on that later).

7 Another example: Euclidean geometry ● Euclidean geometry is decidable! ● Proved by Tarski (the same guy responsible for chopping a unit ball into five parts and reassembling into two unit balls) ● But the algorithm has “non-elementary” complexity...

8 Decision and function problems ● Function problems look harder... ● But decision problems are easier to analyse... ● And it turns out they're (mostly) just as general

9 Class P P is the set of... decision problems... for which an algorithm (Turing machine) exists... which will solve any instance of the problem... in time O(n k ) for some constant k

10 Non-determinism ● Non-deterministic Turing machines can guess perfectly ● (or, they evaluate all possible choices)

11 Class NP NP is the set of... decision problems... for which a non-deterministic Turing machine exists... which will solve any instance of the problem... in time O(n k ) for some constant k

12 Some observations ● P is a subset-or-equal of NP since you can obviously guess the right answer if there's only one choice ● NP is a subset-or-equal of EXPTIME (problems solvable on a TM in time O(2 n^k ) since on a deterministic TM, you can “guess” by trying every possible answer ● It's known that NP ≠ EXPTIME ● But does P = NP?

13 A quick aside about “certificates” ● A certificate is a short proof that the answer to a decision problem is “yes” or “no”. ● Certificates can be quickly verified on a deterministic turing machine (i.e. in polynomial time) ● NP is the set of problems to which solutions have certificates. That is, NP is the set of problems whose solutions can quickly verified if you already know the answer.

14 NP-completeness ● n students want to go to IMSA, but there aren't enough rooms. ● We're going to have to pack k students into one room. ● But certain pairs of students hate each other! ● Give the hate-list, can we find k students to put in a room such that no two of them hate each other?

15 NP-completeness ● Given a Boolean expression (and, or, not) over several variables, can we find an assignment of “true” and “false” to the variables that makes the whole thing come out “true”?

16 NP-completeness ● These are known to be the hardest problems in NP ● That is, all problems in NP can be solved on a DTM by solving a polynomial number of instances of any NP-complete problem. ● So, if you can solve any of these questions in polynomial time, then P = NP! ● But nobody has.

17 Progress towards a proof of whether P = NP None, really.

18 Progress away from a proof of whether P = NP Much more successful!

19 Progress away from a proof of whether P = NP ● Relativizing/Algebraizing proofs ● A proof that A = B relativizes iff it still holds for (A with oracle X) = (B with oracle X) ● Most proofs in complexity theory relativize ● No relativizing proof can resolve P=NP ● Algebraizing proofs are a generalisation of relativizing proofs

20 Questions? Decidable ones only, please


Download ppt "Complexity, Decidability, Computability and other impossible questions Stephen Dolan, IMSA 2010."

Similar presentations


Ads by Google