Docsity

Computational Complexity: Time Hierarchy Theorems and Almost-Everywhere Hardness, Study notes of Computational Methods

Toggle sidebar
bg1
CS221: Computational Complexity Prof. Salil Vadhan
Lecture 4: More Hierarchy Theorems
9/27 Scribe: Sasha Schwartz
Contents
1 Recap 1
2 Explicit Problems 2
3 A Refinement 2
4 Almost Everywhere Hard 3
Relevant reading: Papadimitriou, Sec 7.2. (Does not cover much of the lecture.)
1 Recap
Correction from last lecture: a proper complexity function requires that f(n+ 1) ≥f(n) for all n.
Theorem 1 (Time Hierarchy Theorem) If f(n)≥nis a proper complexity function, then
TIME(f(n)) (TIME(n2f(n)2).
Proof: We construct a Turing Machine M∈TIME(n2f(n)2) with M /∈TIME(f(n)). For a
string x, first compute f(|x|), and simulate Mx(x) for f(|x|) steps, where Mxis the Turing Machine
associated to the string x. If Mxhalts on xin f(|x|) steps, then output the opposite of Mx(x).
Otherwise output 0. The Turing Machine Mwhich performs the above sequence of steps runs in
time O(|Mx|2f(|x|)2) = O(|x|2f(|x|)2), but by construction no Turing Machine running in time
f(n) agrees with Mon every input. Thus Mis as desired, and the proof is complete.
What makes this diagonalization work?
•Algorithms from the larger complexity class (TIME(n2f(n)2)) can simulate algorithms from
the smaller class (TIME(f(n))).
•Algorithms from the larger class can (effectively) enumerate algorithms from a small class (in
this case by clocking the simulation for f(n) steps).
•Closure under complement (i.e. we can “output the opposite”).
1
pf3

Partial preview of the text

Download Computational Complexity: Time Hierarchy Theorems and Almost-Everywhere Hardness and more Study notes Computational Methods in PDF only on Docsity!

CS221: Computational Complexity Prof. Salil Vadhan

Lecture 4: More Hierarchy Theorems

9/27 Scribe: Sasha Schwartz

Contents

1 Recap 1

2 Explicit Problems 2

3 A Refinement 2

4 Almost Everywhere Hard 3

Relevant reading: Papadimitriou, Sec 7.2. (Does not cover much of the lecture.)

1 Recap

Correction from last lecture: a proper complexity function requires that f (n + 1) ≥ f (n) for all n.

Theorem 1 (Time Hierarchy Theorem) If f (n) ≥ n is a proper complexity function, then TIME(f (n)) ( TIME(n^2 f (n)^2 ).

Proof: We construct a Turing Machine M ∈ TIME(n^2 f (n)^2 ) with M /∈ TIME(f (n)). For a string x, first compute f (|x|), and simulate Mx(x) for f (|x|) steps, where Mx is the Turing Machine associated to the string x. If Mx halts on x in f (|x|) steps, then output the opposite of Mx(x). Otherwise output 0. The Turing Machine M which performs the above sequence of steps runs in time O(|Mx|^2 f (|x|)^2 ) = O(|x|^2 f (|x|)^2 ), but by construction no Turing Machine running in time f (n) agrees with M on every input. Thus M is as desired, and the proof is complete.

What makes this diagonalization work?

  • Algorithms from the larger complexity class (TIME(n^2 f (n)^2 )) can simulate algorithms from the smaller class (TIME(f (n))).
  • Algorithms from the larger class can (effectively) enumerate algorithms from a small class (in this case by clocking the simulation for f (n) steps).
  • Closure under complement (i.e. we can “output the opposite”).

2 Explicit Problems

Can we identify a specific problem (i.e. language) in TIME(n^2 f (n)^2 ) \ TIME(f (n))? One such language comes from the proof of Theorem 1. With the M defined in the proof we have

L(M ) = Lf = {x : Mx(x) = 0 within f (|x|) steps}.

We can also deduce that the following Bounded Halting problem is hard:

Hf = {〈M, x〉 : M (x) halts within f (|x|) steps}.

We show Hf is hard by relating it to Lf. Let M (^) x′ be a Turing Machine that is identical to Mx except that it goes into an infinite loop when Mx is about to halt and output 1. Then x ∈ Lf if and only if 〈M (^) x′, x〉 ∈ Hf. Notice that if x is of length n, then 〈M (^) x′, x〉 is of length roughly 2n. Therefore Hf ∈ TIME(f (n/2)) ⇒ Lf ∈ TIME(f (n)), and we conclude Hf ∈/ TIME(f (n/2)).

While the languages Lf and Hf are reasonably interesting from a computer science perspective, we’d really like to identify natural intractable problems, e.g. ones that don’t directly refer to computation.

3 A Refinement

The function n^2 f (n)^2 in Theorem 1, which comes from the running time of a universal Turing Machine, provides a fairly coarse separation. The f (n)^2 part can be improved but it is not so easy (uses a more efficient universal TM which simulates t steps in time O(t log t)), but the n^2 can be easily replaced with any slowly growing function as follows.

Theorem 2 If f (n), g(n) ≥ n are proper complexity functions and g(n) = ω(f (n)^2 ) (meaning that limn→∞ g(n)/f (n)^2 = ∞), then TIME(f (n)) ( TIME(g(n)).

Proof: We describe the steps of a Turing Machine M on an input string x. First compute f (|x|) and g(|x|). Simulate Mx′ (x) for f (|x|) steps where x′^ consists of the first b

g(|x|)/f (|x|)^2 c bits of x. The remainder of the construction and proof mirrors that of the proof of Theorem 1, except that the running time of M is O(|x′|^2 f (|x|)^2 ) = O(g(|x|)), as desired.

4 Almost Everywhere Hard

An important issue in complexity theory is that for a given “hard problem” L, how “rare” are the “hard instances”? This question can be interpreted in several ways. Consider the language L we constructed in TIME(n^2 f (n)^2 ) \ TIME(f (n)). We know there is no algorithm that always decides L correctly and always runs in time f (n). But we can ask for more, for example:

  1. Every algorithm that runs in time f (n) outputs the wrong answer on infinitely many inputs.
  2. Every algorithm that runs in time f (n) outputs the wrong answer on all but finitely many inputs.
  3. Every algorithm that decides L correctly runs in time > f (n) on infinitely many inputs.