This preview shows pages 1–2. Sign up to view the full content.
CSci 5403, Spring 2010
Homework 1
due: Feb 2, 2010
ChungI Lin
Ruoyu Sun
Yun Zhang
1. Question 1
Given
f
(
n
) and
g
(
n
) are time constructible, there are two Turing Machine
M
1 and
M
2 that
compute
f
(
n
) and
g
(
n
) on input 1
n
in time
O
(
f
(
n
)) and
O
(
g
(
n
)) respectively. We assume
that both
M
1 and
M
2 use Γ =
{
0
,
1
,
±
,
B
}
, have k tapes including input and output tapes
and use LSBﬁrst representation.
(a)
f
(
n
) +
g
(
n
)
We prove that there is a new Turing Machine
M
which has k+2 tapes and computes
f
(
n
) +
g
(
n
) using the following steps:
1.
M
simulates the computation of
M
1 and outputs
f
(
n
) to (k+1)st tape, then
simulates the computation of
M
2 and outputs
g
(
n
) to (k+2)nd tape.
2.
M
moves the heads to left end of (k+1)st and (k+2)nd tapes.
3. Set the Carry Flag to 0.
4. Read a digit from (k+1)st and (k+2)nd tapes respectively and move the heads
to right. Read Carry Flag. Write the computed result back to the output tape.
Update the Carry Flag. Move the head of the output tape to the right.
5. Repeat Step 4, until both heads read
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '08
 Sturtivant,C

Click to edit the document details