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

cse p521 applied algorithms
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

CSE P521: Applied Algorithms

Instructor: Prof. James R. Lee TAs: Evan McCarty (head), Jeffrey Hon Office hours: TBA 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 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

slide-2
SLIDE 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?

slide-3
SLIDE 3

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

slide-4
SLIDE 4

what is this course about? Hashing

Universal and perfect hashing Load balancing, the power of two choices Streaming algorithms Locality sensitive hashing, high-dimensional search

Spectral algorithms

Singular-value decomposition (SVD) Principal component analysis Spectral partitioning

Linear programming

Formulating LPs; relaxations and approximation Duality theory Gradient descent

Online optimization

Regret minimization Boosting, multiplicative weights

Algorithmic game theory

Algorithms in the face of economic incentives Exploiting selfish agents

slide-5
SLIDE 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 𝑓.

slide-6
SLIDE 6

Karger’s randomized min cuts

Contraction operation: For an edge 𝑓 ∈ 𝐹, write 𝐻/𝑓 for the new graph formed by contracting the edge 𝑓.

slide-7
SLIDE 7

Karger’s randomized min cuts

slide-8
SLIDE 8

Karger’s randomized min cuts

How many times does the while loop execute? 𝑊 − 2 times

slide-9
SLIDE 9

Karger’s randomized min cuts

slide-10
SLIDE 10

Karger’s randomized min cuts

slide-11
SLIDE 11

analysis

slide-12
SLIDE 12

analysis

slide-13
SLIDE 13

analysis

Theorem: For any min-cut 𝑇, ҧ 𝑇 , Karger’s algorithm returns 𝑇, ҧ 𝑇 with probability at least 1

𝑜 2

= 2 𝑜 𝑜 − 1 Corollary: Any graph has at most 𝑜

2 global min-cuts.

slide-14
SLIDE 14

analysis

Theorem: For any min-cut 𝑇, ҧ 𝑇 , Karger’s algorithm returns 𝑇, ҧ 𝑇 with probability at least 1

𝑜 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:

slide-15
SLIDE 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]

slide-16
SLIDE 16
  • ne way to implement

For fans of undergraduate algorithms: Can use Kruskal’s algorithm for minimum spanning trees.

slide-17
SLIDE 17
  • ne way to implement

For fans of undergraduate algorithms: Can use Kruskal’s algorithm for minimum spanning trees.

slide-18
SLIDE 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.

slide-19
SLIDE 19

EXERCISE

For any 𝑙 < 𝑜: Pr ¬𝒝1 ∧ ¬𝒝2 ∧ ⋯ ∧ ¬𝒝𝑙 ≥

𝑙 2 𝑜 2

Observation:

Therefore if 𝑙 ≈ 𝑜/ 2, then the probability a min-cut 𝑇, ҧ 𝑇 remains after 𝑙 steps is at least

𝑙 𝑙 − 1 2 𝑜 𝑜 − 1 2 ≈ 𝑜 2

2

𝑜2 = 1 2

slide-20
SLIDE 20

Karger’s randomized min cuts

slide-21
SLIDE 21

EXERCISE

Therefore if 𝑙 ≈ 𝑜/ 2, then the probability a min-cut 𝑇, ҧ 𝑇 remains after 𝑙 steps is at least

𝑙 𝑙 − 1 2 𝑜 𝑜 − 1 2 ≈ 𝑜 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:

slide-22
SLIDE 22

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

slide-23
SLIDE 23
slide-24
SLIDE 24

after the break: hashing and sketching