Online Algorithms Amrinder Arora Permalink:

Slides:



Advertisements
Similar presentations
A Primal-Dual Approach to Online Optimization Problems.
Advertisements

Online Algorithm Huaping Wang Apr.21
Tight Bounds for Online Class- constrained Packing Hadas Shachnai Bell Labs and The Technion IIT Tami Tamir The Technion IIT.
Routing and Congestion Problems in General Networks Presented by Jun Zou CAS 744.
Online Algorithms Advanced Seminar A Supervisor: Matya Katz Ran Taig, Achiya Elyasaf December, 2009.
Online Scheduling with Known Arrival Times Nicholas G Hall (Ohio State University) Marc E Posner (Ohio State University) Chris N Potts (University of Southampton)
Alternative Models for Online Analysis Alex López-Ortiz University of Waterloo joint work with Reza Dorrigiv, Spyros Angelopoulos and Ian Munro.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Competitive Analysis.
Dynamic Wavelength Allocation in All-optical Ring Networks Ori Gerstel and Shay Kutten Proceedings of ICC'97.
Online Algor ithm Paging and Caching. Caching (paging) Structure of data storage Cache memory : Static RAM Level 1 Cache Level 2 Cache Main memory Hard.
2007/3/6 1 Online Chasing Problems for Regular n-gons Hiroshi Fujiwara* Kazuo Iwama Kouki Yonezawa.
1 Competitive analysis of the LRFU paging algorithm Edith Cohen -- AT&T Haim Kaplan -- Tel Aviv Univ. Uri Zwick -- Tel Aviv Univ.
PCPs and Inapproximability Introduction. My T. Thai 2 Why Approximation Algorithms  Problems that we cannot find an optimal solution.
Online Algorithms – II Amrinder Arora Permalink:
Dynamic Power Management for Systems with Multiple Power Saving States Sandy Irani, Sandeep Shukla, Rajesh Gupta.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Institute of Computer Science University of Wroclaw Page Migration in Dynamic Networks Marcin Bieńkowski Joint work with: Jarek Byrka (Centrum voor Wiskunde.
The Theory of NP-Completeness
Online Algorithms Motivation and Definitions Paging Problem Competitive Analysis Online Load Balancing.
The k-server Problem Study Group: Randomized Algorithm Presented by Ray Lam August 16, 2003.
Ecole Polytechnique, Nov 7, Online Job Scheduling Marek Chrobak University of California, Riverside.
Introduction to Boosting Aristotelis Tsirigos SCLT seminar - NYU Computer Science.
Chapter 11: Limitations of Algorithmic Power
Evaluation of Algorithms for the List Update Problem Suporn Pongnumkul R. Ravi Kedar Dhamdhere.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
Priority Models Sashka Davis University of California, San Diego June 1, 2003.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
1 Last Time: Paging Motivation Page Tables Hardware Support Benefits.
Online Algorithms Lecture notes for lectures given by Dr. Ely Porat, Bar-Ilan University Notes taken by: Navot Akiva Yair Kaufman Raz Lin Ohad Lipsky July.
Paging for Multi-Core Shared Caches Alejandro López-Ortiz, Alejandro Salinger ITCS, January 8 th, 2012.
CSCI 3160 Design and Analysis of Algorithms Tutorial 12
Minimizing Cache Usage in Paging Alejandro Salinger University of Waterloo Joint work with Alex López-Ortiz.
A polylog competitive algorithm for the k-server problem Nikhil Bansal (Eindhoven) Niv Buchbinder (Open Univ., Israel) Aleksander Madry (MIT) Seffi Naor.
1/24 Algorithms for Generalized Caching Nikhil Bansal IBM Research Niv Buchbinder Open Univ. Israel Seffi Naor Technion.
Competitive On-Line Admission Control and Routing By: Gabi Kliot Presentation version.
Bold Stroke January 13, 2003 Advanced Algorithms CS 539/441 OR In Search Of Efficient General Solutions Joe Hoffert
Yossi Azar Tel Aviv University Joint work with Ilan Cohen Serving in the Dark 1.
Online Paging Algorithm By: Puneet C. Jain Bhaskar C. Chawda Yashu Gupta Supervisor: Dr. Naveen Garg, Dr. Kavitha Telikepalli.
Randomized Online Algorithm for Minimum Metric Bipartite Matching Adam Meyerson UCLA.
9/8/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 6 Greedy Algorithms.
Online Algorithms. Introduction An offline algorithm has a full information in advance so it can compute the optimal strategy to maximize its profit (minimize.
Scheduling policies for real- time embedded systems.
Minimizing Cache Usage in Paging Alejandro López-Ortiz, Alejandro Salinger University of Waterloo.
1 Online algorithms Typically when we solve problems and design algorithms we assume that we know all the data a priori. However in many practical situations.
1 Tight Bounds for Delay-Sensitive Aggregation Yvonne Anne Oswald Stefan Schmid Roger Wattenhofer Distributed Computing Group LEA.
For Wednesday No reading No homework There will be homework for Friday, as well the program being due – plan ahead.
Competitive Queue Policies for Differentiated Services Seminar in Packet Networks1 Competitive Queue Policies for Differentiated Services William.
Jennifer Campbell November 30,  Problem Statement and Motivation  Analysis of previous work  Simple - competitive strategy  Near optimal deterministic.
A polylog competitive algorithm for the k-server problem Nikhil Bansal (IBM) Niv Buchbinder (Open Univ.) Aleksander Madry (MIT) Seffi Naor (Technion)
A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉.
Loss-Bounded Analysis for Differentiated Services. By Alexander Kesselman and Yishay Mansour Presented By Sharon Lubasz
1 Chapter 5-1 Greedy Algorithms Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Instructor: Shengyu Zhang 1. Secretary hiring problem 2.
APPROX and RANDOM 2006 Online Algorithms to Minimize Resource Reallocation and Network Communication Sashka Davis, UCSD Jeff Edmonds, York University,
© The McGraw-Hill Companies, Inc., Chapter 12 On-Line Algorithms.
Non-Preemptive Buffer Management for Latency Sensitive Packets Moran Feldman Technion Seffi Naor Technion.
International Graduate School of Dynamic Intelligent Systems, University of Paderborn Fighting Against Two Adversaries: Page Migration in Dynamic Networks.
Buffering problems Moran Feldman Technion Based on joint work with Seffi Naor.
1 Online algorithms 叶德仕 2 Online & offline Traditional theoretical analysis is concerned with off-line problems where the complete.
11 -1 Chapter 12 On-Line Algorithms On-Line Algorithms On-line algorithms are used to solve on-line problems. The disk scheduling problem The requests.
Instructor: Shengyu Zhang 1. Offline algorithms Almost all algorithms we encountered in this course assume that the entire input is given all at once.
Scheduling Parallel DAG Jobs to Minimize the Average Flow Time K. Agrawal, J. Li, K. Lu, B. Moseley.
Online Bipartite Matching with Augmentations Presentation by Henry Lin Joint work with Kamalika Chaudhuri, Costis Daskalakis, and Robert Kleinberg.
Towards Robust Revenue Management: Capacity Control Using Limited Demand Information Michael Ball, Huina Gao, Yingjie Lan & Itir Karaesmen Robert H Smith.
Better Algorithms for Better Computers
Greedy Algorithms / Caching Problem Yin Tat Lee
Greedy Algorithms / Caching Problem Yin Tat Lee
György Dósa – M. Grazia Speranza – Zsolt Tuza:
List Scheduling Given a list of jobs (each with a specified processing time), assign them to processors to minimize makespan (max load) In Graham’s notation:
Approximation Algorithms
Presentation transcript:

Online Algorithms Amrinder Arora Permalink:

2

Ski Rental Problem Classic toy problem of rent/buy nature Rental cost = 1$, Buying cost = $k Algorithm –Rent for k-1 days –Buy skis on day #k –If you stop skiing during the first (k-1) days, it costs the same –If you stop skiing after day #k, your cost is $(2k-1) which is (2- 1/k) times more than best possible ($k) This is the best algorithm. (But we will look for a better one shortly.) 3

Agenda What are online algorithms? (And why?) How to analyze them? Some example problems and algorithms Categories of online algorithms 4

What does “Online” mean? “Online” means - Input arrives a little at a time, need instant response –E.g., stock market, paging Question: what is a “good” algorithm? 5

Applications Variety of Applications –Scheduling –Memory Management –Routing Sample Problems –Ski Rental –Job Scheduling –Paging –Ambulances –Graph Problems 6

Analyzing Online Algorithms Competitive Analysis Probabilistic Analysis Other/newer methods 7

Competitive Analysis For any input, the cost of our online algorithm is never worse than c times the cost of the optimal offline algorithm. 8 Very robust Pessimistic

Probabilistic Analysis Assume a distribution generating the input Find an algorithm which minimizes the expected cost of the algorithm. 9 Can incorporate information predicting the future Can be difficult to determine accurately

Competitive Analysis Input sequence: Full knowledge optimum (also called offline optimum): k-competitive if for all input sequences : Sometimes, to ignore boundary conditions 10

1966 – Online Era Begins! We are given a set of m identical machines. A sequence of jobs arrives online. Each job must be scheduled immediately on one of m machines without knowledge of any future jobs. The goal is to minimize the completion time of the last job The must basic scheduling problem was introduced in

List Scheduling Schedule the job on the least loaded machine. Graham showed that the List Scheduling Algorithm is (2-1/m) competitive This analysis is tight. This is the optimal algorithm for m = 2 and m = 3. 12

Fancier Results In 1992 Bartal gave an competitive "New Algorithms for an Ancient Scheduling Problem" Karger in 1996 generalized the algorithm and proved an upper bound of "A Better Algorithm for an Ancient Scheduling Problem" The best algorithm known so far achieved a competitive ration Lower Bounds –Susanne Albers proved a bound of –Current best lower bound of

Extending Research Many variants of basic problem is studied: –Jobs may be preempted –Jobs may be rejected at a penalty –Online algorithms may use randomization –In addition they are results for different machine types 14

15

Paging Problem Maintain a two level memory system, consisting of a small fast memory and a large slow memory The goal is to serve a sequence of requests to memory pages so as to minimize number of page faults. Hit: Page found 16

Minimizing Paging Faults On a fault evict a page from cache Paging algorithm ≡ Eviction policy Goal: minimize the number of page faults 17

Paging Algorithms LRU, FIFO, LIFO, Least freq use LIFO, LFU not competititive LRU, FIFO k-competitive. Theorem: No deterministic online algorithm can be better than k-competitive 18

Worst case In the worst case page, the number of page faults on n requests is n. E.g. cache of size 4, request sequence p 1 p 2 p 3 p 4 p 5 p 6 p 7 p 8 p 9 p 10 p 11 p 12 19

Compare to optimal p 1 p 2 p 3 p 4 p 5 p 6 p 7 p 8 p 9 p 10 p 11 p 12 p 13 … is hard for everyone (i.e. 13 faults) p 1 p 2 p 3 p 4 p 5 p 1 p 2 p 3 p 4 p 5 p 1 p 2 p 3 p 4 … 8 faults Optimal algorithm knows the future 20

k-Server problem Ambulance location problem Metrical Task Systems Somewhat, ice cream vending problem 21

Online Graph Theory Online Minimum Spanning Tree Online Graph Coloring Online Shortest Paths 22

Randomization If ski rental costs $1, and buying costs $10, then with probability=0.5, buy after 8 days, and with probability=0.5, buy after 10 days. 23

Randomization 3 kinds of adversaries Oblivious (weak): Does not know the randomized results Adaptive Online (medium): Knows the decision/random output of algorithm, but needs to make their decision first. Adaptive Offline (strong): Knows everything – randomization does not help. 24

Summary Online Problem – Problem is revealed, one step at a time. Online Algorithm – Needs to respond to the request sequence that has been shown, not knowing next items in the sequence Competitive Ratio – The worst ratio of the online algorithm to the optimal offline algorithm, considering all possible request sequences. Basic Concepts Online algorithms show up in many practical problems. Even if you are considering an offline problem, consider what would be the online version of that problem. Research areas including improving algorithms, improving analysis of existing algorithms, proving tightness of analysis, considering problem variations, etc. Importance and Research Topics 25

Extra Material Adversary Approach to prove that 3n/2 – 2 comparisons are always needed to find both the minimum and the maximum given an unsorted array of n numbers: Notes at: 26