-sat what’s up with randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · differential...

22
What’s up with Random -SAT Dimitris Achlioptas Microsoft

Upload: others

Post on 18-Jan-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

What’s up with Random �-SAT

Dimitris Achlioptas

Microsoft

Page 2: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Satisfiability

Given a Boolean formula (CNF), decide if a satisfying truth assignment exists.

���� � ��� � ���� � ��� � �� � ���� � � � � � ����� � ���� � �� � ����

Cook’s Theorem: Satisfiability is NP-complete.

�-SAT: Each clause has exactly � literals.

� � �: Pick any variable and set it arbitrarily. (1 choice)

Satisfy any implications (repeatedly).

Either get a subformula or a contradiction.

� � �: NP-complete

Page 3: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Random �-SAT

� Since the mid-70s a number of models have been proposed for Random SATisfiability.

Most models generate formulas that are too easy.

Let ���� be the set of all ���

��

��-clauses on � variables. [with distinct, non-complementary literals]

�������: a random �-SAT formula with � clauses over � variables, formed by selecting

uniformly at random � clauses from ���� [with replacement]

For all � � � and � � ��, there exists ���� �� � � such that almost surely: ����� ��� is

unsatisfiable but every resolution proof of its unsatisfiability has at least ��� clauses.

[Chvatal, Szemeredi 88]

Page 4: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Satisfiability Threshold Conjecture

[Mitchel, Selman, Levesque 92]

Conjecture: For each �, there exists a constant �� such that for any � �,

������

��������is satisfiable� ��

if � � ��� � ��

� if � � ��� � ��

Page 5: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Known Results

� � � � � Yes, �� � . [Chvatal,Reed 92], [Goerdt 92], [Fernandez de la Vega 92]

Idea: Look at the “forced choices" branching process.

� � � � � We don’t know if �� exists.

� Easy bounds:��

� �� ��.

� [Friedgut 97]: For each � � � there exists a function ����� such that

������

�������� is satisfiable� ��

if � � ������� ��

� if � � ������ � ��

Idea: All small subformulas are innocuous.

Page 6: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Random 3-SAT

JansonStamatiouVamavkari

1999

KamathMotwaniPalemSpirakis

1995

Folkore

1980s

Fernandez de la VegaEl Maftouhi

1995

KirousisKranakisKrizancStamatiou

1997

4.596 4.602 4.758 5.081 5.191

2000

Achlioptas

8/3 3.1452.9 3.003

1986

ChaoFranco

1995

FriezeSuen

1993

BroderFriezeUpfal

1.63

2000

AchlioptasSorkin

3.261

� Upper bounds come from probabilistic counting arguments.

� Pure literal heuristic: satisfy only literals whose complement does not appear in the formula.Exact analysis gives �� � �������

Page 7: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Unit-Clause Propagation (and Extensions)

If there exist 1-clauses (unit clauses)

then

pick a 1-clause u.a.r. and satisfy it

else

select a literal and satisfy it

� Value assignments are permanent (no backtracking)

� Failure occurs iff a 0-clause is ever generated

� The algorithm goes on to set all the variables even if a 0-clause is generated

select

UC: Pick a variable � u.a.r.; select � ��� � u.a.r. ���

UCwm: Pick a variable � u.a.r.; select � ��� � that appears among more 3-clauses. ���

GUC: Pick a shortest clause � � � � � � � � �� u.a.r.; select � � �� � � � � � u.a.r. �����

Page 8: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Uniform Randomness

For all � � � and all � � �:

The set of �-clauses remaining after � steps is uniformly random conditional on its size.

� Initially, all cards are “face down"; 3 cards per clause.

� We can

���

Name a variableor

Point to a card

� As a result, all cards with the named/underlying variable turn “face up".

� After we set the variable: all cards corresponding to satisfied clauses get removed;

all cards corresponding to the unsatisfied literal get removed.

Page 9: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Flows and Buckets

Ci(t) is the number

of i-clauses remaining

? after t variables are set.

Satisfied clauses

123 0

� If for some �,

�����

�� �� � �� the algorithm will a.s. fail.

� The expected number of 1-clauses generated in round � is

�����

�� �� �� �.

� If for all �,

�����

�� � � �� the algorithm succeeds with probability at least � � ��� � �.

If for some �� we can show that a.s.

�����

�� � � � � for all � then �� � ��.

Page 10: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Tracing the number of 2-clauses

Unit Clause

Every step is “the same": we assign a random value, to a randomly chosen unset variable.

Implication: ����� is a sum of Binomial random variables. Maximizing over � gives

�� � ����

Alternatively: ��������� � ������� �� ������ � ���� ������ ������ �

All Other Algorithms

� There are “forced" steps (1-clauses are present) and “free" steps (1-clauses are not present).

��������� depends on �� ������ ����� and on whether ����� �� �.

��������� � ���� ������ ������ ������ �Knowing each of �� ������ ������ ����� within ���� is not good enough.

Page 11: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

A “Workaholic" Server Lemma

A simple queueing system

� Time is discrete � � �� � �� � � �

� In each step, Poisson��� packets arrive at the queue.

� In each step, the server serves precisely one packet.

(If packets exist; otherwise, the server goes to sleep.)

Queuing Theory:

If � �, the expected queue size is bounded and the server sleeps � � fraction of the time.

Page 12: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

A “Mediterranean" Server Lemma

Same queueing, different server

� Time is discrete � � �� � �� � � �

� In each step, Poisson��� packets arrive at the queue.

� In each step, the server flips a coin that says “wake" with probability � and “sleep" otherwise.

If awake, the server attempts to serve precisely one packet.

A 4000 thousand year tradition (with a recent proof):

If � � �, the expected queue size is bounded and the server sleeps � � fraction of the time.

If there exist 1-clauses then pick a 1-clause u.a.r. and satisfy it� � �

vs.

With probability � � ������

�� �

attempt to pick a 1-clause u.a.r. and satisfy it� � �

Now ��������� � ���� ������ ������.

Page 13: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Differential Equations

[Kurtz 78, Karp Sipser 81, Wormald 95]

If we have random variables ��� ��� � � � � �� evolving jointly such that:

� At each step �,

� ���� �� � �� ������ � � � � ����� ���� � �� �

where the �� are all Lipschitz continuous.

� The r.v. ��� have reasonable tail behavior.

Then w.h.p. ����� � ����� � �� ���� where ����� is the solution of

������ ��.

The evolution is stable under small perturbations of the state.

Page 14: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Differential Equations in action

UC

��������� � �

������

�� �

������ � �

������ � �

��� �� � �

�� � ����

����� � �� ����� � �

��������� ��

������

�� ��

�����

�� �

������ �

������

��� ���

�����

�� �

����� � � ����� � �

GUC

��������� �

������

��� ���

�����

�� ��

��������

�� ��

������ �

������

��� ���

�����

��� ��� �

����� � � ����� � �

�����

�� �� ���

����� � �

��� �� � �� ���

�������

������ �� � ��� � � �� UC

������ ��� � � ��� �� � ��� � � ����� � � � GUC

Page 15: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

What is an algorithm to do?

� We want to minimize the ��� ��-flow to keep the 2-clause density low.

� We want to minimize the ��� �-flow to have more free steps (opportunities).

If we can set � so as to minimize both flows simultaneously, then the choice is clear.

But what if this is not possible?

Should one commit to what appears good now

or

sacrifice current benefits for greater flexibility in the future?

Answer: LP-duality.

Page 16: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

On the value of freedom� Consider � rounds, where � �.

We will encounter each 4-tuple � of potential flows, very close to �� � � times.

� The flattest possible slope at each point is given by a max-density knapsack problem.

Say �’s appearances are ���� � ��

� � ��

� � ��

� �. We set � to 1 iff: ��� � ��� � ����� � ��� �.

Moreover,

� � ����� ��� ���� � ����� � ����

� ��

This gives �� � ���� for one-at-a-time and �� � ���� for two-at-a-time.

[Ach., Sorkin 00]

Page 17: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Getting better algorithms� Use a model for the analysis that allows explicit access to degree information: formulas are

now uniformly random, conditional on their entire degree sequence.

� Dispense with “uniform-randomness" for the 2-clauses. Since 2-SAT is tractable, we can afford

a less naive approach for 2-clauses.

General �UC:

���

[Chao, Franco 85]

SC: � � � ��

[Chvatal, Reed 92]

GUC: ��� � ��

[Frieze, Suen 95]

Page 18: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

First moment method

For any non-negative, integer-valued random variable � ,

�� � �� ���� �

Let � be the number of satisfying truth assignments of ����� � ���. Fix a t.a. �

�� is satisfying� ��

� ��

��

Therefore,

���� � �� ��

� ��

���

��

��

� ��

����� �� �

if ��

� ���

�� . Thus,

�� �� �� � �

For general �, local maximality only gives

�� �� ��!� � �

Page 19: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Second moment method

For any non-negative random variable � ,

�� � �� � �����

������

Let � be the number of satisfying truth assignments of ����� � ���.

����� � ���"� � � � �� "�����

�� Both "� " are satisfying t.a.�

� ���

��

�#

��Both

�� � ��� � � � � and

�� � ��� � � � �

���� � � � � � are satisfying�

� � �

� ���

������

� � ���� � $���

$�� � $����

���

�$ � #���

� � � ��$���

where �� ��� � !�������. Unfortunately, � is always maximized for some $ � ��...

Page 20: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Abstinence

Not-All-Equal Satisfiability: each clause must have at least one satisfied literal

and at least one unsatisfied literal.

Observation: If � is NAE-satisfying, so is its complement �.

Let � be the number of NAE-satisfying truth assignments of ����� � ���.

����� � � � �

� � �

� � � �

� ������ �for some constant � � �. The existence of a sharp threshold completes the proof.

Intuition: NAE-assignments look like a “mist" on ��� �. This greatly reduces variance.

Page 21: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Random NAE-�-SAT

[First moment method] For all � � and all � � ���, if

� � �� �� ��

� �� ��

� ��

then w.h.p. ���� ��� has no NAE-satisfying truth assignments.

Theorem 1 For all � � and all � � ���, if� �� �� �

� �� ��

� ��

then w.h.p. ���� ��� has exponentially many NAE-satisfying truth assignments.

[Ach., Moore STOC ’02]

� � � � � � � �� �� ��

Our bound ��� ����� ������ ���� ������ ������� ������ ������� �������

Upper bound ���� ������ ������ ����� ������ ������� ������ ������� �������

Page 22: -SAT What’s up with Randomemc/spring06/home1_files/sat-talk.pdf · 2006. 4. 3. · Differential Equations [Kurtz 78, Karp Sipser 81, Wormald 95] If we have random variables evolving

Moderation

Observation 1: The “populist" t.a. have a huge advantage towards satisfiability.

Observation 2: This advantage disappears for NAE �-SAT.

Let � be the number of satisfying truth assignments of ����� � ��� that satisfy��

� !��

��

literal occurrences, i.e. as many as a random assignment.

Theorem 2 For all � � and all � � ���,

�� � �� �� �� ���� ����� � �[Ach., Peres 02]