2-SAT
Group Aha
2-SAT Group Aha 01 Party problem CONTENTS 02 Model 03 Algorithm 04 - - PowerPoint PPT Presentation
2-SAT Group Aha 01 Party problem CONTENTS 02 Model 03 Algorithm 04 Existence of possible solution 05 Find a possible solution Part I Party Problem Party Problem There is a party to be held in ACM class. There are three types of
Group Aha
01 Party problem 02 Model 03 Algorithm 04 Existence of possible solution 05 Find a possible solution
Part I Party Problem
Part I Party Problem
Xu Zhenjia,Yang Zhuolin
Do we have an approach to satisfy all the relationships?
Part II Model
Part II Model
relationship ->disjunctive normal form
Part II Model
equals 1
(C∨¬X)∧(Q∨¬T)∧(T∨¬Q)∧(Q∨¬F)∧(S∨¬T)∧(X∨Y)∧(S∨Q)∧(¬Y∨¬C)∧(¬Y∨¬T)
Part II Model
R = (C∨¬X)∧(Q∨¬T)∧(T∨¬Q)∧(Q∨¬F)∧(S∨¬T)∧(X∨Y)∧(S∨Q)∧(¬Y∨¬C)∧(¬Y∨¬T)
Part III 2-Sat
assigning values to variables, each of which has two possible values, in order to satisfy a system of constraints on pairs of variables.
Part II Model
𝐷𝑏𝑠
𝐷 ¬𝐷
>1 𝑢𝑝 𝑝 0 𝑜𝑝𝑢 𝑢𝑝 𝑝 >1 𝑜𝑝𝑢 𝑢𝑝 𝑝 0 𝑢𝑝 𝑝
1 𝑄 = 1 ⟹ 𝑅 = 1
Part II Model
Friend
Part II Model
Friend
Part II Model
Friend
Part II Model
Friend
Part II Model
Friend
Part II Model
Pair
Part II Model
Pair
Part II Model
Contradiction
Part II Model
Contradiction
Part II Model
𝑣
⋯⋯
𝑥
1
⋯⋯
𝑣 𝑤L 𝑤M 𝑥
⋯⋯
Part II Model
said to be strongly connected if every vertex is reachable from every other vertex. The strongly connected components of an arbitrary directed graph form a partition into subgraphs that are themselves strongly connected.
SCC(strongly connected component)
Part II Model
𝑣 = 1 ⟹ 𝑣 N = 1
Part II Model
Part III Algorithm
make a perfect plan.
Part III Algorithm
Part III Algorithm
Part III Algorithm
Part III Algorithm
make a perfect plan.
Part III Algorithm
1 1 1 1 1 1
Part III Algorithm
make a perfect plan.
Part IV Existence of possible solution
Part IV Existence of possible solution
𝑣 𝑤 𝑥 ¬𝑣 ¬𝑤 ¬𝑥
Part IV Existence of possible solution
Part IV Existence of possible solution
Part IV Existence of possible solution
Part III Algorithm
make a perfect plan.
Part V Find a possible solution 1
Part V Find a possible solution 1
Part V Find a possible solution 1
Part V Find a possible solution 1
Part V Find a possible solution
1
Group Aha