Exercises ChurchTuring
Exercises ChurchTuring
Exercises
The Church-Turing Thesis
Exercise 1 : Understanding the definitions.
Based on the formal definition of a Turing machine, answer the following questions and justify your
answers:
1. Can a Turing machine write the blank symbol ␣ on its tape?
2. Can the tape alphabet Γ and the input alphabet Σ be equal?
3. Can a Turing machine’s head be in the same location in two successive configurations?
4. Can a Turing machine contain a single state?
Exercise 5 : Languages.
Give implementation-level descriptions of Turing machines that decide the following languages:
1. {w ∈ {a, b}∗ | w contains as many a as b};
2. {an bn cn | n ≥ 0};
3. {an ba2n ba3n | n ≥ 0}.
Draw a formal-level implementation of one of those machines.
1
1. A function that takes a binary number, and deletes every useless 0 (so every 0 before the first 1);
2. The increment function on binary numbers (the input is a binary number w, and we want to
compute w + 1);
3. The decrement function on binary numbers (the input is a binary number w, and we want to
compute w − 1) (assume w 6= 0);
4. The binary-to-unary conversion function (the input is a binary number w, and we want to compute
the unary number equal to w);
5. The binary addition function (the input is w1 #w2 where w1 and w2 are binary numbers, and we
want to compute w1 + w2 );
6. The binary multiplication function (the input is w1 #w2 where w1 and w2 are binary numbers, and
we want to compute w1 w2 ).
You may use several tapes, and reuse machines that you already described or constructed.
1. Prove that a pushdown automata with two stacks is more powerful than a pushdown automata
with one stack.
2. Prove that you can simulate a Turing machine with a pushdown automata with two stacks.
3. What does that imply for pushdown automatas with more than two stacks?