Curs2014 Partea3 Extra

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Resource Bounded TMs

A TM has unlimited resources:


time and space.
In practice, we need to restrict them.
TMs with restricted resources are the topic
of complexity theory. Here, we briey intro-
duce the basic concepts of , , etc. .
We use the o-line DTMs and NTMs which
have been introduced before. An o-line TM
(DTM or NTM) has
a read-only input tape;
a read-write work tape; (storage)
212
Note:
1. There are two end-markers at the two ends
of the input word. The read-only head never
moves out of the two ends.
2. Both heads can make three kinds of moves,
i.e., , , .
3. The work tape is initially blank.
Given an o-line DTM , if each accepted
word of length n causes to visit at most
() distinct cells on the work tape, then
is said to be an () space-bounded DTM.
Note:
(1) We only consider accepted words.
(2) () is a function from to .
(3) We only count the cells used on the
work tape.
213
Given an o-line DTM , if each accepted
word of length causes to compute
at most () steps before accepts, then
is said to be a () time-bounded DTM.
Given an o-line NTM , if each accept-
ing conguration sequence visits at most ()
distinct cells on the work tape, then is said
to be an () space-bounded NTM.
Similarly, we dene ()
time-bounded NTMs.
214
A language is of
(1) deterministicspace complexity (), if
= () and is () space-bounded o-
line DTM.
(2) deterministic-time complexity ().
(3) nondeterministic-space complexity ().
(4) nondeterministic-time complexity ().
Attention has focused on
polynomial functions, since these appear to
be the the most practical.
Example:
1 10 20 . . .
100
2
100 10000 40000 . . .
2

2 1024 1048576 . . .
215
We dene the following
four families of languages:
(1)

= { has det.-space
complexity (), for some
polynomial ()}
(2)

= { has deterministic-time
complexity (), for some
polynomial ()}
(3)

= { has nondet.-space
complexity (), for some
polynomial ()}
(4)

= { has nondet.-time
complexity (), for some
polynomial ()}
We know that

and

Why?
216
We also know that

and

Why?
It has been proven that

and that

So, we have

217
Corresponding to these four families of lan-
guages, we have four classes of problems:
(1) PSPACE : the class of all problems that
can be solved in deterministic
polynomial space.
(2) P : the class of all problems that can be
solved in deterministic
polynomial time.
(3) NPSPACE : . . . in nondeterministic
polynomial space
(4) NP: . . . in nondeterministic
polynomial time.
=
problems decision problems languages
? =?
218
We dene a relation on problems (lan-
guages).
For
1
,
2
in

1

2
If
1
requires no more time than
2
to accept.
is transitive and reexive.
It is a pre-order.
is said to be NP-hard if

for all

in

.
is said to be NP-complete if it is also
in

.
A clear concept of NP-completness was
given by Steven Cook. He showed that satis-
ability problem is NP-complete.
219
SATISFIABILITY PROBLEM (SAT)
INSTANCE : A set of variables and a
collection of clauses over .
QUESTION : Is there a satisfying truth as-
signment for ?
SAT is NP-complete.
220

You might also like