Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content

Hierarchy Theorems (Time, Space, Alternation)

There are many hierarchy theorems based on Time, Space, Nondeterminism, Randomization etc.

Time Hierarchy Theorem (Version 1): If f,g are time-constructible functions satisfying f(n)logf(n)=o(g(n)), then DTIME(f(n))DTIME(g(n))

Proof: Consider the following Turing machine D: "On input x, run for f(|x|)log(f(|x|)) steps the Universal TM U to simulate the execution of Mx on x. If U outputs some bit b{0,1} in this time, then output the opposite answer (i.e., output 1b ). Else output 0.” Here Mx is the machine represented by the string x.

    By definition, D halts within f(n)log(f(n)) steps and hence the language L decided by D is in DTIME(g(n)).

Claim: L DTIME (f(n))

Proof: For contradiction's sake, assume that there is some TM M and constant c such that TM M, given any input x{0,1}, halts within cf(|x|) steps and outputs D(x).

    The time to simulate M by the universal Turing machine U on every input x is at most ccf(|x|)log(f(|x|)) for some number c that depends on the alphabet size and number of tapes and states of M but is independent of |x|. There is some number n0 such that f(n)log(f(n))>n for every nn0. Let x be a string representing the machine M whose length is at least n0 (such a string exists since M is represented by infinitely many strings). Then, D(x) will obtain the output b=M(x) within f(|x|)log(f(|x|)) steps, but by definition of D, we have D(x)=1bM(x). Thus we have derived a contradiction.

Hence L DTIME (f(n)) but L DTIME (g(n)) where f(n)log(f(n))=o(g(n)). Hence DTIME(f(n))DTIME(g(n))


Time Hierarchy Theorem (Version 2): For any time constructible function t:NN a language exists that is decidable in O(t(n)) time but is not decidable in time o(t(n)log(t(n)))

Proof: PRoof The following O(t(n)) time algorithm D decides a language A that is not decidable in o(t(n)log(t(n))) time. D= "On input w :

  1. Let n be the length of w.
  2. Compute t(n) using time constructibility and store the value t(n)log(t(n)) in a binary counter. Decrement this counter before each step used to carry out stages 4 and 5. If the counter ever hits 0, reject.
  3. If w is not of the form M10 for some TM M, reject.
  4. Simulate M on w.
  5. If M accepts, then reject. If M rejects, then accept."
[Same kind of turning machine construction as in version 1]

We'll show that A is not decidable in o(t(n)log(t(n))) time. Assume to the contrary that TM M decides A in time g(n), where g(n) is o(t(n)log(t(n))). Here, D can simulate M, using time dg(n) for some constant d. If the total simulation time (not counting the time to update the step counter) is at most t(n)log(t(n)), the simulation will run to completion. Because g(n) is o(t(n)log(t(n))), some constant n0 exists where dg(n)<t(n)log(t(n)) for all nn0. Therefore, D 's simulation of M will run to completion as long as the input has length n0 or more. Consider what happens when we run D on input M10n0. This input is longer than n0, so the simulation in stage 4 will be complete. Therefore, D will do the opposite of M on the same input. Hence M doesn't decide A, which contradicts our assumption. Therefore, A is not decidable in o(t(n)log(t(n))) time.

Comments

Post a Comment

Popular posts from this blog

Cook - Levin Theorem

Around 1971, Cook and Levin independently discovered the notion of NPcompleteness and gave examples of combinatorial NPcomplete problems whose definition seems to have nothing to do with Turing machines. Soon after, Karp showed that NPcompleteness occurs widely and many problems of practical interest are NPcomplete. To date, thousands of computational problems in a variety of disciplines have been shown to be NPcomplete. SAT is the language of all satisfiable CNF formulae. Cook-Levin Theorem : SAT is NPcomplete Before we go into the proof first we need to define some things Configuration of a Turing Machine: A configuration of a Turing Machine at any point of time t is basically the snapshot of the turning machine at that time. It is an ordered pair of the head position, current state, and tape content. Any configuration is initialized and ended with a special symbol, let # mark its ending. Then the contents of the tape at the left of ...

Function Automata: A Technique to Solve Finite State Automata Problems

Here I will describe a strategy or technique to solve some finite state automata problems. This strategy was first taught to us by my Theory of Computation Professor. The term 'Function Automata' is given to me since we use function-like structures in this.     Suppose you are given a language that is a regular set L. So there exists a DFA for L, LD=(Q,Σ,δ,q1,F) where Q is the set of states, Σ is the set of alphabets, δ is the transition function, S is the starting state and f is the set of final states. Now let Q={q1,q2,,qn where nN. Now we will do a kind of subset construction but every new state will have n states of Q but they can repeat. So (q1,q1,,q1n times) is a state of the new automata. Now, what is the meaning of these new states? Let f=(qk1,qk2,,qkn) be a new state where qki's are not necessary to be diff...