ranges from 1 to the n um b er of i clauses | - - PDF document

ranges from 1 to the n um b er of i clauses certainly n
SMART_READER_LITE
LIVE PREVIEW

ranges from 1 to the n um b er of i clauses | - - PDF document

Indep enden t Set Problem Input: a graph and a lo w er b ound . G k Output: \y es" i there are at least k indep endent no des of G ; i.e., no des with no edges in terconnecting. Reduction from: 3SA


slide-1
SLIDE 1 Indep enden t Set Problem Input: a graph G and a lo w er b
  • und
k . Output: \y es" i there are at least k indep endent no des
  • f
G; i.e., no des with no edges in terconnecting. Reduction from: 3SA T.
  • Clearly
, this problem is in N P ; just guess k no des and c hec k that they ha v e no edges among them. The Reduction T ak e a 3-SA T instance suc h as (x + y + z )(
  • x
+
  • z
+ w ).
  • Create
no de [i; j ] for the j th literal in the ith clause.

i ranges from 1 to the n um b er
  • f
clauses | certainly O (n), where n = the input length.

j = 1; 2,
  • r
3.
  • Edges
among the three no des with a common i prev en t more than
  • ne
  • f
them b eing c hosen in an indep enden t set.
  • Edges
b et w een no des for an y literal and its complemen t.

In
  • ur
little example: [1; 1] and [2; 1] are connected (x and
  • x);
[1; 3] and [2; 2] are also connected (z and
  • z
).
  • Pic
k k = n um b er
  • f
clauses. Pro
  • f
the Reduction is Correct
  • First,
supp
  • se
w e ha v e a satisfying truth assignmen t for the v ariables.

Pic k
  • ne
true literal from eac h clause (there could b e more, but not few er).

The no des corresp
  • nding
to these literals form an indep enden t set
  • f
size k .

Wh y? The
  • nly
edges among them w
  • uld
connect no des for dieren t clauses, and these w
  • uld
ha v e to go b et w een a literal and its complemen t, b
  • th
  • f
whic h could not ha v e b een selected. 1
slide-2
SLIDE 2
  • No
w, supp
  • se
w e ha v e an indep enden t set
  • f
size k .

This set cannot ha v e more than
  • ne
no de from an y
  • ne
clause.

This set cannot c ho
  • se
no des corresp
  • nding
to a literal and its complemen t.

Th us, it tells us a truth assignmen t for enough
  • f
the v ariables that ev ery clause is made true. Coping With Complexit y When faced with an NP-complete problem, there are three things w e can do: 1. Appr
  • ximate.
F
  • r
example, do w e need an absolutely maxim um
  • size
indep enden t set?

P erhaps a greedy heuristic (grab an y no de w e see as long as it has no edges connected it to those w e'v e selected already) will get an indep enden t set that is big enough? 2. R estrict. Do w e really need to solv e the problem in all its generalit y? Or could a sp ecial case that has a p
  • lynomial
algorithm serv e
  • ur
needs?

Example, while 3SA T is NP-complete, the 2SA T problem (clauses
  • f
2 literals
  • nly)
has a subtle, linear-time algorithm. 3. T
  • ugh
It Out. Sometimes w e are
  • nly
in terested in problem instances that are small enough that the exp
  • nen
tial gro wth do esn't
  • v
erwhelm
  • ur
resources.

Query
  • ptimization
algorithms are lik e that: ev erything is NP-complete, but database queries tend to b e v ery small.

T ra v eling Salesman is an un usual NP- complete problem b ecause it is in fact v ery easy to solv e ev en 1000-cit y problems. Th us, it is used b y man y snak e-oil salesmen to demonstrate that their fa v
  • rite
algorithmic metho dology \b eats" NP-completeness (e.g., Hopgo
  • d
with neural nets, Adelman with DNA algorithms). Out Bey
  • nd
N P There is no end to the n um b er
  • f
complexit y classes that can b e in v en ted b y mathematically 2
slide-3
SLIDE 3 inclined academics desirous
  • f
gaining ten ure. Some
  • f
these are actually in teresting. Co-NP A language/problem is in Co-NP if its complemen t is in N P .
  • If
P = N P , then Co-NP = N P .

Wh y? b ecause the complemen t
  • f
a problem in P is surely in P , since w e can just complemen t the answ er in
  • ne
more step.
  • Ho
w ev er, if P 6= N P , as w e assume, then Co- NP 6= N P is lik ely , although not certain.
  • Apparen
t example: The complemen t
  • f
SA T (i.e., all Bo
  • lean
expressions that are not satisable, plus the \garbage" that is not a w ell-formed expression) app ears not to b e in N P .

While w e can guess a satisfying truth assignmen t and c hec k that w e guessed righ t in p
  • lynomial
time, there is no w a y to \guess wh y there is no suc h assignmen t."

Note that the nonsatisable expressions are the negations
  • f
the tautolo gies (expressions that are alw a ys true), so tautology testing is another example
  • f
a Co-NP problem that app ears not to b e in N P . PSP A CE A TM that uses no more than p(n) space
  • n
input
  • f
length n, for some p
  • lynomial
p, is said to b e in PSP A CE.
  • Y
  • u
migh t think that it matters whether the TM is deterministic
  • r
nondeterministic, but it do esn't! See b elo w.
  • A
PSP A CE TM can tak e exp
  • nen
tial time b efore accepting.
  • Ho
w ev er, if it tak es more than k p(n) mo v es, where k = sum
  • f
the n um b er
  • f
states and tap e sym b
  • ls,
then it has rep eated an ID and so has a shorter sequence
  • f
mo v es leading to acceptance if it accepts at all. Example The tautology problem is in PSP A CE. 3
slide-4
SLIDE 4
  • Use
linear space to en umerate all p
  • ssible
truth assignmen ts,
  • ne
at a time (i.e., run a coun ter in binary).
  • Chec
k eac h assignmen t, sa y \no" if y
  • u
nd
  • ne
that do esn't mak e the expression true, and sa y \y es" if y
  • u
reac h the end. PSP A CE-complete Problems While P
  • N
P
  • PSP
A CE is
  • b
vious (remem b er that PSP A CE includes nondeterministic TM's), it is not ev en kno wn whether P = PSP A CE.
  • Sa
y a problem L is PSP A CE-c
  • mplete
if ev ery problem in PSP A CE p
  • lynomial-t
ime reduces to L.

Th us, if L is in P , then P = PSP A CE; if L is in N P , then N P = PSP A CE. Example QBF (Quantie d Bo
  • le
an F
  • rmulas)
is a PSP A CE- complete problem.
  • Example
  • f
a QBF: (8x)(9y )(x
  • y
+
  • xy
).

This instance
  • f
QBF has answ er \y es" (true), b ecause w e can pic k y to b e the complemen t
  • f
x. Sa vitc h's Theorem: Equiv alence
  • f
Determini sti c and Nondetermini sti c PSP A CE Key ideas: 1. If a PSP A CE NTM accepts, it do es so within k p(n) steps. 2. A sim ulating DTM uses a recursiv e algorithm to answ er questions
  • f
the form: \do es ID
  • `
* ID
  • in
at most 2 i steps?"
  • Basis
: i = 0. Chec k if
  • =
  • r
  • `
  • .
  • Induction
: F
  • r
eac h p
  • ssible
  • [ID
  • f
length at most p(n)], recursiv ely c hec k if
  • `
*
  • in
at most 2 i1 mo v es and
  • `
*
  • in
at most 2 i1 mo v es.

Return \y es" if an y suc h
  • found;
return \no" if not.

Y
  • u
need
  • nly
  • ne
\stac k frame"
  • f
length p(n) to generate and store eac h p
  • ssible
  • (use
a coun ter in base k ). 4
slide-5
SLIDE 5
  • Clinc
her: W e can limit the stac k to p(n) log 2 k recursiv e calls, taking a total
  • f
p 2 (n) log 2 k space, a p
  • lynomial
if p(n) is.

Wh y? That is enough to answ er the question \do es
  • `
*
  • in
at most 2 p(n) log 2 k = k p(n) mo v es?"

Let
  • b
e the initial ID, and (using a coun ter)
  • b
e an y
  • f
the p
  • ssible
accepting ID's
  • f
length p(n).

Remem b er, if acceptance
  • ccurs,
k p(n) mo v es is enough. 5