cse p521: applied algorithms - homes.cs.washington.edu
TRANSCRIPT
CSE P521: Applied Algorithms
Instructor: Prof. James R. LeeTAs: Evan McCarty (head), Jeffrey Hon
Office hours: TBA
Grading: 5-6 Homeworks (60%), Project (40%)
Homework will be assigned on Thursdays; due next ThursdayThere 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 3rd lecture; must work in pairs
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
CSE P521: Applied Algorithms
Instructor: Prof. James R. LeeTAs: 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 textbookLecture notes and supplementary reading posted on course siteSome lectures will have required preparatory reading [will send email]
Questions?
what is this course about?
Modern algorithms
Inputs are huge, noisy, dynamic, incomplete, high-dimensional, arrive online
Approximation, randomization
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
what is this course about?
HashingUniversal and perfect hashingLoad balancing, the power of two choicesStreaming algorithmsLocality sensitive hashing, high-dimensional search
Spectral algorithmsSingular-value decomposition (SVD)Principal component analysisSpectral partitioning
Linear programmingFormulating LPs; relaxations and approximationDuality theoryGradient descent
Online optimizationRegret minimizationBoosting, multiplicative weights
Algorithmic game theoryAlgorithms in the face of economic incentivesExploiting selfish agents
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 ๐.
โ
Kargerโs randomized min cuts
Contraction operation:For an edge ๐ โ ๐ธ, write ๐บ/๐ for the new graph formed by contracting the edge ๐.
โ
analysis
Theorem: For any min-cut ๐, าง๐ , Kargerโs algorithm returns ๐, าง๐ with probability at least1๐2
=2
๐ ๐ โ 1
Corollary: Any graph has at most ๐2
global min-cuts.
analysis
Theorem: For any min-cut ๐, าง๐ , Kargerโs algorithm returns ๐, าง๐ with probability at least1๐2
=2
๐ ๐ โ 1
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:
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]
one way to implement
For fans of undergraduate algorithms:Can use Kruskalโs algorithm for minimum spanning trees.
one way to implement
For fans of undergraduate algorithms:Can use Kruskalโs algorithm for minimum spanning trees.
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.
EXERCISE
For any ๐ < ๐: Pr ยฌ๐1 โง ยฌ๐2 โง โฏโง ยฌ๐๐ โฅ
๐2๐2
Observation:
Therefore if ๐ โ ๐/ 2, then the probability a min-cut ๐, าง๐
remains after ๐ steps is at least
๐ ๐ โ 12
๐ ๐ โ 12
โ
๐
2
2
๐2=1
2
EXERCISE
Therefore if ๐ โ ๐/ 2, then the probability a min-cut ๐, าง๐
remains after ๐ steps is at least
๐ ๐ โ 12
๐ ๐ โ 12
โ
๐
2
2
๐2=1
2
So things are going better early onโฆ
How to exploit this for a much faster algorithm?
For any ๐ < ๐: Pr ยฌ๐1 โง ยฌ๐2 โง โฏโง ยฌ๐๐ โฅ
๐2๐2
Observation:
Karger-Stein algorithm
Probability we find a specific min-cut ๐, าง๐ is given by the recurrence relation:
๐ ๐ = 1 โ 1 โ1
2๐ 1 +
๐
2
2
Running time of fastmincut:
๐ ๐ = 2๐ 1 +๐
2+ ๐ ๐2