































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The concepts of p, np, and np-complete problems in computer science. It discusses the differences between polynomial time problems and intractable problems, the argument that mazes are not in p, and the implications of this for maze solving algorithms. The document also introduces non-deterministic polynomial time problems and the concept of np-completeness.
Typology: Study notes
1 / 39
This page cannot be seen from the preview
Don't miss anything!
Dec
xkcd.com
< day
< month
year
polynomial time
The
Halting
Problem
permutation
generation
travelling
salesman?
knapsack?
www.shawnolson.net
LongestPath(G,u,v,k): Is
there
a
simple
(non
cyclic)
path
in
from
vertex
u
to
vertex
v
of
length
k?
LongestPath
∉
P
Poundstone
argues
that
a
maze
is
equivalent
to
LongestPath(Maze,
start,
goal,
therefore
Maze
∉
P
What
is
wrong
with
his
argument?!?!?
maze
is
simply
an
undirected
graph.
Each
junction
is
a
vertex
and
corridors
are
edges.
Let
b
be
the
average
branching
factor
(assume
b=2)
BFS
builds
a
tree
of
paths
tree
height,
h,
is
length
of
shortest
path
from
start
to
goal
tree
has
2
h
nodes,
complexity
is
O(
h
)?
Can
we
apply
Floyd’s
Algorithm,
O(n
3
for
all
pairs
shortest
path?
Dijkstra’s
algorithm,
2
for
single
source
shortest
paths?
We’d need to first build an adjacency matrixor adjacency list,which requires traversing the entire graph
BFS? DFS? …
How
long
will
it
take
for
some
copy
of
the
robot
to
reach
the
goal?
Simultaneously
traversing
all
paths
is
equivalent
to
breadth
first
search
We
will
reach
goal
in
the
time
it
takes
to
traverse
the
shortest
path
to
the
goal
Time
to
solve
the
maze
is
(in
the
unrealistic
world
of
infinite
resources)
The
self
replicating
robots
are
an
example
of
a
non
deterministic
computer
An
gets
to
a
solution
in
the
shortest
possible
time.
Alternative
views:
NDC
is
a
perfect
guesser:
only
has
to
verify
that
guess
is
correct
NDC
is
can
simultaneously
check
every
possible
solution