This preview shows pages 1–5. Sign up to view the full content.
NP
Design and Analysis of Algorithms
Andrei Bulatov
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Algorithms – NP
142
Problems and Algorithms
We can
encode
any combinatorial problem as a binary string
The
length
of a string
s
is denoted by
s
A decision problem
X
is the set of strings on which the answer is “yes”
An algorithm
A
for a decision problem receives an input string
s
and
tputs “yes”
or
“no”
outputs “yes”
Denote the answer by
A(s)
The algorithm
A
solves
X
if
A(s) = “yes”
if and only if
s
∈
X
The algorithm
A
has a
polynomial running time
if there is a polynomial
p
such that for every input string
s,
the algorithm terminates on
s
in
at most
O(p(s))
Algorithms – NP
143
Efficient Certification
By a
“solution”
of a decision problem
X
we understand a certificate
witnessing that an instance is a “yes”instance
We say that an algorithm
B
is an efficient certifier for a problem
X
if
 B
is a polynomial time algorithm that takes two input arguments:
instance
s
and a certificate
t
 there is polynomial
p
such that for every string
s,
we have
s
∈
S
if and only if there exists a string
t
such that
t
≤
p(s)
and
B(s,t) = yes
Denote the answer by
A(s)
Certifying
vs.
Solving
Certifying and brute force
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
144
Efficient Certification: Composite
COMPOSITES.
Given an integer s, is s composite?
Certificate.
A nontrivial factor t of s.
Note that such a certificate exists iff
s is composite.
Moreover t
≤
s.
Certifier.
Instance.
s = 437,669.
Certificate.
t = 541 or 809.
Conclusion.
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 11/11/2009 for the course CS 405/705 taught by Professor Bulatov during the Fall '09 term at Simon Fraser.
 Fall '09
 Bulatov
 Algorithms

Click to edit the document details