Exploiting Locality: Approximating Sorting Buffers Reuven Bar Yehuda Jonathan Laserson Technion IIT.

Slides:



Advertisements
Similar presentations
Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.
Advertisements

Guy EvenZvi LotkerDana Ron Tel Aviv University Conflict-free colorings of unit disks, squares, & hexagons.
IBM LP Rounding using Fractional Local Ratio Reuven Bar-Yehuda
Incremental Linear Programming Linear programming involves finding a solution to the constraints, one that maximizes the given linear function of variables.
Introduction to Algorithms
Optimization Problems in Optical Networks. Wavelength Division Multiplexing (WDM) Directed: Symmetric: Optic Fiber.
T(n) = 4 T(n/3) +  (n). T(n) = 2 T(n/2) +  (n)
June 3, 2015Windows Scheduling Problems for Broadcast System 1 Amotz Bar-Noy, and Richard E. Ladner Presented by Qiaosheng Shi.
Reuven Bar-Yehuda Gleb Polevoy Gleb Polevoy Dror Rawitz Technion Technion 1.
Reuven Bar-Yehuda Gleb Polevoy Gleb Polevoy Dror Rawitz Technion Technion 1.
Instructor Neelima Gupta Table of Contents Lp –rounding Dual Fitting LP-Duality.
MIT and James Orlin © Nonlinear Programming Theory.
Offset of curves. Alina Shaikhet (CS, Technion)
Interval packing problem Multicommodity demand flow in a line Jian Li Sep
Seminar : Approximation algorithms for LP/IP optimization problems Reuven Bar-Yehuda Technion IIT Slides and papers at:
Linear Programming Introduction. linear function linear constraintsA Linear Programming model seeks to maximize or minimize a linear function, subject.
1 Throughput Maximization in 4G Cellular Networks Prof. Reuven Bar-Yehuda January 13, 2008 Technion IIT
1 Seminar : Approximation algorithms for LP optimization problems Reuven Bar-Yehuda Technion IIT Slides and paper at:
Algorithm Design Techniques: Induction Chapter 5 (Except Section 5.6)
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
1 A Unified Approach to Approximating Resource Allocation and Scheduling Amotz Bar-Noy.……...AT&T and Tel Aviv University.
ISMP LP Rounding using Fractional Local Ratio Reuven Bar-Yehuda
Cell Selection in 4G Cellular Networks David Amzallag, BT Design Reuven Bar-Yehuda, Technion Danny Raz, Technion Gabriel Scalosub, Tel Aviv University.
1 New Developments in the Local Ratio Technique Reuven Bar-Yehuda
A Unified Approach to Approximating Resource Allocation and Scheduling Amotz Bar-Noy.……...AT&T and Tel Aviv University Reuven Bar-Yehuda….Technion IIT.
Using Homogeneous Weights for Approximating the Partial Cover Problem
ECE 667 Synthesis and Verification of Digital Systems
Optimization using Calculus
Maximum and Minimum Values (Section 3.1)
D Nagesh Kumar, IIScOptimization Methods: M2L3 1 Optimization using Calculus Optimization of Functions of Multiple Variables: Unconstrained Optimization.
1 Approximation Algorithms for Bandwidth and Storage Allocation Reuven Bar-Yehuda Joint work with Michael Beder, Yuval Cohen.
A Customizable k-Anonymity Model for Protecting Location Privacy Written by: B. Gedik, L.Liu Presented by: Tal Shoseyov.
1 Theory I Algorithm Design and Analysis (11 - Edit distance and approximate string matching) Prof. Dr. Th. Ottmann.
Linear-Programming Applications
Graphing Linear Inequalities in Two Variables Chapter 4 – Section 1.
Genome Rearrangements [1] Ch Types of Rearrangements Reversal Translocation
1 New Developments in the Local Ratio Technique Reuven Bar-Yehuda
LR for Packing problems Reuven Bar-Yehuda
Private Approximation of Search Problems Amos Beimel Paz Carmi Kobbi Nissim Enav Weinreb (Technion)
1 Markov Decision Processes Infinite Horizon Problems Alan Fern * * Based in part on slides by Craig Boutilier and Daniel Weld.
1 Chapter 5-1 Greedy Algorithms Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Lecture.6. Table of Contents Lp –rounding Dual Fitting LP-Duality.
1 A Unified Approach to Approximating Resource Allocation and Scheduling Amotz Bar-Noy.……...AT&T and Tel Aviv University.
Dynamic Programming.  Decomposes a problem into a series of sub- problems  Builds up correct solutions to larger and larger sub- problems  Examples.
Greedy Algorithms Interval Scheduling and Fractional Knapsack These slides are based on the Lecture Notes by David Mount for the course CMSC 451 at the.
CS 361 – Chapter 10 “Greedy algorithms” It’s a strategy of solving some problems –Need to make a series of choices –Each choice is made to maximize current.
1 Unconstrained and Constrained Optimization. 2 Agenda General Ideas of Optimization Interpreting the First Derivative Interpreting the Second Derivative.
Approximation Algorithms Duality My T. UF.
Approximation Algorithms based on linear programming.
D Nagesh Kumar, IISc Water Resources Systems Planning and Management: M2L2 Introduction to Optimization (ii) Constrained and Unconstrained Optimization.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Chapter 8 PD-Method and Local Ratio (5) Equivalence This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.
Buffering Techniques Greg Stitt ECE Department University of Florida.
Introduction to Linear Programs
Chapter 8 Local Ratio II. More Example
Merge Sort 7/29/ :21 PM The Greedy Method The Greedy Method.
Seminar : Approximation algorithms for LP/IP optimization problems
Merge Sort 11/28/2018 2:18 AM The Greedy Method The Greedy Method.
Merge Sort 11/28/2018 2:21 AM The Greedy Method The Greedy Method.
Integer Programming (정수계획법)
Lecture 11 Overview Self-Reducibility.
Lecture 11 Overview Self-Reducibility.
Merge Sort 1/17/2019 3:11 AM The Greedy Method The Greedy Method.
Minimizing the Aggregate Movements for Interval Coverage
Analysis of Algorithms CS 477/677
Linear Programming Introduction.
Integer Programming (정수계획법)
A Unified Approach to Approximating Resource Allocation and Scheduling
Linear Programming Introduction.
Algorithms Tutorial 27th Sept, 2019.
Presentation transcript:

Exploiting Locality: Approximating Sorting Buffers Reuven Bar Yehuda Jonathan Laserson Technion IIT

2 Example Limited Space on truck Packages can get on and off the truck You pay 1$ for every color change in the output $$$ Total Penalty: 3$

3 Applications Automobile Industry (e.g. Mercedes: Each car is manufactured for a specific client. The cars come out of an assembly line from the Germen factory assembly line) Communication Networks (uniting multiple requests from the same server in one session will save the overhead time of the handshake-protocol (otherwise needed for each request)). File Servers (the overhead time now is the open/close file operations. Uniting multiple read requests for the same file will save it.) Computer Graphics (computer graphics - rendering polygons - In the rendering process it's highly more efficient if polygons which share similar attributed are processed consecutively)

4 The Problem Line of packages from different colors A truck makes one pass along the line Packages can get on and off the truck The truck has limited space Pay 1$ for each color change in the output Goal: Pay minimum amount of $$s

5 Same-color adjacent before Same-color adjacent after

6 $ Minimization vs. Maximization Minimum Color Changes Maximum Color Savings $ $ $ Before: Pay 4$ $ After: Pay 2$ Save 2$

7 New Representation Line of packages from different colors and widths A truck makes one pass along the line Packages can get on and off the truck The truck has limited width (say, 1) Save 1$ from each package after which there is no color change Goal: save maximum amount of $$s

8 clearance zone 3 Types of essential Color-Savings Active: Passive: $ $ $ $ $

9 3 Types of essential Color-Savings Active: Passive: Active-Passive: clearance zone

10 No need to change order of same-color packages ABC AC B Forbidden! $ $ $ $ $ Hence: potential color saving = interval

11 Interval $ $3 $1 0$ p(J)=$2 w(J)=0.12 Interval I has: p(I) = the profit of the left package w(I) = the width of the left package Left(I) = the location of the left package Right(I) = the location of the right package p(I)=$1 w(I)=0.06

12 No gain from I  Delete I I 0$ I Delete = switch color

13 Too fats  No gain  Delete 12$ Super-fat Width > 1 Super-fat Width > 1

14 Given a profit vector p. Maximize p·x Subject to:feasibility constraints F(x) x is r-approximation if F(x) and p·x  r · p·x* An algorithm is r-approximation if for any p, F it returns an r-approximation The Local-Ratio Technique: Basic definitions

15 x is an r-approximation with respect to p 1 x is an r-approximation with respect to p- p 1  x is an r-approximation with respect to p Proof: (For maximization) p 1 · x  r × p 1 * p 2 · x  r × p 2 *  p · x  r × ( p 1 *+ p 2 *)  r × ( p 1 + p 2 )* The Local-Ratio Theorem:

16 Algorithm r-Approx( Set, p ) If Set = Φ then return Φ ; If  p(I)  0 // delete I then return r-Approx(Set-{I},p ); Define “good” p 1 ; REC = r-Approx( S, p- p 1 ) ; If REC is not an r-approximation w.r.t. p 1 then “fix it”; return REC; A Local-Ratio Schema for Maximization problems:

17 Case 1: Only fats have money i.e. p(I) > 0  w(I) > 0.5 A 1 is the Last package with money A2A2 1$1$ A0A0 1$1$ 1$1$ 1$1$ If A 1 not gained there must be a package on the truck 1/3 - approximation! 1 ≤ p 1 ·x ≤ 3

18 Algorithm MaxFats( S, p ) If S = Φ then return Φ ; If  p(I) =0 then return MaxFats( S - {I}, p); Let Î  S that starts last; ε = minimum p(I) s.t. I in conflict with Î  I  S define: p 1 (I) = CS = MaxFats( S, p- p 1 ) ; If CS is Î-maximal then return IS else return IS  {Î}; //fix it { ε I in conflict with Î 0 else

19 3$ 4$ 1$ 3$ 1-1=0$ 3-1=2$3$ 4-1=3$4$ 1$ 3-1=2$ 2-2=0$ 3$ 3-2=1$4$ 1$ 2-2=0$ change

20 1-1=0$ 3$ 4-1=3$ 1$ 1-1=0$ 3-1=2$ 0$ Return empty solution Make maximal already maximal change

21 3$ 4$ 1$ 3$ 2$3$ 4$ 1$ 2$ 3$ 1$4$ 1$ already maximal Make maximal Profit: 7$

22 Fat money $ ThinOdd money $ $ $ ThinEven money $ $ $ $

23 Case 2: Only odd thins have money i.e. p(I)>0  w(I)≤ 0.5 and I is odd  No three packages has the same color A2A2 Wg$ Wr$ δ $ δ := 1-Width(A 1 ) δ ≤ p 1 ·x ≤ 2δ+½ 1/3 -approximation! A 1 is the Last package with money

24 Algorithm MaxOddThins( S, p ) If S = Φ then return Φ ; If  p(I) =0 then return MaxOddThins( S - {I}, p); Let Î  S that starts last;  I  S define: p 1 (I) = ε × Select the maximum ε s.t.  I :p(I)-p 1 (I) ≥ 0 CS = MaxOddThins( S, p- p 1 ) ; If CS is Î-maximal then return IS else return IS  {Î}; //fix it { 1-w(I) I = Î w(I)I in conflict with Î 0else

25 Case 3: Only even thins has money Similar to Case 2 where Only odd thins has money A2A2 Wg$ Wr$ δ $ δ := 1-Width(A 1 ) δ ≤ p · x ≤ 2δ+½ 1/3 -approximation! A 1 is the Last package with money

26 $ Fat money $ $ ThinOdd money $ $ $ ThinEven money $ 1/3 Fat* 1/3 ThinOdd* 1/3 ThinEven*

27 Full Algorithm 1/9 - approximation! Previous Result: Khort, Pruhs: 1/20-approximation Classify all pairs to fat, thin-even, thin-odd. let x* be an optimal solution. 1/3 of the profit of x* comes from one of the above classes Max{S1, S2, S3} is a 1/9 - approx. □

28 Thank You!