COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

Similar documents
COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

Approximation Algorithms

Dual-fitting analysis of Greedy for Set Cover

Design and Analysis of Algorithms (VII)

Great Theoretical Ideas in Computer Science

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Submodularity Reading Group. Matroid Polytopes, Polymatroid. M. Pawan Kumar

Lecture 1 August 31, 2017

Graph Theory and Optimization Approximation Algorithms

Math 414 Lecture 30. The greedy algorithm provides the initial transportation matrix.

/ Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 36

THEORY OF LINEAR AND INTEGER PROGRAMMING

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

Linear Programming Duality and Algorithms

11. APPROXIMATION ALGORITHMS

Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued.

Linear Programming. Readings: Read text section 11.6, and sections 1 and 2 of Tom Ferguson s notes (see course homepage).

COT 5407: Introduction. to Algorithms. Giri NARASIMHAN. 1/29/19 CAP 5510 / CGS 5166

A List Heuristic for Vertex Cover

4 Greedy Approximation for Set Cover

4 Integer Linear Programming (ILP)

Randomized algorithms have several advantages over deterministic ones. We discuss them here:

Integer Programming Theory

February 19, Integer programming. Outline. Problem formulation. Branch-andbound

Convex Optimization CMU-10725

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs

Lecture 14: Linear Programming II

Approximation Algorithms

Algorithm Design and Analysis

Approximation Algorithms

INDIAN STATISTICAL INSTITUTE

6 Randomized rounding of semidefinite programs

Approximation Algorithms

Randomized Algorithms

11. APPROXIMATION ALGORITHMS

Discrete Optimization 2010 Lecture 5 Min-Cost Flows & Total Unimodularity

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.

LECTURE 6: INTERIOR POINT METHOD. 1. Motivation 2. Basic concepts 3. Primal affine scaling algorithm 4. Dual affine scaling algorithm

11.1 Facility Location

Lecture 3: Totally Unimodularity and Network Flows

1. Lecture notes on bipartite matching February 4th,

Practice Problems for the Final

LECTURES 3 and 4: Flows and Matchings

Approximation Algorithms

Outline. CS38 Introduction to Algorithms. Linear programming 5/21/2014. Linear programming. Lecture 15 May 20, 2014

Outline. CS38 Introduction to Algorithms. Approximation Algorithms. Optimization Problems. Set Cover. Set cover 5/29/2014. coping with intractibility

Introduction to Mathematical Programming IE406. Lecture 20. Dr. Ted Ralphs

11. APPROXIMATION ALGORITHMS

1 Unweighted Set Cover

Lecture 7. s.t. e = (u,v) E x u + x v 1 (2) v V x v 0 (3)

15-451/651: Design & Analysis of Algorithms November 4, 2015 Lecture #18 last changed: November 22, 2015

Pearls of Algorithms

Lecture 16 October 23, 2014

Combinatorial Optimization

Chapter 10 Part 1: Reduction

CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 14: Combinatorial Problems as Linear Programs I. Instructor: Shaddin Dughmi

Traveling Salesman Problem (TSP) Input: undirected graph G=(V,E), c: E R + Goal: find a tour (Hamiltonian cycle) of minimum cost

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms

Clustering: Centroid-Based Partitioning

Introduction to Randomized Algorithms

15-854: Approximations Algorithms Lecturer: Anupam Gupta Topic: Direct Rounding of LP Relaxations Date: 10/31/2005 Scribe: Varun Gupta

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18

Lecture 19 Sorting Goodrich, Tamassia

3 INTEGER LINEAR PROGRAMMING

Size of a problem instance: Bigger instances take

CS270 Combinatorial Algorithms & Data Structures Spring Lecture 19:

Approximation slides 1. An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs

Mergesort again. 1. Split the list into two equal parts

Practice Final Exam 2: Solutions

Fundamentals of Integer Programming

CSE 417 Network Flows (pt 4) Min Cost Flows

MA4254: Discrete Optimization. Defeng Sun. Department of Mathematics National University of Singapore Office: S Telephone:

The complement of PATH is in NL

Notes for Lecture 24

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

Minimum Weight Constrained Forest Problems. Problem Definition

Subexponential Lower Bounds for the Simplex Algorithm

Copyright 2000, Kevin Wayne 1

Review of course COMP-251B winter 2010

ICS 161 Algorithms Winter 1998 Final Exam. 1: out of 15. 2: out of 15. 3: out of 20. 4: out of 15. 5: out of 20. 6: out of 15.

(67686) Mathematical Foundations of AI July 30, Lecture 11

The Ascendance of the Dual Simplex Method: A Geometric View

Solutions for Operations Research Final Exam

Welcome to the course Algorithm Design

Algorithms for Integer Programming

A Subexponential Randomized Simplex Algorithm

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini

Algorithms for Euclidean TSP

CMPSCI611: Approximating SET-COVER Lecture 21

1. Lecture notes on bipartite matching

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs

Section Notes 5. Review of Linear Programming. Applied Math / Engineering Sciences 121. Week of October 15, 2017

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14

Approximation Algorithms: The Primal-Dual Method. My T. Thai

COT 5407: Introduction to Algorithms. Giri Narasimhan. ECS 254A; Phone: x3748

1 Linear programming relaxation

Approximation Basics

1 Minimum Cut Problem

Lecture 1: A Monte Carlo Minimum Cut Algorithm

Transcription:

COT 6936: Topics in Algorithms! Giri Narasimhan ECS 254A / EC 2443; Phone: x3748 giri@cs.fiu.edu http://www.cs.fiu.edu/~giri/teach/cot6936_s12.html https://moodle.cis.fiu.edu/v2.1/course/view.php?id=174

Polynomial-time algorithms for LP! Simplex is not poly-time in the worst-case Khachiyan s ellipsoid algorithm: LP is in P Karmarkar s interior-point algorithm Good implementations for LP exist Works very well in practice More competitive than the poly-time methods for LP 2/8/12 COT 6936 2

COT 6936: Topics in Algorithms! Integer Linear Programming

Integer Linear Programming! LP with integral solutions NP-hard If A is a totally unimodular matrix, then the LP solution is always integral. A TUM is a matrix for which every nonsingular submatrix has determinant 0, +1 or -1. A TUM is a matrix for which every nonsingular submatrix has integral inverse. 2/8/12 COT 6936 4

Vertex Cover as an LP?! For vertex v, create variable x v For edge (u,v), create constraint x u + x v 1 Objective function: Σx v Additional constraints: x v 1 Doesn t work because x v needs to be from {0,1} 2/8/12 COT 6936 5

Set Cover! Given a universe of items U = {e 1,, e n } and a collection of subsets S = {S 1,, S m } such that each S i is contained in U Find the minimum set of subsets from S that will cover all items in U (i.e., the union of these subsets must equal U) Weighted Set Cover: Given universe U and collection S, and a cost c(s i ) for each subset S i in S, find the minimum cost set cover 2/8/12 COT 6936 6

2/8/12 COT 6936 7

Fractional may be better than integral! U = {e, f, g} S 1 = {e, f} S 2 = {f, g} S 3 = {e, g} Optimal set cover = {S 1, S 2 } Fractional optimal set cover assigns ½ to each of three sets giving a total optimal value of 3/2. 2/8/12 COT 6936 8

2/8/12 COT 6936 9

K-Approximation Alg using Dual Fitting! Ratio to be bounded by K 0 Value of Greedy solution Value of Dual Feasible solution obtained from greedy solution Value of Optimal ILP solution Value of Primal Optimal LP solution = Value of Dual Optimal LP solution 2/8/12 COT 6936 10

2/8/12 COT 6936 11

2/8/12 COT 6936 12

Rounding Algorithm for Set Cover! Algorithm Find an optimal solution to the LP Relaxation Pick all sets S for which x S 1/f in this solution f = frequency of most frequent item Analysis Is the resulting solution a valid set cover? How good is the solution? How close is to the optimal set cover? 2/8/12 COT 6936 13

Analysis of Rounding Algorithm! 2/8/12 COT 6936 14

COT 6936: Topics in Algorithms! Randomized Algorithms

Randomization! Randomized Algorithms: Uses values generated by random number generator to decide next step Often easier to implement and/or more efficient Applications Used in protocol in Ethernet Cards to decide when it next tries to access the shared medium Primality testing & cryptography Monte Carlo simulations 2/8/12 COT 6936 16

Slide by David Evans Monte Carlo Simulations! Square = 1 Circle = π/4 Determining π 0,1 1,1 The probability a random point in square is in circle: = π/4 0,0 π = 4 * points in circle/points 1,0 UVa CS216 Spring 2006 - Lecture 25: Randomized Algorithms 2/8/12 COT 6936 17 20

QuickSort vs Randomized QuickSort! QuickSort Pick a fixed pivot Partition input based on pivot into two sets Recursively sort the two partitions Randomized QuickSort Pick a random pivot Partition input based on pivot into two sets Recursively sort the two partitions 2/8/12 COT 6936 18

QuickSort: Probabilistic Analysis! Expected rank of pivot = n/2 (Why?) Thus expected size of sublists after partition = n/2 Hence the recurrence T(n) = 2T(n/2) + O(n) Average time complexity = T(n) = O(n log n) 2/8/12 COT 6936 19

New Quicksort: Randomized Analysis! Let X ij be a random variable representing the number of times items i and j are compared by the algorithm. Expected time complexity = expected value of sum of all random variables X ij. Pr(X ij = 1) = 2/(j i + 1) T(n) =? (Why?) 2/8/12 COT 6936 20

New Quicksort: Randomized Analysis! 2/8/12 COT 6936 21

Cut-Sets & Min-Cuts! Example 1: ({a,b,c,d}, {e,f,g}) Weight = 19 Example 2: ({a,b,g}, {c,d,e,f}) Weight = 30 Example 3: ({a}, {b,c,d,e,f,g}) Weight = 5 2/8/12 COT 6936 22

Edge Contraction! http://en.wikipedia.org/wiki/edge_contraction 2/8/12 COT 6936 23

Edge Contractions and Min-Cuts! Lemma: If you are not contracting an edge from the cut-set, edge contractions do not affect the size of min-cuts. Observation: Most edges are not part of the min-cut. Idea: Use randomization 2/8/12 COT 6936 24

Min-Cuts in the Internet Graph! June 1999 Internet graph, Bill Cheswick http://research.lumeta.com/ches/map/gallery/index.html 2/8/12 COT 6936 25

Randomized Algorithms: Min-Cut! Algorithm: Pick a random edge and contract it until only 2 vertices are remaining. Report edges connecting the 2 remaining vertices as the min cut Analysis Assume that the Min-cut is of size k Prob {edge is not in Min-cut} 1 2/n (why?) Prob {Min-cut is output} 2/n(n 1) (why?) 2/8/12 COT 6936 26

Analysis: Min-Cut Algorithm (Cont d)! Observation: If Min-Cut is of size k, then minimum degree of every vertex is k. (Why?) Number of edges in graph kn/2 Probability that an edge from Min-Cut is picked in iteration 1 is 2/n Probability that no edge from Min-Cut is picked in iteration 1 is 1-2/n Iteration i? 2/8/12 COT 6936 27

Analysis: Min-Cut Algorithm (Cont d)! E i = Event that no edge from Min-Cut is picked in iteration i F i = Event that no edge from Min-Cut is picked in iteration 1 through i Need F n-2! 2/8/12 COT 6936 28

Analysis: Min-Cut Algorithm (Cont d)! 2/8/12 COT 6936 29

Analysis: Min-Cut Algorithm (Cont d)! Probability of contracting only edges not from Min-Cut, i.e., ending up with exactly the Min-Cut 2/n(n-1) Rather low! Repeat the algorithm many times. How many times? Goal: repeat until prob of error is very small 2/8/12 COT 6936 30