You are on page 1of 42

Lecture 8: Property Testing in

Bounded-Degree Graphs, Cont.

1
Review: Property Testing
Tester

?
𝑥 ∈ 0,1 𝑛
?
?

2
Review: Property Testing
Given 𝑥 ∈ 0,1 𝑛 and a property 𝑃 ⊆ 0,1 𝑛 , distinguish between:
• 𝑥 ∈ 𝑃,
• 𝑥 is 𝜖-far from 𝑃:
for all 𝑦 ∈ 𝑃 we have Δ 𝑥, 𝑦 ≥ 𝜖 ⋅ 𝑛.

3
Last Class
• Upper bounds:
• Triangle-freeness • Cycle-freeness
1 1
poly
𝜖
|𝐸| vs 𝑘 − #𝐶𝐶 poly
𝜖

• Connectivity • Bipartiteness
even
1 1
poly 𝑘 ⋅ poly log 𝑘 ,
𝜖 𝜖
vs

odd
4
Today
• Lower bounds
•Ω 𝑘 queries for bipartiteness
•Ω 𝑘 for one-sided cycle-freeness

• Testing any minor-closed property using partition oracles

5
Lower Bound for Bipartiteness
• Reminder – the tester:
1
• Θ 𝑘 ⋅ poly log 𝑘 , 𝜖 short random walks
1
• For a given pair 𝑖, 𝑗 : Pr[𝑖 is even, 𝑗 is odd, both end at 𝑣] ≈ 𝑘
• Need Ω 𝑘 walks to get Θ 𝑘 pairs
• Our goal: match this intuition by a lower bound

6
Structure of the Lower Bound
*(Assume 𝑘 is even)

Two distributions 𝜇0 , 𝜇1
• 𝜇0 generates only bipartite graphs
• 𝜇1 generates “almost only” 𝜖-far from bipartite graphs
(All with degree 3)
• For any tester 𝑇 with 𝑜 𝑘 queries:
𝑇 on 𝐺 ∼ 𝜇0 “looks like” 𝑇 on 𝐺 ∼ 𝜇1

7
The “NO” Distribution
• Random cycle
• 𝜇1 : 𝑣0 , … , 𝑣𝑘−1
• Each 𝑣𝑖 matched to
uniformly random
unmatched 𝑣𝑗
We’ll prove:
Pr [𝐺 is 𝜖-far from
𝐺∼𝜇1
bipartite] = 1 − 𝑜 1
Hamiltonian cycle + perfect matching*
*avoiding cycle edges

8
The “YES” Distribution
• Random cycle
• 𝜇0 : 𝑣0 , … , 𝑣𝑘−1
• Each 𝑣𝑖 matched to
uniformly random
unmatched 𝑣𝑗 such
that 𝑖 ≠ 𝑗 mod 2

Always bipartite

Hamiltonian cycle + bipartite matching


𝑖, 𝑗 ∈ 𝑀 ⇒ dist 𝑖, 𝑗 is odd

9
Need to Prove:
1. Pr [𝐺 is 𝜖-far from bipartite ] = 1 − 𝑜 1
𝐺∼𝜇1
2. Tester making 𝑜 𝑘 queries cannot distinguish 𝜇0 from 𝜇1

11
𝐺 ∼ 𝜇1 is Probably “Far From Bipartite”
• Set 𝜖 = 1/300
• Want: Pr [𝐺 is 𝜖-close to bipartite] = 𝑜 1
𝐺∼𝜇1

• For every partition 𝑉1 , 𝑉2 :


Pr[ random matching has < 𝑘/100 violating edges ] ≪ #partitions
• Claim follows by union bound

12
𝐺 ∼ 𝜇1 is Probably “Far From Bipartite”
• Show something stronger:
Fix a Hamiltonian cycle. Then for
any removal of 𝑘/100 cycle edges
𝑁2 ≪ 𝑁1
any legal partition into 𝑉1 , 𝑉2 :

Random matching has


Pr 𝑘 < 1/𝑁1
≤ 100 violating edges

• Union bound: Pr[∃ removal+good partition] < 𝑁2 Τ𝑁1 ≪ 1


13
Number of Violating Edges
• After choosing 𝑖 edges…
• Let 𝑗 = #unmatched vertices in 𝑉1
• Consider edge 𝑖 + 1:
𝑘−2𝑖
• Total possible edges: < 2
• Violating edges in 𝑉1 × 𝑉1: 2𝑗
• Violating edges in 𝑉2 × 𝑉2: 𝑘−2𝑖−𝑗
2
𝑗 𝑘−2𝑖−𝑗
2 + 2
Pr[violating edge] > 𝑘−2𝑖
2
Intuition?
14
Adding One Matching Edge
𝑗 Τ2
2 + 𝑘−2𝑖−𝑗
2 2 𝑘−2𝑖
2
• Pr[violating edge] = 𝑘−2𝑖 ≥ 𝑘−2𝑖 ≈ 1/2
2 2

𝑥
2
is convex
15
Adding 𝑘/2 Edges
• For the first 0.499𝑘 edges:
each edge is violating w.p. ≥ 1/2
0.499
• E[violating edges] ≥ 𝑘
2
1 2
− 0.499− ⋅ 0.499𝑘
• Pr[fewer than 𝑘/100 violating edges] ≤ 𝑒 100 ≈ 𝑒 −.12𝑘

16
How Many Ways to Chop Up + Partition?
• Removing 𝑘/100 edges:
𝑘Τ100
𝑘 𝑘⋅𝑒
≤ < 2𝑘Τ10
𝑘/100 𝑘Τ100
• Partitions:
2𝑘 vs. 𝑒 −.12𝑘
• Legal partitions:
2#𝑓𝑟𝑎𝑔𝑚𝑒𝑛𝑡𝑠 = 2𝑘Τ100

17
Need to Prove:
1. Pr [𝐺 is 𝜖-far from bipartite ] = 1 − 𝑜 1
𝐺∼𝜇1
2. Any 𝑇 with 𝑜 𝑘 queries cannot distinguish 𝜇0 from 𝜇1

18
Flipped View
• Normally: • Instead:

𝐺 ∼ 𝜇𝑖
19
Edge Queries
• 𝑄 𝑣, 1 = next cycle vertex
• Tester never asks “stupid questions”
• 𝑄 𝑣, 2 = previous cycle vertex • E.g., 𝑄 𝑄 𝑣, 1 , 2
• 𝑄 𝑣, 3 = matched vertex
• 𝑄 𝑣, 1 , 𝑄 𝑣, 2 : random
𝑄 𝑣, 2 vertex with “different parity”
• 𝑄 𝑣, 3 :
𝑣 • 𝜇0 : random vertex with
“different parity”
• 𝜇1 : random vertex
𝑄 𝑣, 3 𝑄 𝑣, 1

20
Indistinguishability With Too Few Queries
Knowledge graph 𝐻: • After 𝑖 queries: |𝐻| ≤ 2𝑖
• 𝑄 𝑣, 𝑗 conditioned on 𝐻:
• W.p. 𝐻 /𝑘: vertex in 𝐻

• W.p. 1 − |𝐻|/𝑘: random vertex


not in 𝐻
21
Indistinguishability With Too Few Queries
If we make 𝑞 queries, coarse bound on • After 𝑖 queries: |𝐻| ≤ 2𝑖
Pr[ game over] =
• 𝑄 𝑣, 𝑗 conditioned on 𝐻:
• W.p. 𝐻 /𝑘: vertex in 𝐻

• W.p. 1 − |𝐻|/𝑘: random vertex


not in 𝐻
22
Conclusion – Lower Bound on Bipartiteness
• Gave two distributions 𝜇0 , 𝜇1
• 𝜇0 : always bipartite
• 𝜇1 : almost always far from bipartite
• Using 𝑜 𝑘 queries: can’t distinguish

23
Lower Bound on One-Sided Cycle-Freeness
• One-sided tester:
• If 𝐺 is cycle-free: must accept
• If 𝐺 is far from cycle-free: reject w.p. ≥ 2/3
• Key property:
• No cycle discovered ⇒ must accept!
𝑘
• 𝐺 ∼ 𝜇1 has + 1 violating edges
2
• Using 𝑜 𝑘 queries: can’t find cycle 𝐺 ∼ 𝜇1

24
Partition Oracles

25
Minor-Closed Properties
• Π is minor-closed if it is closed under:
• Removing edges
• Removing vertices
• Contracting edges

26
Famous Example: Planarity
• 𝐺 is planar iff can be embedded in ℝ2 with no crossing edges

𝐾4

𝐾5

27
Minor-Closed Properties
• Fact: if Π is minor-free, then
𝐺 ∈ Π iff every connected component of 𝐺 is in Π

28
Partition Oracle
• Partition 𝓟 = 𝑃1 , … , 𝑃ℓ of 𝑉 (implicit)
• Oracle: given 𝑣 ∈ 𝑉, returns 𝑃 𝑣 ∈ 𝓟 s.t. 𝑣 ∈ 𝑃 𝑣
• Want:
1. 𝑃𝑖 ≤ 𝑡 for each 𝑖,
2. Each 𝑃𝑖 induces a connected subgraph, 𝛼, 𝑡 -oracle
3. At most 𝛼𝑘 edges 𝑢, 𝑤 have 𝑃 𝑢 ≠ 𝑃 𝑤 .

29
Using a Partition Oracle
• Let Π be a minor-closed property
• Testing Π using a 𝜖𝑑 Τ2 , 𝑡 -oracle:
• Let 𝐺′ = [𝐺, removing all 𝑢, 𝑤 where 𝑃 𝑢 ≠ 𝑃 𝑤 ]
• Remove at most 𝜖𝑑𝑘/2 edges
• If 𝐺 ∈ Π ⇒ 𝐺 ′ ∈ Π
• If 𝐺 is 𝜖-far from Π ⇒ 𝐺′ is ???
• How to test if 𝐺′ ∈ Π ?

30

Testing If 𝐺 ∈ Π
• Vertex 𝑣 is bad if 𝑃 𝑣 ∉ Π
• Claim:
• If 𝐺 ′ ∈ Π, then no vertex is bad
• If 𝐺′ is 𝜖′-far from Π, then at least 𝜖 ′ 𝑘 vertices are bad
• Proof:

31

Testing If 𝐺 ∈ Π
• Vertex 𝑣 is bad if 𝑃 𝑣 ∉ Π
• Claim:
• If 𝐺 ′ ∈ Π, then no vertex is bad
• If 𝐺′ is 𝜖′-far from Π, then at least 𝜖 ′ 𝑘 vertices are bad
• Using the claim:
1
• Sample Θ vertices, check if they are bad
𝜖′

32
Implementing a Partition Oracle
• Given 𝑣 ∈ 𝑉, return 𝑃 𝑣
… without making too many queries
• Actually, we can’t!
• Can get something weaker:
1. 𝑃𝑖 ≤ 𝑡 for each 𝑖, always hold
2. Each 𝑃𝑖 induces a connected subgraph,
3. At most 𝛼𝑘 edges 𝑢, 𝑤 have 𝑃 𝑢 ≠ 𝑃 𝑤 if 𝐺 ∈ Π, holds w.p. ≥ 9/10

33
The Strategy
• Start with 𝓟0 = 𝑣 :𝑣 ∈ 𝑉
• Satisfies 1+2, fails 3
• Coarsen:
• Contract some edges 𝑈1 , 𝑊1 , … , 𝑈ℓ , 𝑊ℓ
• Connectivity preserved
• Fewer edges
• Careful: size increased

34
One Subtlety

35
One Subtlety

Parallel edges!
Represent them with weights
36
What To Contract?
• High-weight edges
• Always control sizes
• Avoid “long chains”

37
One Iteration
• Each 𝑈 chooses heaviest edge 𝑈, 𝑊
• Wants to contract 𝑈, 𝑊

• Each 𝑉 chooses 𝑅 𝑉 ∈ 𝐶𝑒𝑛𝑡𝑒𝑟, 𝐿𝑒𝑎𝑓


• Contract 𝑈, 𝑊 only if 𝑅 𝑈 = 𝐿𝑒𝑎𝑓 and 𝑅 𝑊 = 𝐶𝑒𝑛𝑡𝑒𝑟
𝐿𝑒𝑎𝑓 𝑑𝑒𝑔 ≤ ? ? ?
𝐿𝑒𝑎𝑓 𝐶𝑒𝑛𝑡𝑒𝑟 … … 𝐿𝑒𝑎𝑓
𝐶𝑒𝑛𝑡𝑒𝑟

𝐿𝑒𝑎𝑓

38
Controlling the Size
• 𝑠𝑖 = size bound after iteration 𝑖
• “Weighted degree”: 𝑑𝑖 ≤ 𝑠𝑖 ⋅ 𝑑

𝑠𝑖+1 ≤ 𝑑𝑖 + 1 𝑠𝑖 < 𝑑 + 1 𝑠𝑖2


𝐿𝑒𝑎𝑓 𝑑𝑒𝑔 ≤ 𝑑𝑖
𝐶𝑒𝑛𝑡𝑒𝑟 𝐿𝑒𝑎𝑓

2𝑖 −1
𝑠𝑖 = 𝑑 + 1
𝐿𝑒𝑎𝑓

39
Number of Iterations
• “Progress” = (#cross-edges in iteration 𝑖) / (#cross-edges in iteration 𝑖 − 1)
• Want: w.h.p., progress is constant
• A problem: many equally-heavy edges
• If 𝐺 ∈ Π: “sparse” (bounded arboricity)
• Start from 𝑑𝑘, stop at 𝜖𝑑𝑘
1
⇒ 𝑖 = 𝑂 log
𝜖

2𝑖 −1
𝑠𝑖 = 𝑑 + 1
40
Using a Partition Oracle
• Let Π be a minor-closed property
• Testing Π using a 𝜖𝑑 Τ2 , 𝑡 -oracle:
• Let 𝐺′ = [𝐺, removing all 𝑢, 𝑤 where 𝑃 𝑢 ≠ 𝑃 𝑤 ]
• Remove at most 𝜖𝑑𝑘/2 edges
• If 𝐺 ∈ Π ⇒ 𝐺 ′ ∈ Π
• If 𝐺 is 𝜖-far from Π ⇒ 𝐺′ is 𝜖/2-far from Π
• Test if 𝐺′ ∈ Π by examining 𝑂 1Τ𝜖 random vertices

41
Implementing the Oracle Using Queries
Each 𝑈 chooses heaviest edge 𝑈, 𝑊
Wants to contract 𝑈, 𝑉

Each 𝑉 chooses 𝑅 𝑉 ∈ 𝐶𝑒𝑛𝑡𝑒𝑟, 𝐿𝑒𝑎𝑓


Contract 𝑈, 𝑊 only if 𝑅 𝑈 = 𝐿𝑒𝑎𝑓 and 𝑅 𝑊 = 𝐶𝑒𝑛𝑡𝑒𝑟

42
Conclusion
• Lower bounds of Ω 𝑘 for bipartiteness, one-sided cycle-freeness
• Minor-free properties: partition oracles

• Next time: dense graphs

43

You might also like