Reference no: EM132445159
1. Design a Turing machine that implements a queue. The input will be a string of the form {+x|-}, where x is a symbol in the input alphabet (other than + or -), e.g., "+a + b + c - +a + e - - + b". "+a" means add a to the tail of the queue, and - means remove the head of the queue. The output should be the contents of the queue after executing all the operations indicated by the input. In this example, the output would be "aeb". The TM should have three tapes, one for input, one for output, and a scratch tape. The scratch tape should have two tracks. You don't need to use Deus Ex Machina for this problem.
2. Design and test a multi-tape Turing machine, M, that recognizes the language {ww|w ∈ Σ ∗} where Σ = {a, b}. Use Deus Ex Machina to create the TM.
3. Complexity class P was defined with respect to single-tape Turing machines only (cf. Definition 1.11.) Suppose that language L is accepted in polynomially bounded time by some multi-tape Turing machine. Show that L is in P.
4. Show that the language {wcwR|w ∈ Σ ∗} where Σ = {a, b} is in LOGSPACE by designing a multi-tape, off-line Turing machine that accepts it using only logarithmic space. (Hint: Your machine might use two worktapes to hold binary counters.)
5. Use Deus Ex Machina to design a non-deterministic TM that accepts the language {a n|n is a composite number}. Recall that a number is composite if it is the product of two natural numbers other than 1. Use the Multiplication Machine as a submachine.