index.md (1814B)
1 +++ 2 title = "Lecture 11" 3 template = "page-math.html" 4 +++ 5 6 # Time complexity contd. 7 ## Bounded tiling problem 8 Input is natural number n, finite collection of types of tiles, the first row of n tiles 9 is it possible to tile an n × n field with the given first row? 10 when connecting tiles, the touching side must have the same color, tiles must not be rotated. 11 12 ![4d50e3a56413b85b1419c31b4440c5ad.png](73ec4de0aeab4c5eaf8a3be2107388c4.png) 13 14 the problem is NP-complete 15 16 ## co-NP 17 Problem L is in co-NP if complement $\bar{L}$ is in NP. 18 i.e. set of instances without solution is in NP. 19 20 we don't know if NP = co-NP in general. 21 but if an NP-complete problem is in co-NP, then NP = co-NP. 22 23 ## EXP and NEXP 24 Nondeterministic TM is exponential time if it runs in time $2^{p(|x|)}$ for some polynomial p. 25 26 NEXP is nondeterministic exponential, EXP is deterministic exponential. 27 28 P ⊆ NP ⊆ PSpace ⊆ EXP ⊆ NEXP. we don't know if this is strict. we know that P ≠ EXP, NP ≠ NEXP. 29 30 # Space complexity 31 Nondeterministic Turing machine M runs in space f if for every input w, every computation of the machine visits at most f(|w|) positions on the tape. 32 i.e. the function f is the upper bound on number of visited cells on tape (length of input word) 33 34 ## PSpace and NPSpace 35 Nondeterministic Turing machine is in polynomial space if it runs in space p for some polynomial p. 36 37 NPSpace is if it runs in nondeterministic polynomial space, PSpace if deterministic. 38 39 Savitch's theorem: if language accepted by nondeterministic TM in f(n) space, then accepted by deterministic TM in f(n)² space. 40 PSpace = NPSpace. 41 42 A language L ∈ PSpace is PSPace-complete if every language L' ∈ PSpace is polynomial-time reducible to L. 43 44 # Complexity hierarchy 45 46 ![7ca28fc0f085b8a7e3cf242137ce99bd.png](0702cd410a6e40c39bb77f33d95c01e9.png) 47 48