# How do we determine how much time a multi-tape DTM saves over a one-tape DTM?

Note: This is a part of a homework question

Were asked to construct a multi-tape Turing Machine for language {$a^n b^n c^n \mid n \geq 0$}

Then it says "Discuss how much time your machines saves over a one-tape DTM using the same algorithm" Any hint?

Here's my algorithm:

(1) Cut-and-paste c's to tape 3

(2) Cut-and-paste b's to tape 2

(3) Cross out each triplets, accept if last round cuts all three, reject if there's leftover

Which seems like it has a time complexity of $O(n+n+3n)=O(5n)$ Then how do we determine the time complexity for the one-tape version?

• What means "the same algorithm" for different kinds of Turing machines? Is copying the $b$s and $c$s to other tapes and then marking each letter the same as marking each letter on a single tape? – frafl Apr 5 '13 at 12:27
• If the question means "How much faster is your machine than a one-tape DTM", the question is either trivial (give a one-tape DTM that has abysmal, known runtime and compare) or hard (find the best one-tape DTM). However, "the same algorithm" probably means "the same idea". The question is vague and depends on what your multi-tape TM is. – Raphael Apr 7 '13 at 11:47

As this is homework, I'll go for the gentle hint approach. Firstly, it's a bit odd to talk about a TM using an algorithm - a TM is an algorithm, so my interpretation of the question is:

Given a multitape TM, you want to produce a single tape TM that does the same job (i.e. has the same language), and you want to know how much slower the single tape version is (in the worst case).

To put it another, hint laden way, how much slower is it to simulate a multitape machine with a single tape machine?

There's a rather important result regarding this (i.e. there's a way to do it that guarantees an upper bound on the slowdown factor), a little searching should get you that at least.

Figured it out. Turns out a theorem states that

For any multi-tape DTM $M$, there exists a two-way, one-tape DTM $M_1$ computing the same function s.t. for all inputs $x$, $Time_{M_1}(x) \leq c \centerdot (Time_M(x))^2$

Reference: Du, Dingzhu, and Ker Ko. Problem solving in automata, languages, and complexity. New York: Wiley, 2001. Print.

• – Hendrik Jan May 1 '13 at 12:13