Docsity

Hierarchy Theorems in Advanced Computational Complexity, Slides of Advanced Computational Complexity

Partial preview of the text

Download Hierarchy Theorems in Advanced Computational Complexity and more Slides Advanced Computational Complexity in PDF only on Docsity!

Lecture 13: Hierarchy Theorems

Matthew Johnson

[email protected]

Complexity classes

We now know a number of complexity classes and some relations between them: L ⊆ NL ⊆ P ⊆ NP ⊆ PSPACE But we do not know whether any two of them are different!

The questions P =? NP and L =? NL concern (possible) difference between determinism and non-determinism, and are known to be extremely difficult. However, today we will manage to distinguish some of the above complexity classes ...

Space constructible functions

Definition A function f : N → N such that f (n) ≥ log n is called space constructible if the function that maps 1n^ to the binary representation of f (n) is computable in space O(f (n)).

Most commonly occurring functions are space constructible: all polynomials n log n (rounded down to the nearest integer) exponential functions 2n, 3n, ... roots √n ...

Space Hierarchy Theorem

Theorem For any space constructible function f : N → N, there exists a language L that is decidable in space O(f (n)), but not in space o(f (n)).

Corollary If f (n) and g(n) are space constructible functions and f (n) = o(g(n)) then SPACE[f ] is a proper subset of SPACE[g]. By Savitch’s theorem, NL ⊆ SPACE[log^2 n]. Since log^2 n = o(n), we have SPACE[log^2 n] is a proper subset of SPACE[n] and therefore Corollary NL is not equal to PSPACE.

Space Hierarchy Theorem

Theorem For any space constructible function f : N → N, there exists a language L that is decidable in space O(f (n)), but not in space o(f (n)).

Corollary If f (n) and g(n) are space constructible functions and f (n) = o(g(n)) then SPACE[f ] is a proper subset of SPACE[g]. By Savitch’s theorem, NL ⊆ SPACE[log^2 n]. Since log^2 n = o(n), we have SPACE[log^2 n] is a proper subset of SPACE[n] and therefore Corollary NL is not equal to PSPACE.

Proof idea

We will describe the required language L by an algorithm that decides it. This language will not correspond to any “natural" problem. The algorithm will ensure that

  1. L is decidable in space O(f (n)), and
  2. L is different from any language decidable in space o(f (n)). We will use the method of diagonalisation. Let L′^ = {“M” | M does not accept “M” in f (n) space.} Recall that “M” is the string encoding M.

If a TM M decides L′^ in space f (n) then what can we say about M(“M”)?

if M accepts “M” then it does not accept it in space f (n) if M rejects “M” then it accepts it in space f (n) Problems with some details:

the above argument shows that L′^ cannot be decided in f (n) space, while machines running in o(f (n)) space may use a lot of space on small inputs (when the asymptotic behaviour has not kicked in yet). So we will have to modify L′^ to account for this. Our algorithm will simulate machines which may get into infinite loops on some inputs while using a finite amount of space. So we need a counter to stop the computation when they do so.

Proof

Let L = {“M” 10 k^ | k ≥ 1 and M rejects “M” 10 k^ in f (n) space.} The following algorithm decides L in O(f (n)) space. On input x

  1. Find n = |x|.
  2. Compute f (n) and mark off this much space on the work tape. If later stages ever attempt to use more space, reject
  3. If x is not of the form “M” 10 ∗^ for some TM M then reject
  4. Simulate M on x while counting the number of steps used in the simulation. If the count ever exceeds 2f^ (n), reject
  5. If M accepts then reject, otherwise accept

Proof

Let L = {“M” 10 k^ | k ≥ 1 and M rejects “M” 10 k^ in f (n) space.} The following algorithm decides L in O(f (n)) space. On input x

  1. Find n = |x|.
  2. Compute f (n) and mark off this much space on the work tape. If later stages ever attempt to use more space, reject
  3. If x is not of the form “M” 10 ∗^ for some TM M then reject
  4. Simulate M on x while counting the number of steps used in the simulation. If the count ever exceeds 2f^ (n), reject
  5. If M accepts then reject, otherwise accept

Proof

Let L = {“M” 10 k^ | k ≥ 1 and M rejects “M” 10 k^ in f (n) space.} The following algorithm decides L in O(f (n)) space. On input x

  1. Find n = |x|.
  2. Compute f (n) and mark off this much space on the work tape. If later stages ever attempt to use more space, reject
  3. If x is not of the form “M” 10 ∗^ for some TM M then reject
  4. Simulate M on x while counting the number of steps used in the simulation. If the count ever exceeds 2f^ (n), reject
  5. If M accepts then reject, otherwise accept

Proof

Let L = {“M” 10 k^ | k ≥ 1 and M rejects “M” 10 k^ in f (n) space.} The following algorithm decides L in O(f (n)) space. On input x

  1. Find n = |x|.
  2. Compute f (n) and mark off this much space on the work tape. If later stages ever attempt to use more space, reject
  3. If x is not of the form “M” 10 ∗^ for some TM M then reject
  4. Simulate M on x while counting the number of steps used in the simulation. If the count ever exceeds 2f^ (n), reject
  5. If M accepts then reject, otherwise accept

Proof continued

Clearly the algorithm works in O(f (n)) space and decides L. The key stage in showing that L cannot be decided in less space is the simulation of M. The algorithm simulates M with some loss of efficiency because the tape alphabet of M can be arbitrary while the alphabet of the algorithm is fixed. We overcome this problem by representing each cell of M by several cells. So, if M runs in g(n) space then the algorithm simulates it using dg(n) space.

Proof continued

Suppose there is a TM M which decides L in space g(n) = o(f (n)). We can simulate M using dg(n) space. There exists n 0 such that, for all inputs x with |x| > n 0 , we have dg(n) < f (n). Since |“M” 10 n^0 | > n 0 , the simulation in stage 4 will complete, and so M either accepts or rejects this string in space f (n). Moreover, — if the simulation accepts then M does not accept “M” 10 n^0 — if the simulation rejects then M does accept “M” 10 n^0 This is a contradiction, and hence no TM can decide L in space g(n) = o(f (n)).

Proof continued

Suppose there is a TM M which decides L in space g(n) = o(f (n)). We can simulate M using dg(n) space. There exists n 0 such that, for all inputs x with |x| > n 0 , we have dg(n) < f (n). Since |“M” 10 n^0 | > n 0 , the simulation in stage 4 will complete, and so M either accepts or rejects this string in space f (n). Moreover, — if the simulation accepts then M does not accept “M” 10 n^0 — if the simulation rejects then M does accept “M” 10 n^0 This is a contradiction, and hence no TM can decide L in space g(n) = o(f (n)).