SLIDE 1 Advanced Algorithms (VIII)
Shanghai Jiao Tong University
Chihao Zhang
April 26, 2020
SLIDE 2
The Probabilistic Method
SLIDE 3
The Probabilistic Method
Design a probability space Ω
SLIDE 4
The Probabilistic Method
Design a probability space Ω Show that Pr[the object exists] > 0
SLIDE 5
The Probabilistic Method
Design a probability space Ω Show that Pr[the object exists] > 0 Bad events , each happens w.p.
A1, A2, …, Am pi
SLIDE 6
The Probabilistic Method
Design a probability space Ω Show that Pr[the object exists] > 0 Bad events , each happens w.p.
A1, A2, …, Am pi
Is ?
Pr[ ¯ A1 ∧ ¯ A2… ∧ ¯ Am] > 0
SLIDE 7
SLIDE 8
We can apply the union bound
SLIDE 9 We can apply the union bound Pr ⋂
i∈[m]
¯ Ai = 1 − Pr ⋃
i∈[m]
Ai ≥ 1 − ∑
i∈[m]
pi
SLIDE 10 We can apply the union bound Pr ⋂
i∈[m]
¯ Ai = 1 − Pr ⋃
i∈[m]
Ai ≥ 1 − ∑
i∈[m]
pi So if
Pr ⋂
i∈[m]
¯ Ai > 0 ∑
i∈[m]
pi < 1
SLIDE 11 We can apply the union bound Pr ⋂
i∈[m]
¯ Ai = 1 − Pr ⋃
i∈[m]
Ai ≥ 1 − ∑
i∈[m]
pi So if
Pr ⋂
i∈[m]
¯ Ai > 0 ∑
i∈[m]
pi < 1
The union bound is tight when bad events are disjoint
SLIDE 12
SLIDE 13
On the other hand, if the bad events are mutually independent…
SLIDE 14 On the other hand, if the bad events are mutually independent… Pr ⋂
i∈[m]
¯ Ai = ∏
i∈[m]
(1 − pi)
SLIDE 15 On the other hand, if the bad events are mutually independent… Pr ⋂
i∈[m]
¯ Ai = ∏
i∈[m]
(1 − pi) So as long as none of
Pr ⋂
i∈[m]
¯ Ai > 0 pi = 1
SLIDE 16 On the other hand, if the bad events are mutually independent… Pr ⋂
i∈[m]
¯ Ai = ∏
i∈[m]
(1 − pi) So as long as none of
Pr ⋂
i∈[m]
¯ Ai > 0 pi = 1
The two cases correspond to two extremes of the dependency
SLIDE 17
Lovász Local Lemma
SLIDE 18
Lovász Local Lemma
The Lovász local lemma (LLL) captures partial dependency between bad events
SLIDE 19
Lovász Local Lemma
The Lovász local lemma (LLL) captures partial dependency between bad events Erdős and Lovász, Infinite and Finite Sets, 1975
SLIDE 20
The Dependency Graph
SLIDE 21
The Dependency Graph
We describe the dependency of bad events in a graph
SLIDE 22 The Dependency Graph
We describe the dependency of bad events in a graph
A1 A3 A2 A4
SLIDE 23 The Dependency Graph
We describe the dependency of bad events in a graph V = {A1, …, An}
A1 A3 A2 A4
SLIDE 24 The Dependency Graph
We describe the dependency of bad events in a graph V = {A1, …, An}
A1 A3 A2 A4
N(Ai) = {Aj ∣ Ai ∼ Aj}
SLIDE 25 The Dependency Graph
We describe the dependency of bad events in a graph V = {A1, …, An}
A1 A3 A2 A4
N(Ai) = {Aj ∣ Ai ∼ Aj} Δ = max
i∈[m] |N(Ai)|
SLIDE 26 The Dependency Graph
We describe the dependency of bad events in a graph V = {A1, …, An}
A1 A3 A2 A4
N(Ai) = {Aj ∣ Ai ∼ Aj} Δ = max
i∈[m] |N(Ai)|
Ai ⊥ {Aj}j∉N(Ai) Pr[Ai] ≤ p 4Δp ≤ 1
SLIDE 27 The Dependency Graph
We describe the dependency of bad events in a graph V = {A1, …, An}
A1 A3 A2 A4
N(Ai) = {Aj ∣ Ai ∼ Aj} Δ = max
i∈[m] |N(Ai)|
Ai ⊥ {Aj}j∉N(Ai) Pr[Ai] ≤ p 4Δp ≤ 1 ⟹
SLIDE 28 The Dependency Graph
We describe the dependency of bad events in a graph V = {A1, …, An}
A1 A3 A2 A4
N(Ai) = {Aj ∣ Ai ∼ Aj} Δ = max
i∈[m] |N(Ai)|
Ai ⊥ {Aj}j∉N(Ai) Pr[Ai] ≤ p 4Δp ≤ 1 ⟹ Pr ⋂
i∈[m]
¯ Ai > 0
SLIDE 29
Proof of (Symmetric) LLL
SLIDE 30
SLIDE 31
For , we prove by induction on that
S ⊆ [m] |S|
SLIDE 32 For , we prove by induction on that
S ⊆ [m] |S|
∀i ∉ S, Pr Ai ∣ ⋂
j∈S
¯ Aj ≤ 2p
SLIDE 33 For , we prove by induction on that
S ⊆ [m] |S|
∀i ∉ S, Pr Ai ∣ ⋂
j∈S
¯ Aj ≤ 2p Assume and the statement holds for smaller
|S| = s S
SLIDE 34 For , we prove by induction on that
S ⊆ [m] |S|
∀i ∉ S, Pr Ai ∣ ⋂
j∈S
¯ Aj ≤ 2p Assume and the statement holds for smaller
|S| = s S
For every , we use to denote the event
T ⊆ [m] FT ⋂
i∈T
¯ Ai
SLIDE 35
SLIDE 36
It is clear that for every ,
T ∈ ( [m] ≤ s) Pr[FT] ≥ (1 − 2p)s > 0
SLIDE 37
It is clear that for every ,
T ∈ ( [m] ≤ s) Pr[FT] ≥ (1 − 2p)s > 0
We partition into where
S S = S1 ∪ S2 S1 = {j ∣ j ∼ i}
SLIDE 38
It is clear that for every ,
T ∈ ( [m] ≤ s) Pr[FT] ≥ (1 − 2p)s > 0
We partition into where
S S = S1 ∪ S2 S1 = {j ∣ j ∼ i}
If , then
|S2| = s Pr[Ai ∣ S] = Pr[Ai ∣ S2] ≤ p
SLIDE 39
It is clear that for every ,
T ∈ ( [m] ≤ s) Pr[FT] ≥ (1 − 2p)s > 0
We partition into where
S S = S1 ∪ S2 S1 = {j ∣ j ∼ i}
If , then
|S2| = s Pr[Ai ∣ S] = Pr[Ai ∣ S2] ≤ p
Otherwise,
Pr[Ai ∣ FS] = Pr[Ai ∣ FS1 ∩ FS2] = Pr[Ai ∩ FS1 ∩ FS2] Pr[FS1 ∩ FS2]
SLIDE 40
SLIDE 41
Pr[Ai ∣ FS] = Pr[Ai ∩ FS1 ∩ FS2] Pr[FS1 ∩ FS2] = Pr[Ai ∩ FS1 ∣ FS2] Pr[FS1 ∣ FS2]
SLIDE 42
Pr[Ai ∣ FS] = Pr[Ai ∩ FS1 ∩ FS2] Pr[FS1 ∩ FS2] = Pr[Ai ∩ FS1 ∣ FS2] Pr[F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of users, each has a collection of paths connecting them
n m Fi
SLIDE 50
Edge-Disjoint Paths
pairs of users, each has a collection of paths connecting them
n m Fi
Each path in shares edges with no more than paths in for any
Fi k Fj j ≠ i
SLIDE 51
Edge-Disjoint Paths
pairs of users, each has a collection of paths connecting them
n m Fi
Each path in shares edges with no more than paths in for any
Fi k Fj j ≠ i
If , then there is a way to choose edge-disjoint paths connecting pairs
8nk ≤ m n n
SLIDE 52
SLIDE 53
Define the probability space as
SLIDE 54
Define the probability space as “Each pair of users chooses a path from its collection uniformly at random”
SLIDE 55
Define the probability space as “Each pair of users chooses a path from its collection uniformly at random” For every , define the bad event as
i ≠ j Eij
SLIDE 56 Define the probability space as “Each pair of users chooses a path from its collection uniformly at random” For every , define the bad event as
i ≠ j Eij
“the path chosen in
chosen in ”
Fi Fj
SLIDE 57 Define the probability space as “Each pair of users chooses a path from its collection uniformly at random” For every , define the bad event as
i ≠ j Eij
“the path chosen in
chosen in ”
Fi Fj
So we only need to show Pr
⋂
{i,j}∈(
n 2)
¯ Eij > 0
SLIDE 58
SLIDE 59
For each , we have
{i, j} ∈ ( n 2) Pr[Eij] ≤ k m
SLIDE 60 For each , we have
{i, j} ∈ ( n 2) Pr[Eij] ≤ k m
and are dependent only when
Eij Ei′
j′
{i, j} ∩ {i′ , j′ } ≠ ∅
SLIDE 61 For each , we have
{i, j} ∈ ( n 2) Pr[Eij] ≤ k m
and are dependent only when
Eij Ei′
j′
{i, j} ∩ {i′ , j′ } ≠ ∅
So the maximum degree of the dependency graph is at most 2n
SLIDE 62 For each , we have
{i, j} ∈ ( n 2) Pr[Eij] ≤ k m
and are dependent only when
Eij Ei′
j′
{i, j} ∩ {i′ , j′ } ≠ ∅
So the maximum degree of the dependency graph is at most 2n
SLIDE 63 For each , we have
{i, j} ∈ ( n 2) Pr[Eij] ≤ k m
and are dependent only when
Eij Ei′
j′
{i, j} ∩ {i′ , j′ } ≠ ∅
So the maximum degree of the dependency graph is at most 2n The LLL condition is then 8nk ≤ m
SLIDE 64
Satisfiability
SLIDE 65 Satisfiability
Recall that -SAT problem is
k NP k ≥ 3
SLIDE 66 Satisfiability
Recall that -SAT problem is
k NP k ≥ 3
On the other hand, if the formula is sparse, then it is always satisfiable
SLIDE 67 Satisfiability
Recall that -SAT problem is
k NP k ≥ 3
On the other hand, if the formula is sparse, then it is always satisfiable Given , where each
ϕ = C1 ∧ C2… ∧ Cm |Ci| = k
SLIDE 68 Satisfiability
Recall that -SAT problem is
k NP k ≥ 3
On the other hand, if the formula is sparse, then it is always satisfiable Given , where each
ϕ = C1 ∧ C2… ∧ Cm |Ci| = k
The degree of a variable is the number of clauses that or belongs to.
x x ¯ x
SLIDE 69 Satisfiability
Recall that -SAT problem is
k NP k ≥ 3
On the other hand, if the formula is sparse, then it is always satisfiable Given , where each
ϕ = C1 ∧ C2… ∧ Cm |Ci| = k
The degree of a variable is the number of clauses that or belongs to.
x x ¯ x
Let be the maximum degree of variables in
d ϕ
SLIDE 70
SLIDE 71
Theorem. If , then is satisfiable
4kd ≤ 2k ϕ
SLIDE 72 Theorem. If , then is satisfiable
4kd ≤ 2k ϕ
The probability space is the uniform distribution
SLIDE 73 Theorem. If , then is satisfiable
4kd ≤ 2k ϕ
The probability space is the uniform distribution
Each clause defines a bad event “ is not satisfied”
Ci Ai := Ci
SLIDE 74 Theorem. If , then is satisfiable
4kd ≤ 2k ϕ
The probability space is the uniform distribution
Each clause defines a bad event “ is not satisfied”
Ci Ai := Ci
We need to show Pr
⋂
i∈[m]
¯ Ai > 0
SLIDE 75
SLIDE 76
Each clause satisfies
Ci Pr[ ¯ Ai] = 2−k
SLIDE 77
Two clauses are dependent only if they share some variables Each clause satisfies
Ci Pr[ ¯ Ai] = 2−k
SLIDE 78
Two clauses are dependent only if they share some variables Therefore, the maximum degree of the dependency graph is at most kd Each clause satisfies
Ci Pr[ ¯ Ai] = 2−k
SLIDE 79
Two clauses are dependent only if they share some variables Therefore, the maximum degree of the dependency graph is at most kd The LLL condition is 4kd ≤ 2k Each clause satisfies
Ci Pr[ ¯ Ai] = 2−k
SLIDE 80
Asymmetric LLL
SLIDE 81
Asymmetric LLL
In many cases, bad events happen with different probabilities
SLIDE 82 Asymmetric LLL
In many cases, bad events happen with different probabilities Assume there exist such that
x1, …, xn ∈ [0,1]
Pr[Ai] ≤ xi∏
j∼i
(1 − xj)
SLIDE 83 Asymmetric LLL
In many cases, bad events happen with different probabilities Assume there exist such that
x1, …, xn ∈ [0,1]
Pr[Ai] ≤ xi∏
j∼i
(1 − xj) Then Pr [
n
⋂
i=1
¯ Ai] ≥
n
∏
i=1
(1 − xi)
SLIDE 84
Algorithmic LLL
SLIDE 85
Algorithmic LLL
LLL guarantees the existence of a solution
SLIDE 86
Algorithmic LLL
LLL guarantees the existence of a solution Can we find one efficiently?
SLIDE 87
Algorithmic LLL
LLL guarantees the existence of a solution Can we find one efficiently?