Computational Complexity
[57/32%]Suppose we are given three pegs and disks, with all disks having different size. Initially, the disks are stacked in decreasing size, from bottom to top, in the first peg (see Figure 6.1). The Tower of Hanoi problem is to transfer the entire tower of disks from the first peg to the second peg, moving one disk at a time and never putting a larger disk on top of a smaller disk. What is the fastest solution to this problem? Is the fastest solution feasible for size (the size of the original Tower of Hanoi problem)?
Figure 6.1: The Tower of Hanoi problem.
Show that the function grows slower than every function in the polynomial sequence, but faster than every function in the poly-log sequence.
Suppose . Show that there exists a function such that .
Show that for any constant integer .
Show that and .
Show that .
Compare the following three functions using the notation:
Compare with using the notation.
Suppose that . Is it true that for any increasing function with ? Present a proof or a counterexample.
Prove that for any .
Denote . Compare with .
Recall the Ackermann function defined in Exercise 8 of Section 4.8.
Compare the function with .
Compare the function with .
Suppose . If for sufficiently large , then .
If , then for any ).
Show that if , then .
Show that if , then .
.
Suppose that . Prove that if a Turing machine halts on all inputs and has a space bound , then it must have a time bound for a constant . Use this result to show that, for any , every set in is a recursive set.
Show that every finite set of strings belongs to .
Let and . Prove that and are in . Conclude from these results that the complexity classes and are all closed under Boolean operations union, intersection and complementation.
In the proof of Theorem 6.10, we can actually use nine moves of , instead of ten moves, to simulate at least moves of . This can be done by merging the fourth and fifth moves into one move. Can you use less than nine moves in to do the same job?
Estimate how many possible local configurations there are in the proof of Theorem 6.10.
Show that every context-free language is in (i.e., for every context-free grammar, there is a polynomial-time parsing algorithm).
Show that if and are in , then and are also in .
Let such that each string in or is a binary representation of a natural number. We let be the natural number whose binary representation is .
Let . Show that if , then is also in PSPACE.
Let . Show that if then is also in PSPACE.
Assume that . Is it true that is also in ? Is it true that is also in ?
Show that is fully time-constructible.
Show that is fully space-constructible.
.
.
Describe the detail of the 3-worktape DTM of Theorem 6.16. In particular, describe how works using input as both the machine code for and as the input to , while it is stored in the read-only input tape.
In the proof of Theorem 6.17, we used the dovetailing technique to perform the parallel simulation of and . Can we use, instead, the product Turing machine method of Example 5.9 to perform the parallel simulation?
Show that is fully space-constructible.
Show that is fully time-constructible.
Show that if is fully time-constructible, then .
Show that if is fully space-constructible and , then for some constant .
Assume that by a reduction function with time bound . Also assume that . What can you say about the time complexity of set ?
Show that .
Show that EXP EXPPOLY.
Show that PSPACE .
Let . Find an NTM accepting the language .
Show that .
Show that .
Construct multi-tape NTM's to accept the following languages in time :
.
.
A regular expression is called a starless regular expression if it does not contain the symbol * (the Kleene star). Show that the problem of determining whether two starless regular expressions and are not equivalent (i.e., whether ) is in .
Show that the problem of determining whether two regular expressions are not equivalent is in .
An extended regular expression is a regular expression that can use an additional intersection operation (denoted by ). Show that the problem of determining whether two extended regular expressions are not equivalent is in .
In the proof of Theorem 6.27, the predicate was solved by a deterministic recursive algorithm. Convert it to an equivalent nonrecursive algorithm that uses space .
Show that the complexity class NP is closed under union, intersection, concatenation and Kleene closure.
Show that, for any real numbers and ,
Show that Lemma 6.31 still holds if we replace the conditions and by and . [Hint: Note that NTM can simulate on input without writing down the string on the second tape. Instead, it may simply write down, in the second tape, the position of the input tape head of and use to determine what input symbol 's tape head is scanning.]
Show that, for any real numbers and ,
Show that if , and are fully time-constructible functions with and , then implies .
Show that .
Show that EXP .
Show that if , then
Find a context-sensitive grammar for the language
Find a context-sensitive grammar for the language
Construct context-sensitive grammars for the languages of Examples 4.17 and 4.18, and for the languages in Exercises 3(b)-3(i) of Section 4.5.
Complete the last part of the proof of Theorem 6.35. That is, describe how to attach the leftmost and rightmost blanks to their neighboring symbols to convert grammar to a context-sensitive grammar.
Show that the class of context-sensitive languages is closed under union, intersection, concatenation, and Kleene closure.
Find a recursive language that is not context-sensitive.
What is wrong if we use the following simpler algorithm to compute in the proof of Theorem 6.36?
For each , to compute , we generate each configuration one by one and, for each one, nondeterministically verify whether (by machine ), and increments the counter for by one if holds.
Recall, from Exercise 6 of Section 3.5, the notion of 2-stack PDA's. Show that each language accepted by a 2 -stack PDA is a context-sensitive language.