A randomized algorithm for 2-Satisfiability Captain China Group - - PowerPoint PPT Presentation

a randomized algorithm for 2 satisfiability
SMART_READER_LITE
LIVE PREVIEW

A randomized algorithm for 2-Satisfiability Captain China Group - - PowerPoint PPT Presentation

A randomized algorithm for 2-Satisfiability Captain China Group members: Yaoming Zhu Lantao Yu Rui Meng Ruisheng Cao Chenglong Yang CS214 Captain China Algorithms and complexity Vu Pham 1 Outline Introduction Example Map


slide-1
SLIDE 1

Vu Pham

A randomized algorithm for 2-Satisfiability

Captain China

Group members: Yaoming Zhu Lantao Yu Rui Meng Ruisheng Cao Chenglong Yang

Algorithms and complexity Captain China 1 CS214

slide-2
SLIDE 2

Vu Pham

Introduction

Example——Map Labeling What is Satisfiability? Terminology

A randomized algorithm

Monte-Carlo Algorithm for 2-SAT 2-SAT to random walk on the line Decide Satisfiability

Outline

Algorithms and complexity Captain China CS214 2

slide-3
SLIDE 3

Vu Pham

Example——Map Labeling

Captain China Algorithms and complexity 3 CS214

Sweden Sweden Sweden Sweden Germany Germany Germany Germany France France Italy Italy

slide-4
SLIDE 4

Vu Pham

Example——Map Labeling

Captain China Algorithms and complexity 4 CS214

𝐭𝟐 𝐭𝟑 𝐭𝟒 𝐭𝟓 𝒉𝟐 𝒉𝟑 𝒉𝟒 𝒉𝟓 𝒈𝟐 𝒈𝟑 𝒋𝟐 𝒋𝟑

slide-5
SLIDE 5

Vu Pham

Example——Map Labeling

Captain China Algorithms and complexity 5 CS214

𝐭𝟐 𝐭𝟑 𝐭𝟒 𝐭𝟓 𝒉𝟐 𝒉𝟑 𝒉𝟒 𝒉𝟓 𝒈𝟐 𝒈𝟑 𝒋𝟐 𝒋𝟑

slide-6
SLIDE 6

Vu Pham

Introduction

Example——Map Labeling What is Satisfiability? Terminology

A randomized algorithm

Monte-Carlo Algorithm for 2-SAT 2-SAT to random walk on the line Decide Satisfiability

Outline

Algorithms and complexity Captain China CS214 6

slide-7
SLIDE 7

Vu Pham

Satisfiability(SAT) is the problem of deciding whether a boolean formula in propositional logic allows a boolean assignment to variables so that formula evaluates to true. Example:

What is Satisfiability?

Captain China Algorithms and complexity 7 CS214

No satisfying assignment

slide-8
SLIDE 8

Vu Pham

Introduction

Example——Map Labeling What is 2-Satisfiability Terminology

A randomized algorithm

Monte-Carlo Algorithm for 2-SAT 2-SAT to random walk on the line Decide Satisfiability

Outline

Algorithms and complexity Captain China CS214 8

slide-9
SLIDE 9

Vu Pham

Terminology

Captain China Algorithms and complexity 9 CS214

literal

slide-10
SLIDE 10

Vu Pham

Terminology

Captain China Algorithms and complexity 10 CS214

literal 2-clause 3-clause

slide-11
SLIDE 11

Vu Pham

Terminology

Captain China Algorithms and complexity 11 CS214

literal 2-clause 3-CNF formula 3-clause

slide-12
SLIDE 12

Vu Pham

Terminology

Captain China Algorithms and complexity 12 CS214

literal 2-clause 3-CNF formula 3-clause

A boolean formula is in conjunctive normal form(CNF) if it is the conjunction of clauses, where a clause is the disjunction of literals. A CNF formula with m clauses is of the form:

slide-13
SLIDE 13

Vu Pham

Introduction

Example——Map Labeling What is 2-Satisfiability Terminology

A randomized algorithm

Monte-Carlo Algorithm for 2-SAT 2-SAT to random walk on the line Decide Satisfiability

Outline

Algorithms and complexity Captain China CS214 13

slide-14
SLIDE 14

Vu Pham Captain China Algorithms and complexity 14 CS214

Algorithm for 2-SAT

Giving an instance: a randomly initialized assignment:

F F F T F F

slide-15
SLIDE 15

Vu Pham Captain China Algorithms and complexity 15 CS214

Algorithm for 2-SAT

Giving an instance: a randomly initialized assignment:

F F F T F F F T F T F F

slide-16
SLIDE 16

Vu Pham Captain China Algorithms and complexity 16 CS214

Algorithm for 2-SAT

Giving an instance: a randomly initialized assignment:

F F F T F F T F F T F F

slide-17
SLIDE 17

Vu Pham

Monte-Carlo Algorithm for 2-SAT

Captain China Algorithms and complexity 17 CS214

slide-18
SLIDE 18

Vu Pham

Monte-Carlo Algorithm for 2-SAT

Captain China Algorithms and complexity 18 CS214

Question: If there is a satisfying assignment for , how long does the above algorithm take to discover it ?

slide-19
SLIDE 19

Vu Pham

Introduction

Example——Map Labeling What is 2-Satisfiability Terminology

A randomized algorithm

Monte-Carlo Algorithm for 2-SAT 2-SAT to random walk on the line Decide Satisfiability

Outline

Algorithms and complexity Captain China CS214 19

slide-20
SLIDE 20

Vu Pham Captain China Algorithms and complexity 20 CS214

A random walk on the line

1 2 3 4 5 6

1 2 1 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 Start

slide-21
SLIDE 21

Vu Pham Captain China Algorithms and complexity 21 CS214

A random walk on the line

1 2 3 4 5 6

1 2 1 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2

Let denote the state number of the random walk process after steps.

Start

slide-22
SLIDE 22

Vu Pham Captain China Algorithms and complexity 22 CS214

2-SAT to random walk on the line

What is the relationship between the random walk process and our randomized algorithm ?

slide-23
SLIDE 23

Vu Pham Captain China Algorithms and complexity 23 CS214

2-SAT to random walk on the line

Giving an instance: a satisfying assignment: a randomly initialized assignment: Let denote the number of variables in that has the same assignment as in , after flip operations.

F T F F T T F F F T F F

slide-24
SLIDE 24

Vu Pham Captain China Algorithms and complexity 24 CS214

2-SAT to random walk on the line

Suppose is not a satisfying assignment and the algorithm picks an unsatisfying clause with variables . Case 1: is different from in both and

F T F F T T F F F T F F

slide-25
SLIDE 25

Vu Pham Captain China Algorithms and complexity 25 CS214

2-SAT to random walk on the line

Suppose is not a satisfying assignment and the algorithm picks an unsatisfying clause with variables . Case 2: is different from

  • nly in

(or )

F T F F T T F F F T F F

slide-26
SLIDE 26

Vu Pham Captain China Algorithms and complexity 26 CS214

2-SAT to random walk on the line

Key Point: The variable behave just like the random walk variable except that:

Sometimes going to the correct direction with 100% probability Might have instead of Might stop early, before

slide-27
SLIDE 27

Vu Pham Captain China Algorithms and complexity 27 CS214

2-SAT to random walk on the line

The random walk is the worst case for 2-SAT! Let denote the number of random walk steps to get to from . Claim: is the upper bound of the running time

  • f the randomized algorithm for 2-SAT.
slide-28
SLIDE 28

Vu Pham Captain China Algorithms and complexity 28 CS214

2-SAT to random walk on the line

Edge cases: Otherwise:

slide-29
SLIDE 29

Vu Pham Captain China Algorithms and complexity 29 CS214

2-SAT to random walk on the line

slide-30
SLIDE 30

Vu Pham

Introduction

Example——Map Labeling What is 2-Satisfiability Terminology

A randomized algorithm

Monte-Carlo Algorithm for 2-SAT 2-SAT to random walk on the line Decide Satisfiability

Outline

Algorithms and complexity Captain China CS214 30

slide-31
SLIDE 31

Vu Pham Captain China Algorithms and complexity 31 CS214

Decide Satisfiability

Can we use the algorithm to decide the satisfiability of a CNF ?

slide-32
SLIDE 32

Vu Pham Captain China Algorithms and complexity 32 CS214

Decide Satisfiability

Theorem:

For a satisfiable 2-SAT instance with variables, running the algorithm for iterations will produce a satisfying assignment with probability larger than

Proof:

slide-33
SLIDE 33

Vu Pham Captain China Algorithms and complexity 33 CS214

Decide Satisfiability

The error probability is

slide-34
SLIDE 34

Vu Pham

End

Thanks!

Captain China Algorithms and complexity 29 CS214