cse p521 applied algorithms
play

CSE P521: Applied Algorithms Instructor: Prof. James R. Lee TAs: - PowerPoint PPT Presentation

CSE P521: Applied Algorithms Instructor: Prof. James R. Lee TAs: Evan McCarty (head), Jeffrey Hon Office hours: TBA Class e-mail list: Sign up at course site if you didnt receive hello email Discussion board: Accessible from course


  1. CSE P521: Applied Algorithms Instructor: Prof. James R. Lee TAs: Evan McCarty (head), Jeffrey Hon Office hours: TBA Class e-mail list: Sign up at course site if you didn’t receive “hello” email Discussion board: Accessible from course homepage; intended for “unsupervised” discussion of course topics Grading: 5-6 Homeworks (60%), Project (40%) Homework will be assigned on Thursdays ; due next Thursday There will be a homework out tomorrow . Collaboration policy on website; all homework submitted electronically [Prefer typeset solutions; scans of neat handwriting acceptable] Project will be described in 3 rd lecture; must work in pairs

  2. CSE P521: Applied Algorithms Instructor: Prof. James R. Lee TAs: Evan McCarty (head), Jeffrey Hon Office hours: TBA Expected background: discrete math (CSE 311) basic probability theory (CSE 312) undergrad algs & data structures (CSE 332) “ mathematical maturity ” [this is a theory course] Course materials: There is no textbook Lecture notes and supplementary reading posted on course site Some lectures will have required preparatory reading [will send email] Questions?

  3. what is this course about? Modern algorithms Approximation, randomization Inputs are huge, noisy, dynamic, incomplete, high-dimensional, arrive online Nuanced tradeoffs: Efficiency, profit, correctness Tools of algorithmic analysis Course cannot be comprehensive Goal is exposure to a sample of key ideas, techniques, philosophies Mathematical explanations Prove that things work when we can Develop a theoretical framework for understanding/designing solutions

  4. what is this course about? Hashing Universal and perfect hashing Load balancing, the power of two choices Online optimization Streaming algorithms Locality sensitive hashing, high-dimensional search Regret minimization Boosting, multiplicative weights Spectral algorithms Singular-value decomposition (SVD) Algorithmic game theory Principal component analysis Spectral partitioning Algorithms in the face of economic incentives Exploiting selfish agents Linear programming Formulating LPs; relaxations and approximation Duality theory Gradient descent

  5. Karger’s randomized min cuts The Global Min-cut problem Input: An undirected graph 𝐻 = (𝑊, 𝐹) Output: A partition of the graph into two pieces 𝑊 = 𝑇 ∪ ҧ 𝑇 so the number of cut edges is minimized Contraction operation: For an edge 𝑓 ∈ 𝐹 , write 𝐻/𝑓 for the new graph formed by contracting the edge 𝑓 . ⇒

  6. Karger’s randomized min cuts Contraction operation: For an edge 𝑓 ∈ 𝐹 , write 𝐻/𝑓 for the new graph formed by contracting the edge 𝑓 . ⇒

  7. Karger’s randomized min cuts

  8. Karger’s randomized min cuts How many times does the while loop execute? 𝑊 − 2 times

  9. Karger’s randomized min cuts

  10. Karger’s randomized min cuts

  11. analysis

  12. analysis

  13. analysis Theorem: For any min-cut 𝑇, ҧ 𝑇 , Karger’s algorithm returns 𝑇, ҧ 𝑇 with probability at least 1 2 = 𝑜 𝑜 𝑜 − 1 2 Corollary: Any graph has at most 𝑜 2 global min-cuts.

  14. analysis Theorem: For any min-cut 𝑇, ҧ 𝑇 , Karger’s algorithm returns 𝑇, ҧ 𝑇 with probability at least 1 2 = 𝑜 𝑜 𝑜 − 1 2 If we run the algorithm 𝐿 times and output the smallest cut from all 𝐿 runs, the probability we fail to find a min cut is at most:

  15. analysis Theorem: If we run the algorithm 𝐿 ≈ 𝑜 2 log 𝑜 times, then Pr find a min cut ≥ 1 − 1/𝑜 2 Total running time? One run can be implemented to run in time 𝑃(𝑜 2 ) , so the total running time is 𝑃 𝑜 4 log 𝑜 [pretty slow]

  16. one way to implement For fans of undergraduate algorithms: Can use Kruskal’s algorithm for minimum spanning trees.

  17. one way to implement For fans of undergraduate algorithms: Can use Kruskal’s algorithm for minimum spanning trees.

  18. analysis Theorem: If we run the algorithm 𝐿 ≈ 𝑜 2 log 𝑜 times, then Pr find a min cut ≥ 1 − 1/𝑜 2 Total running time? One run can be implemented to run in time 𝑃(𝑜 2 ) , so the total running time is 𝑃 𝑜 4 log 𝑜 [pretty slow] Improvement: There is an algorithm that runs in time 𝑃 𝑜 2 log 𝑜 3 and finds a global min- cut with probability close to 1 .

  19. EXERCISE Observation: 𝑙 For any 𝑙 < 𝑜: Pr ¬𝒝 1 ∧ ¬𝒝 2 ∧ ⋯ ∧ ¬𝒝 𝑙 ≥ 2 𝑜 2 Therefore if 𝑙 ≈ 𝑜/ 2 , then the probability a min-cut 𝑇, ҧ 𝑇 remains after 𝑙 steps is at least 2 𝑜 𝑙 𝑙 − 1 = 1 2 2 ≈ 𝑜 2 𝑜 𝑜 − 1 2 2

  20. Karger’s randomized min cuts

  21. EXERCISE Observation: 𝑙 For any 𝑙 < 𝑜: Pr ¬𝒝 1 ∧ ¬𝒝 2 ∧ ⋯ ∧ ¬𝒝 𝑙 ≥ 2 𝑜 2 So things are going better early on… Therefore if 𝑙 ≈ 𝑜/ 2 , then the probability a min-cut 𝑇, ҧ 𝑇 How to exploit this for a remains after 𝑙 steps is at least much faster algorithm? 2 𝑜 𝑙 𝑙 − 1 = 1 2 2 ≈ 𝑜 2 𝑜 𝑜 − 1 2 2

  22. Karger-Stein algorithm Probability we find a specific min-cut 𝑇 is given by the recurrence relation: 𝑇, ҧ 2 1 − 1 2 𝑞 1 + 𝑜 𝑞 𝑜 = 1 − 2 Running time of fastmincut : 𝑈 𝑜 = 2𝑈 1 + 𝑜 + 𝑃 𝑜 2 2

  23. after the break: hashing and sketching ⇒

Recommend


More recommend