The Best Algorithms are Randomized Algorithms N. Harvey C&O Dept TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.

Slides:



Advertisements
Similar presentations
The Primal-Dual Method: Steiner Forest TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A AA A A A AA A A.
Advertisements

Great Theoretical Ideas in Computer Science
C&O 355 Lecture 23 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Generalization and Specialization of Kernelization Daniel Lokshtanov.
C&O 355 Mathematical Programming Fall 2010 Lecture 22 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
Great Theoretical Ideas in Computer Science for Some.
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
C&O 355 Mathematical Programming Fall 2010 Lecture 21 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
CSL758 Instructors: Naveen Garg Kavitha Telikepalli Scribe: Manish Singh Vaibhav Rastogi February 7 & 11, 2008.
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Graph Clustering. Why graph clustering is useful? Distance matrices are graphs  as useful as any other clustering Identification of communities in social.
Graph Sparsifiers by Edge-Connectivity and Random Spanning Trees Nick Harvey U. Waterloo Department of Combinatorics and Optimization Joint work with Isaac.
Graph Sparsifiers by Edge-Connectivity and Random Spanning Trees Nick Harvey University of Waterloo Department of Combinatorics and Optimization Joint.
Graph Sparsifiers by Edge-Connectivity and Random Spanning Trees Nick Harvey U. Waterloo C&O Joint work with Isaac Fung TexPoint fonts used in EMF. Read.
Karger’s Min-Cut Algorithm Amihood Amir Bar-Ilan University, 2009.
Proximity algorithms for nearly-doubling spaces Lee-Ad Gottlieb Robert Krauthgamer Weizmann Institute TexPoint fonts used in EMF. Read the TexPoint manual.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Randomized Algorithms and Randomized Rounding Lecture 21: April 13 G n 2 leaves
Approximation Algorithms
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Sublinear time algorithms Ronitt Rubinfeld Blavatnik School of Computer Science Tel Aviv University TexPoint fonts used in EMF. Read the TexPoint manual.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Study Group Randomized Algorithms Jun 7, 2003 Jun 14, 2003.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
Approximation Algorithms: Bristol Summer School 2008 Seffi Naor Computer Science Dept. Technion Haifa, Israel TexPoint fonts used in EMF. Read the TexPoint.
Introduction to Graph Theory
C&O 355 Mathematical Programming Fall 2010 Lecture 17 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
C&O 355 Lecture 2 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
Minimal Spanning Trees What is a minimal spanning tree (MST) and how to find one.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
C&O 355 Mathematical Programming Fall 2010 Lecture 2 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A.
Graph Sparsifiers Nick Harvey University of British Columbia Based on joint work with Isaac Fung, and independent work of Ramesh Hariharan & Debmalya Panigrahi.
1 Min-cut for Undirected Graphs Given an undirected graph, a global min-cut is a cut (S,V-S) minimizing the number of crossing edges, where a crossing.
11/3/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURES 37+ Randomized.
C&O 750 Randomized Algorithms Winter 2011 Lecture 24 Nicholas Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
Finding dense components in weighted graphs Paul Horn
C&O 355 Mathematical Programming Fall 2010 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
An Algorithmic Proof of the Lopsided Lovasz Local Lemma Nick Harvey University of British Columbia Jan Vondrak IBM Almaden TexPoint fonts used in EMF.
Graph Sparsifiers Nick Harvey Joint work with Isaac Fung TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
C&O 355 Mathematical Programming Fall 2010 Lecture 18 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A A A A A A A Image:
C&O 355 Mathematical Programming Fall 2010 Lecture 16 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
C&O 355 Lecture 24 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A A A A A A A.
and 6.855J March 6, 2003 Maximum Flows 2. 2 Network Reliability u Communication Network u What is the maximum number of arc disjoint paths from.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. Fast.
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
MCS 312: NP Completeness and Approximation Algorithms Instructor Neelima Gupta
Approximation Algorithms based on linear programming.
Generating Random Spanning Trees via Fast Matrix Multiplication Keyulu Xu University of British Columbia Joint work with Nick Harvey TexPoint fonts used.
Theory of Computational Complexity Probability and Computing Ryosuke Sasanuma Iwama and Ito lab M1.
An algorithmic proof of the Lovasz Local Lemma via resampling oracles Jan Vondrak IBM Almaden TexPoint fonts used in EMF. Read the TexPoint manual before.
The Best Algorithms are Randomized Algorithms
Minimum Spanning Tree 8/7/2018 4:26 AM
CS 154, Lecture 6: Communication Complexity
Planarity Testing.
Randomized Algorithms CS648
CSE 373 Data Structures and Algorithms
Problem Solving 4.
Instructor: Aaron Roth
Presentation transcript:

The Best Algorithms are Randomized Algorithms N. Harvey C&O Dept TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA A A A

WHY DO WE RANDOMIZE?

Reasons for Randomness Fooling Adversaries Symmetry Breaking Searching a Haystack Sampling huge sets...

Picking Passwords Encryption keys are randomly chosen

The Hallway Dance Randomly go left or right After a few twists you won’t collide (usually!)

QuickSort If I knew an approximate median, I could partition into 2 groups & recurse A random element is probably close to the median Like “searching for hay in a haystack”

Reasons for Randomness Fooling Adversaries Symmetry Breaking Searching a Haystack...

Another Adversary Example Linux denial-of-service attack Kernel uses a hash table to cache info about IP traffic flows Adversary sends many IP packets that all have same hash value Hash table becomes linked list; Kernel very slow Solution: Randomized hash function IP

Another Symmetry Breaking Example Ethernet Media Access Control Try to send packet If collision detected – Wait for a random delay – Retry sending packet

Another Haystack Example Problem: Find a point (x,y) that is not a zero of f If f  0 then, for randomly chosen (x,y), Pr[ f(x,y)=0 ] = 0 Even over finite fields, Pr[ f(x,y)=0 ] is small Consider the polynomial f(x,y)=(x-y 2 )(x 2 +2y+1)

Reasons for Randomness Fooling Adversaries Symmetry Breaking Searching a Haystack... Beauty: randomization often gives really cool algorithms!

Graph Basics A graph is a collection of vertices and edges Every edge joins two vertices The degree of a vertex is # edges attached to it

Graph Connectivity A connected graph A disconnected graph Problem: How many edges do you need to remove to make a graph disconnected?

Graph Connectivity Problem: How many edges do you need to remove to make a graph disconnected? Connectivity is minimum # edges whose removal disconnects the graph Observation: for every vertex v, degree(v)  connectivity Because removing all edges attached to vertex v disconnects the graph

Graph Connectivity Problem: How many edges do you need to remove to make a graph disconnected? Connectivity is minimum # edges whose removal disconnects the graph Useful in many applications: How many MFCF network cables must be cut to disrupt MC’s internet connectivity? How many bombs can my oil pipelines withstand?

Graph Connectivity Example Removing red edges disconnects graph Definition: A cut is a set of edges of the form { all edges with exactly one endpoint in S } where S is some set of vertices. Fact: min set of edges that disconnects graph is always a cut S

Algorithms for Graph Connectivity Given a graph, how to compute connectivity? Standard Approach: Network Flow Theory – Ford-Fulkerson Algorithm computes an st min cut (minimum # edges to disconnect vertices s & t) – Compute this value for all vertices s and t, then take the minimum – Get min # edges to disconnect any two vertices CO 355 Approach: – Compute st min cuts by ellipsoid method instead Next: An amazing randomized approach

Algorithm Overview Input: A haystack Output: A needle (maybe) While haystack not too small – Pick a random handful – Throw it away End While Output whatever is left

Edge Contraction u v Key operation: contracting an edge uv Delete the edge uv Combine u & v into a single vertex w Any edge with endpoint u or v now ends at w w

Edge Contraction u v Key operation: contracting an edge uv Delete the edge uv Combine u & v into a single vertex w Any edge with endpoint u or v now ends at w This can create “parallel” edges w

Randomized Algorithm for Connectivity Input: A graph Output: Minimum cut (maybe) While graph has  2 vertices “Not too small” – Pick an edge uv at random “Random Handful” – Contract it “Throw it away” End While Output remaining edges

Graph Connectivity Example We were lucky: Remaining edges are the min cut How lucky must we be to find the min cut? Theorem (Karger ‘93): The probability that this algorithm finds a min cut is  1/(# vertices) 2.

But does the algorithm work? How lucky must we be to find the min cut? Theorem (Karger ‘93): The probability that this algorithm finds a min cut is  1/n 2. (n = # vertices) Fairly low success probability. Is this useful? Yes! Run the algorithm n 2 times. Pr[ fails to find min cut ]  (1-1/n 2 ) n 2  1/e So algorithm succeeds with probability > 1/2

Fix some min cut. Say it has k edges. If algorithm doesn’t contract any edge in this cut, then the algorithm outputs this cut – When contracting edge uv, both u & v are on same side of cut So what is probability that this happens? While graph has  2 vertices “Not too small” – Pick an edge uv at random “Random Handful” – Contract it “Throw it away” End While Output remaining edges Proof of Main Theorem

Initially there are n vertices. Claim 1: # edges in min cut=k  every vertex has degree  k  total # edges  nk/2 Pr[random edge is in min cut] = # edges in min cut / total # edges  k / (nk/2) = 2/n

Now there are n-1 vertices. Claim 2: min cut in remaining graph is  k Why? Every cut in remaining graph is also a cut in original graph. So, Pr[ random edge is in min cut ]  2/(n-1)

In general, when there are i vertices left Pr[ random edge is in min cut ]  2/i So Pr[ alg never contracts an edge in min cut ]

Input: Graph G Output: min cut, with probability  1/2 For i=1,..,n 2 Start from G While graph has  2 vertices – Pick an edge uv at random – Contract it End While Let E i = { remaining edges } End For Output smallest E i Final Algorithm Running time:  O(m ¢ n 2 ) (m = # edges, n = # vertices) With more beautiful ideas, improves to  O(n 2 )

How Many Min Cuts? Our analysis: for any particular min cut, Pr[ algorithm finds that min cut ]  1/n 2 So suppose C 1, C 2,..., C t are all the min cuts  1/n 2 fraction of the time the algorithm finds C 1  1/n 2 fraction of the time the algorithm finds C 2...  1/n 2 fraction of the time the algorithm finds C t This is only possible if t · n 2 Corollary: Any connected graph on n vertices has · n 2 min cuts. (Actually, min cuts)

An n-cycle has exactly min cuts! How Many Min Cuts? Corollary: Any connected graph on n vertices has min cuts. Is this optimal?

How Many Approximate Min Cuts? A similar analysis gives a nice generalization: Theorem (Karger-Stein ‘96): Let G be a graph with min cut size k. Then # { cuts with  k edges }  n 2 . No other proof of this theorem is known!

Books Motwani-RaghavanMitzenmacher-UpfalAlon-Spencer Classes CS 466, CS 761 (still active?), C&O 738