1. Let ∑ = {0,1, #} and consider a TM, T, given by the following diagram. Assume that the only input that this machine is meant to process is of the form #0<sup>n</sup> for some n ≥ 1 (e.g., #0000).
(a) Suppose that the operator of this machine
• stops T every time after it has just transitioned from the state q<sub>2</sub> to the state q<sub>3</sub>,
• copies the string s that is then on the tape an places it in a list L,
• makes T resume its computation.
The operator continues in this fashion until the machine stops on its own, and he places the original input string #0<sup>n</sup> in L as well. Disregarding the order of strings, give a precise description of the list L the operator will obtain on an input string #0<sup>n</sup>. For example, if the input is #0, then L = {#0, #1}.
(b) What is the order of growth of the number, f(n), of transitions T performs on input of length n ≥ 2 (i.e., on the input of the form #0<sup>n-1</sup>). That is, provide the smallest, "simple" g(n) such that f(n) = O(g(n)). This is equivalent to providing a "simple" g(n) such that f(n) = Θ(g(n)).
(c) Provide a state diagram for a nondeterministic TM which is capable of producing any element in the operator's list L and which runs in time O(n).
NOTE. Your are allowed to use the TM simulator you wrote for the Programming Assignment No. 3. However, the simulator is not necessary to solve this problem. Strive to make your machine as simple as possible.