advanced algorithms (i)chihaozhang.com/teaching/aa2020spring/slides/lec1-slides.pdfinformation every...
TRANSCRIPT
![Page 1: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/1.jpg)
Shanghai Jiao Tong University
Chihao Zhang
Advanced Algorithms (I)
March 2nd, 2020
![Page 2: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/2.jpg)
Information
Every Monday, 10:00 am - 11:40 am
Zoom @ 123363659
Instructor: 张驰豪 ([email protected])
TA: 杨凤麟 ([email protected])
Office Hour: via Canvas or WeChat Group
![Page 3: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/3.jpg)
References
Probability and Computing Randomized Algorithms The Probabilistic Method
M. Mitzenmacher & E. Upfal R. Motwani & P. Raghavan N. Alon & J. Spencer
![Page 4: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/4.jpg)
Polynomial Identity Testing
![Page 5: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/5.jpg)
Polynomial Identity TestingGiven two polynomials
and F(x) =d
∏i=1
(x − ai) G(x) =d
∑i=0
bixi
![Page 6: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/6.jpg)
Polynomial Identity TestingGiven two polynomials
and F(x) =d
∏i=1
(x − ai) G(x) =d
∑i=0
bixi
Is F(x) ≡ G(x)?
![Page 7: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/7.jpg)
Polynomial Identity TestingGiven two polynomials
and F(x) =d
∏i=1
(x − ai) G(x) =d
∑i=0
bixi
Is F(x) ≡ G(x)?
Example. F(x) = (x − 1)(x − 2)(x + 3); G(x) = x3 − 7x + 6
![Page 8: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/8.jpg)
![Page 9: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/9.jpg)
One can expand and compare the coefficients…F(x)
![Page 10: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/10.jpg)
One can expand and compare the coefficients…F(x)
It takes arithmetic operations.O(d2)
![Page 11: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/11.jpg)
One can expand and compare the coefficients…F(x)
It takes arithmetic operations.O(d2)
Can be improved to using FFT.O(d log d)
![Page 12: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/12.jpg)
One can expand and compare the coefficients…F(x)
It takes arithmetic operations.O(d2)
Can be improved to using FFT.O(d log d)
If random coins are allowed…
![Page 13: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/13.jpg)
One can expand and compare the coefficients…F(x)
It takes arithmetic operations.O(d2)
Can be improved to using FFT.O(d log d)
If random coins are allowed…
• The problem can be solved much faster
![Page 14: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/14.jpg)
One can expand and compare the coefficients…F(x)
It takes arithmetic operations.O(d2)
Can be improved to using FFT.O(d log d)
If random coins are allowed…
• The problem can be solved much faster
• at the cost of making error.
![Page 15: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/15.jpg)
![Page 16: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/16.jpg)
Choosing a uniform number s ∈ {1,2,…,100d}
![Page 17: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/17.jpg)
Choosing a uniform number s ∈ {1,2,…,100d}
Test whether F(s) = G(s)
![Page 18: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/18.jpg)
Choosing a uniform number s ∈ {1,2,…,100d}
Test whether F(s) = G(s)
• If , then it always holds that F(x) ≡ G(x) F(s) = G(s)
![Page 19: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/19.jpg)
Choosing a uniform number s ∈ {1,2,…,100d}
Test whether F(s) = G(s)
• If , then it always holds that F(x) ≡ G(x) F(s) = G(s)
• If , how likely is that ?F(x) ≢ G(x) F(s) ≠ G(s)
![Page 20: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/20.jpg)
Choosing a uniform number s ∈ {1,2,…,100d}
Test whether F(s) = G(s)
• If , then it always holds that F(x) ≡ G(x) F(s) = G(s)
• If , how likely is that ?F(x) ≢ G(x) F(s) ≠ G(s)
Theorem. (Fundamental Theorem of Algebra)
A polynomial of degree has at most roots in d d ℂ
![Page 21: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/21.jpg)
![Page 22: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/22.jpg)
Our algorithm outputs wrong answer only when
![Page 23: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/23.jpg)
Our algorithm outputs wrong answer only when
• ; andF(x) ≢ G(x)
![Page 24: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/24.jpg)
Our algorithm outputs wrong answer only when
• ; andF(x) ≢ G(x)
• is a root of s F(x) − G(x)
![Page 25: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/25.jpg)
Our algorithm outputs wrong answer only when
• ; andF(x) ≢ G(x)
• is a root of s F(x) − G(x)
This happens with probability at most .1
100
![Page 26: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/26.jpg)
Our algorithm outputs wrong answer only when
• ; andF(x) ≢ G(x)
• is a root of s F(x) − G(x)
This happens with probability at most .1
100
It only costs operations to compute and .O(d) F(s) G(s)
![Page 27: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/27.jpg)
Our algorithm outputs wrong answer only when
• ; andF(x) ≢ G(x)
• is a root of s F(x) − G(x)
This happens with probability at most .1
100
It only costs operations to compute and .O(d) F(s) G(s)
One can repeat the algorithm times: t
• error reduces to ;100−t
• cost increases to .O(td)
![Page 28: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/28.jpg)
Multi-variable Polynomials
![Page 29: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/29.jpg)
Multi-variable Polynomials
The idea applies to a more general setting.
![Page 30: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/30.jpg)
Multi-variable Polynomials
The idea applies to a more general setting.
Let for some field ,F, G ∈ 𝔽(x1, …, xn) 𝔽
![Page 31: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/31.jpg)
Multi-variable Polynomials
The idea applies to a more general setting.
Let for some field ,F, G ∈ 𝔽(x1, …, xn) 𝔽
Is F(x1, …, xn) ≡ G(x1, …, xn)?
![Page 32: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/32.jpg)
Theorem. (Schwartz-Zippel Theorem)
Let be a non-zero multivariate polynomial of degree at most . For any set , it
holds that
Q ∈ 𝔽[x1, …, xn]d U ⊆ 𝔽
Prr1,…,rn∈RU
[Q(r1, …, rn) = 0] ≤d
|U |
![Page 33: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/33.jpg)
Proof of Schwartz-Zippel
![Page 34: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/34.jpg)
Proof of Schwartz-Zippel
Induction on , case is Fundamental Theorem of Algebra.
n n = 1
![Page 35: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/35.jpg)
Proof of Schwartz-Zippel
Induction on , case is Fundamental Theorem of Algebra.
n n = 1
Assuming it holds for smaller …n
![Page 36: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/36.jpg)
Proof of Schwartz-Zippel
Induction on , case is Fundamental Theorem of Algebra.
n n = 1
Assuming it holds for smaller …n
Q(x1, …, xn) =k
∑i=0
xi1 ⋅ Qi(x2, …, xn)
![Page 37: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/37.jpg)
Proof of Schwartz-Zippel
Induction on , case is Fundamental Theorem of Algebra.
n n = 1
Assuming it holds for smaller …n
Q(x1, …, xn) =k
∑i=0
xi1 ⋅ Qi(x2, …, xn)
Pr [Q = 0] ≤ Pr [Qk = 0] + Pr [Q = 0 |Qk ≠ 0] ≤d − k|U |
+k
|U |
![Page 38: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/38.jpg)
![Page 39: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/39.jpg)
Our randomized algorithm generalizes to the multi-variable setting by Schwartz-Zippel theorem.
![Page 40: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/40.jpg)
Our randomized algorithm generalizes to the multi-variable setting by Schwartz-Zippel theorem.
If the polynomials are given in product form, one scan of and is sufficient to evaluate them.F G
![Page 41: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/41.jpg)
Our randomized algorithm generalizes to the multi-variable setting by Schwartz-Zippel theorem.
If the polynomials are given in product form, one scan of and is sufficient to evaluate them.F G
Linear time algorithm with at most error!1 %
![Page 42: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/42.jpg)
Our randomized algorithm generalizes to the multi-variable setting by Schwartz-Zippel theorem.
If the polynomials are given in product form, one scan of and is sufficient to evaluate them.F G
Linear time algorithm with at most error!1 %
It is a wide open problem in the complexity theory that whether this can be done in deterministic polynomial time.
![Page 43: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/43.jpg)
Some Complexity Theory
![Page 44: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/44.jpg)
Some Complexity Theory
Problems solvable in deterministic polynomial-time: P
![Page 45: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/45.jpg)
Some Complexity Theory
Problems solvable in deterministic polynomial-time: P
Problems solvable in randomized polynomial-time: BPP
![Page 46: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/46.jpg)
Some Complexity Theory
Problems solvable in deterministic polynomial-time: P
Problems solvable in randomized polynomial-time: BPP
Is ?BPP = P
![Page 47: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/47.jpg)
Min-Cut in a Graph
![Page 48: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/48.jpg)
Min-Cut in a GraphA cut in a graph is a set of edges whose removal disconnects .
G = (V, E) C ⊆ EG
![Page 49: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/49.jpg)
Min-Cut in a GraphA cut in a graph is a set of edges whose removal disconnects .
G = (V, E) C ⊆ EG
How to find the minimum cut?
![Page 50: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/50.jpg)
Min-Cut in a GraphA cut in a graph is a set of edges whose removal disconnects .
G = (V, E) C ⊆ EG
How to find the minimum cut?
It can be solved using max-flow techniques
![Page 51: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/51.jpg)
Min-Cut in a GraphA cut in a graph is a set of edges whose removal disconnects .
G = (V, E) C ⊆ EG
How to find the minimum cut?
It can be solved using max-flow techniques
With the fastest max-flow algorithm, it takes time.
O(n × mn)
![Page 52: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/52.jpg)
Karger’s Min-Cut Algorithm
![Page 53: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/53.jpg)
Karger’s Min-Cut Algorithm
David Karger
![Page 54: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/54.jpg)
Karger’s Min-Cut Algorithm
David Karger
Using random bits, Karger found a much simpler algorithm
![Page 55: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/55.jpg)
Karger’s Min-Cut Algorithm
David Karger
Using random bits, Karger found a much simpler algorithm
The only operation required is edge contraction
![Page 56: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/56.jpg)
Edge Contraction
![Page 57: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/57.jpg)
Edge Contraction
1
2
3
![Page 58: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/58.jpg)
Edge Contraction
1
2
3
1
2
3
![Page 59: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/59.jpg)
Edge Contraction
1
2
3
1
2
3
![Page 60: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/60.jpg)
Edge Contraction
1
2
3
1
2
3 1/2 3
![Page 61: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/61.jpg)
Edge Contraction
1
2
3
1
2
3 1/2 3
![Page 62: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/62.jpg)
Edge Contraction
1
2
3
1
2
3 1/2 3
• no self-loop
![Page 63: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/63.jpg)
Edge Contraction
1
2
3
1
2
3 1/2 3
• parallel edges may exist
• no self-loop
![Page 64: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/64.jpg)
The Algorithm
![Page 65: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/65.jpg)
The Algorithm
Karger’s Min-cut Algorithm
1. Randomly choose an edge and contract it until only two vertices remains.
2. Output remaining edges.
![Page 66: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/66.jpg)
Analysis
![Page 67: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/67.jpg)
AnalysisThe algorithm contracts pair of vertices in total.n − 2
![Page 68: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/68.jpg)
AnalysisThe algorithm contracts pair of vertices in total.n − 2
Fix an minimum cut , we bound the probability that it survives.
C
![Page 69: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/69.jpg)
AnalysisThe algorithm contracts pair of vertices in total.n − 2
Fix an minimum cut , we bound the probability that it survives.
C
Assume the removal of separates and .
C S ⊆ VS̄ = V∖S
![Page 70: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/70.jpg)
AnalysisThe algorithm contracts pair of vertices in total.n − 2
Fix an minimum cut , we bound the probability that it survives.
C
Assume the removal of separates and .
C S ⊆ VS̄ = V∖S
All contractions happen within or .S S̄
![Page 71: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/71.jpg)
![Page 72: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/72.jpg)
For , let be the event that “ -th contraction avoids ”
i = 1,…, n − 2 Ai iC
![Page 73: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/73.jpg)
For , let be the event that “ -th contraction avoids ”
i = 1,…, n − 2 Ai iC
We need to bound
![Page 74: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/74.jpg)
For , let be the event that “ -th contraction avoids ”
i = 1,…, n − 2 Ai iC
We need to bound
Pr [n−2
⋂i=1
Ai] =n−2
∏i=1
Pr Ai
i−1
⋂j=1
Aj
![Page 75: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/75.jpg)
For , let be the event that “ -th contraction avoids ”
i = 1,…, n − 2 Ai iC
We need to bound
Pr [n−2
⋂i=1
Ai] =n−2
∏i=1
Pr Ai
i−1
⋂j=1
Aj
We assume |C | = k
![Page 76: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/76.jpg)
![Page 77: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/77.jpg)
In -th contraction,i
![Page 78: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/78.jpg)
In -th contraction,i
• the graph contains vertices;
• each vertex is of degree at least .
n − i + 1
k
![Page 79: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/79.jpg)
In -th contraction,i
• the graph contains vertices;
• each vertex is of degree at least .
n − i + 1
k
Therefore, conditional on that still survives,C
![Page 80: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/80.jpg)
In -th contraction,i
• the graph contains vertices;
• each vertex is of degree at least .
n − i + 1
k
Therefore, conditional on that still survives,C
Pr Ai
i−1
⋂j=1
Aj ≥ 1 −2k
k(n − i + 1)=
n − i − 1n − i + 1
![Page 81: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/81.jpg)
![Page 82: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/82.jpg)
Therefore
![Page 83: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/83.jpg)
Therefore
Pr [n−2
⋂i=1
Ai] =n−2
∏i=1
Pr Ai
i−1
⋂j=1
Aj
≥n−2
∏i=1
n − i − 1n − i + 1
=n − 2
n⋅
n − 3n − 1
⋯13
=2
n(n − 1)
![Page 84: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/84.jpg)
![Page 85: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/85.jpg)
So if we repeat the algorithm times, the minimum cut survives with probability at least
50n2
![Page 86: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/86.jpg)
So if we repeat the algorithm times, the minimum cut survives with probability at least
50n2
1 − (1 −2
n(n − 1) )50n2
≥ 1 − e−100
![Page 87: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/87.jpg)
So if we repeat the algorithm times, the minimum cut survives with probability at least
50n2
1 − (1 −2
n(n − 1) )50n2
≥ 1 − e−100
How about the time cost?
![Page 88: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/88.jpg)
So if we repeat the algorithm times, the minimum cut survives with probability at least
50n2
1 − (1 −2
n(n − 1) )50n2
≥ 1 − e−100
How about the time cost?
If we store the graph in a adjacency matrix, one needs to contract an edge…O(n)
![Page 89: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/89.jpg)
Karger-Stein’s Trick
![Page 90: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/90.jpg)
Karger-Stein’s Trick
Recall Pr [n−2
⋂i=1
Ai] =n − 2
n⋅
n − 3n − 1
⋯13
![Page 91: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/91.jpg)
Karger-Stein’s Trick
Recall Pr [n−2
⋂i=1
Ai] =n − 2
n⋅
n − 3n − 1
⋯13
The more we contracts, the easier gets hitC
![Page 92: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/92.jpg)
Karger-Stein’s Trick
Recall Pr [n−2
⋂i=1
Ai] =n − 2
n⋅
n − 3n − 1
⋯13
The more we contracts, the easier gets hitC
Idea: Make a copy before it becomes too bad!
![Page 93: Advanced Algorithms (I)chihaozhang.com/teaching/AA2020spring/slides/lec1-slides.pdfInformation Every Monday, 10:00 am - 11:40 am Zoom @ 123363659 Instructor: 张驰豪 (chihao@sjtu.edu.cn)](https://reader035.vdocuments.site/reader035/viewer/2022081406/5f184af4ba4adb33030b4cea/html5/thumbnails/93.jpg)
Karger-Stein’s Trick
Recall Pr [n−2
⋂i=1
Ai] =n − 2
n⋅
n − 3n − 1
⋯13
The more we contracts, the easier gets hitC
Idea: Make a copy before it becomes too bad!
The success probability can be improved to Ω ( 1log n )