in Theory of Computation
236 views
0 votes
0 votes
Time taken by one tape TM to simulate n moves of k-tape TM is

1) O(n)

2) O(n^k)

3) O(n^2)

4) None of the above
in Theory of Computation
236 views

1 comment

Is that Option 2.

Power of acceptance doesn't change but the time might vary
0
0

1 Answer

0 votes
0 votes
Best answer

 Option A. Its O(n)

Let's take a Language (L) = {a^nb^n}

a a a a aa a a a a ------n
b b b b b b b b b ------n

In Standard Turing Machine we do comparison for 1st 'a' to 1st 'b'  via R/W header points to the tape, then we have to cross through n cells,

So for 'n' comparison for (a,b), require n*n cells = O(n^2).

But when we use Multi 2-Tape Turing Machine we require to R/W header points to the tape,

So first we copy a^nb^n from 1-tape to 2-tape through scanning the cells, it takes O(n) time to copy the input .

Now we easily compare with an appropriate header in both Tape 1 and Tape 2. in O(n) time .

So total time takes = Copy time + Comparsion time = O(n) +O(n) = O(n).

 

selected by

Related questions