Professional Documents
Culture Documents
Lecture 28
Sarmad Abbasi
Virtual University
December 7, 2007
Theory of Computation
December 7, 2007
1 / 30
Theory of Computation
December 7, 2007
2 / 30
Theory of Computation
December 7, 2007
3 / 30
What do we want:
We want a to show that there is a function f that we can compute in
polynomial time such that
1
Theory of Computation
December 7, 2007
4 / 30
Theory of Computation
December 7, 2007
5 / 30
Theory of Computation
December 7, 2007
6 / 30
Theory of Computation
December 7, 2007
7 / 30
Theory of Computation
December 7, 2007
8 / 30
Each entry of the tableau has exactly one entry. we used the
formula cell to express this.
Theory of Computation
December 7, 2007
9 / 30
Theory of Computation
December 7, 2007
10 / 30
Theory of Computation
December 7, 2007
11 / 30
# a b
# a b
b a b
b a b
q0 a b
b q2 b
q0 b b
b c b
These are legal windows.
Theory of Computation
December 7, 2007
12 / 30
Theory of Computation
December 7, 2007
13 / 30
Note that this has to be done once in for all. It need not be
recomputed for each x. (Although it is not hard to compute also
but we do not need to do that!)
Theory of Computation
December 7, 2007
14 / 30
Theory of Computation
December 7, 2007
15 / 30
If W is legal output W .
The above algorithm will compute all legal windows. Provided we can
test if a window is legal. That is not difficult to do!
Theory of Computation
December 7, 2007
16 / 30
If W is legal output W .
The above algorithm will compute all legal windows. Provided we can
test if a window is legal. That is not difficult to do!
Let the output of this algorithm be L the set of all legal windows.
Theory of Computation
December 7, 2007
17 / 30
Note that this has to be done once in for all. It need not be recomputed
for each x. (Although it is not hard to compute also but we do not need
to do that!).
Note that the legality of the window does not depend on the input to
the machine M. It only depends on the transition table of M. Thus the
set of all legal windows can be computed once in for all.
Theory of Computation
December 7, 2007
18 / 30
Theory of Computation
December 7, 2007
19 / 30
Theory of Computation
December 7, 2007
20 / 30
Theory of Computation
December 7, 2007
21 / 30
Theory of Computation
December 7, 2007
22 / 30
Theory of Computation
December 7, 2007
23 / 30
and so on....
Theory of Computation
December 7, 2007
24 / 30
Theory of Computation
December 7, 2007
25 / 30
Let us denote i,j,l to be the formula that says that the (i, j)-th window
is equal to Wl . Then to say that the (i, j)-th window is legal all I have to
do is to say
t
_
(i, j, l)
l=1
This says that the (i, j)-th window is either W1 or W2 or and so on.
Which is equivalent to saying that the (i, j) window is legal.
Theory of Computation
December 7, 2007
26 / 30
(i, j, l)
i,j l=1
Theory of Computation
December 7, 2007
27 / 30
Now, let us look at our grand boolean formula that we have created.
x = cell start accept move
Theory of Computation
December 7, 2007
28 / 30
Theory of Computation
December 7, 2007
29 / 30
On input x
Theory of Computation
December 7, 2007
30 / 30