3 Some Generalizations of the Ski Rental Problem

Size: px
Start display at page:

Download "3 Some Generalizations of the Ski Rental Problem"

Transcription

1 CS 655 Design and Analysis of Algorithms November 6, 27 If It Looks Like the Ski Rental Problem, It Probably Has an e/(e 1)-Competitive Algorithm 1 Introduction In this lecture, we will show that Certain online problems that generalie the ski-rental problem we call them repeating ski rental generaliations are no more complicated than the ski rental problem, and thus, have the same optimal deterministic and randomied competitive ratios. There is a framework that allows us to build the optimally-competitive algorithms for these repeating ski rental generaliations. To do this, we will create a randomied algorithm for one such generaliation, the dynamic TCP acknowledgment problem, and then use that algorithm as a basis for creating algorithms for other ski rental generaliations. 2 Ski Rental Problem The ski rental problem can be stated thus: suppose you are about to go skiing for the first time in your life. Naturally, you ask yourself whether to rent skis or to buy them. Renting skis costs, $r, whereas buying skis costs more, say, $b. Your goal is to minimie your total cost including all future ski trips. Unfortunately, you don t know how many such trips there will be. You must make the decision online. In a previous lecture, we saw an optimal deterministic 2-competitive algorithm for this problem. It works by renting skis until the cost of renting so far equals the cost of buying, and then buying the skis. So in our example above, we would keep renting the skis until we d spent $b so far on renting, and then buy. We also saw an optimal randomied algorithm that works by picking on which day to buy skis according to some probability distribution. Using the right probability distribution (it happened to be e e 1 ) gives the optimal competitive ratio of e/(e 1), or about The ski rental problem is very important because a number of other systems and networking problems are, at heart, simply the ski rental problem. Here are a few. 3 Some Generaliations of the Ski Rental Problem In the spin block problem, a process in an operating system has to decide the most efficient way to wait for a lock. It could spin, at a cost of r units per cycle, or it could block at a large cost, say, b units. The b units are supposed to represent the cost of context-switching or restarting the process and restoring its state. One 2-competitive deterministic algorithm (which is optimal) is to spin until the cost of spinning so far equals the context-switch cost and then to context-switch, and to repeat the process until the lock becomes available. In the dynamic TCP acknowledgment problem, a server receiving for TCP packets over the network has to send acknowledgments for each of these packets efficiently. It is possible to acknowledge multiple incoming packets with a single acknowledgment packet. We can measure the cost of acknowledging a sequence of packets as follows: say sending an acknowledgment has a high fixed cost, b, while for every time unit that a packet remains unacknowledged, it accrues r latency cost. One algorithm for minimiing the cost of acknowledging a sequence of packets (that is optimally 1

2 CS 655 Design and Analysis of Algorithms November 6, 27 2-competitive) is to wait until the total latency equals the cost of sending an acknowledgment, and then to send the acknowledgment; and of course, to repeat the process continuously as packets arrive. These problems where buying, or context-switching or acknowledging, occurs not once but repeatedly, we shall call repeating ski rental generaliations. These generaliation all have deterministic 2-competitive algorithms that follow the same basic pattern, and you might wonder if e/(e 1)- competitive randomied algorithms can be created for them by following a pattern similar to skirental s algorithm. The answer, unfortunately, is, No. Using the deterministic algorithms we gave above to form a randomied algorithm in the style of ski rental leads to a greater than e/(e 1) competitive ratio. In 21, Anna Karlin, Claire Kenyon and Dana Randall discovered the optimal e/(e 1) algorithm. Their algorithm used the same basic framework as ski-rental s randomied algorithm i.e. choose from a one parameter family of deterministic algorithms according to a probability density function, e /e 1. However, what was unique was the structure of the deterministic algorithms that they came up with. We will look at their algorithm now, but first let us define the TCP acknowledgment problem properly. 4 Dynamic TCP Acknowledgment Problem Formally, there is a sequence of n packet arrival times R = a 1,..., a n. The goal is to partition R into k subsequences σ 1,..., σ k where a subsequence end is defined by an acknowledgment. We use σ i to denote the set of arrivals in the partition and t i to denote the time when the acknowledgment for σ i is sent. To capture the fact that all arrivals must be acknowledged, we must have k 1 and t k a n, the time of the last arrival. By delaying the acknowledgments for some packets, we reduce the number of acknowledgments sent (and the associated costs) from n to k. However, delaying an acknowledgment adds to the latency costs 1, which we want to avoid since it can result in bursty TCP traffic, with potentially disastrous consequences. Thus, one wants to optimally balance the costs of an acknowledgment with the costs associated with the increased latency. We model the trade-off between the cost of an acknowledgment and the cost for the latency by using the objective function C ALG = k + k latency(σ i, t i ), i=1 where ALG is an algorithm that partitions R into σ 1,..., σ k ; latency(σ i, t i ) measures the extra latency for the arrivals in i when the acknowledgment is sent at time t i i.e. latency(σ, t) = a σ(t a). N.B. For ease of calculation, we ll assume that all packets arrive between times and 1. Figure 1 shows a pictorial description of the latency cost. 4.1 Another 2-Competitive Deterministic Algorithm Now we can describe a one-parameter family of deterministic algorithms whose analysis, while tricky, is still possible. Algorithm A. Let P (t, t ) be the set of packets that arrive between time t and time t, i.e. the set of i such that t < a i < t. Suppose that the ith acknowledgment occurred 1 We use latency to refer to the delay introduced by postponing the transmission of the acknowledgment message. There is additional latency introduced by the transmission of messages, but we do not affect this by delaying acknowledgments. 2

3 CS 655 Design and Analysis of Algorithms November 6, 27 Figure 1: A pictorial representation of the dynamic TCP acknowledgment problem. Figure 2: Algorithm A at time t i (and assume that t = ), algorithm A performs the next acknowledgment at the first time t i+1 > t i for which there is a time τ i+1, t i τ i+1 t i+1, such that P (t i, τ i+1 )(t i+1 τ i+1 ) =. Intuitively, this time is chosen so that, given that the previous acknowledgment occurred at time t i, in hindsight, units of latency cost would have been saved by performing an additional acknowledgment at time τ i+1. See Figure 2. As a warmup, we will show that A 1 is 2-competitive. analysis. The following lemma will help in this Lemma 1. Without loss of generality, we can assume that the optimal algorithm sends an acknowledgment between any pair of successive acknowledgments of algorithm A 1. Proof. Consider an arbitrary input sequence I, and suppose that A 1 acknowledges at times t i. Consider any sequence S of acknowledgments, and assume that it does not send any acknowledgment in (t i, t i+1 ). Enrich this sequence by sending an additional acknowledgment at time τ i+1. The acknowledgment cost increases by 1, and the latency cost decreases by at least 1, so this new sequence is at least as good as S. Hence there is an optimal sequence which sends at least one acknowledgment in each interval (t i, t i+1 ). 3

4 CS 655 Design and Analysis of Algorithms November 6, 27 Figure 3: Proof of A 1 s 2-competitiveness Theorem 2. A 1 is 2-competitive. Proof. Consider an arbitrary input sequence I. From Lemma 1, the cost C A1, of A 1 on input I satisfies C A1 n OP T + L(OP T ) + L(A 1 \ OP T ) where OP T is an optimal algorithm, n OP T is the number of acknowledgments performed by OP T on input I, L(OP T ) is the total latency cost incurred by A, and L(A 1 \ OP T ) is the total latency incurred by A 1 that is not incurred by OP T. You can see from Figure 3 that L(A 1 \OP T ) is precisely the area of a set of rectangles, where each rectangle has its left side at the time when OP T sends an acknowledgment, and its right side at the following time when A 1 sends an acknowledgment. By definition of algorithm A 1, all these rectangles have area at most 1. Hence, L(A 1 \OP T ) n OP T and we obtain that C A1 C OP T + n OP T 2C OP T. 4.2 An e/(e 1)-competitive Randomied Algorithm This algorithm, A happens to be more analyable than the algorithm we described earlier, when used as the basis for a randomied algorithm for the dynamic TCP acknowledgment problem. First, we need to understand how the cost of A relates to the cost of OP T on any input. Let n (I) denote the number of acknowledgments of algorithm A on input I. Looking at Figure 4, we see that the latency cost of A is bounded by the area above the OP T curve, plus the area under OPT and over A, minus the area, denoted E (I), under A and over OPT. The first term is just C OP T (I) n OP T (I), the latency cost of OP T. The second term can be analyed as in the proof of Theorem 2; it is just a set of n OP T (I) rectangles, each of which has area at most by definition of A, for a total of at most n OP T (I). Hence C A n (I) C OP T n OP T (I) + n OP T (I) E (I). 4

5 CS 655 Design and Analysis of Algorithms November 6, 27 Figure 4: Definition of E Lemma 3. Let n denote the number of acknowledgments of algorithm A and n OP T denote the number of acknowledgments of the optimal algorithm on some input I. Then the area E above the optimal curve and below the A curve on input I is at least: E n w dw (1 )n OP T. Proof. Fix an input I. Let D(n, ) be the minimum, over all acknowledgment sequences S with n acknowledgments, of the area above the S curve that is below the A curve. We will prove a lower bound on D(n u, ) for all u. We claim that for any u > v, D(n u, ) (v )(n v n u ) + D(n v, ). (1) The proof is illustrated in Figure 5. The left side shows three acknowledgments sequences for the give input: S, the acknowledgment sequence with n u acknowledgments that minimies D(n u, ), and the acknowledgment sequences of A v and A. The shaded areas in Figure 5 represent the n v area v rectangles which caused algorithm A v to send an acknowledgment. At most n u such rectangles intersect the curve S, since this is exactly the number of times the curve S meets the arrival curve. Therefore, there are at least n v n u of these area v rectangles which lie strictly above S; the upper left corners of these are circled in Figure 5. Let T be the set of times at which these n v n u rectangles begin (if there are more than n v n u of these, then we choose any n v n u of them to define the set T). We define a new acknowledgment sequence S = S T. The resulting curve is shown in the right side of Figure 5. Since S = n u and T = n v n u, the number of acknowledgments in S is precisely n v. The n v n u rectangles of T are all between S and S. Each of them has area v, of which an area of at most can lie above A (by definition of A ). Thus the area above S is at least (v )(n v n u ) plus the area above S. These facts combine to give us Equation 1. Taking u = v + dv, we obtain from Equation 1 D(n v+dv, ) (v )(n v n v+dv ) + D(n v, ). Rewriting and integrating from to t, for any < t 1, we obtain t dd(n v, ) t (v )dn v 5

6 CS 655 Design and Analysis of Algorithms November 6, 27 Figure 5: Proof of lemma 3 which implies, by integration by parts on the right-hand side D(n t, ) D(n, ) t n v dv (t )n t. Observing that D(n, ) =, and that n v n t for v > t, we have D(n t, ) n v dv (1 )n t. Taking n t = n OP T and noting that D(n OP T, ) is a lower bound on E gives the lemma. Letting tend towards ero, the A curve tends to the curve of packet arrivals, sos that lim E is equal to the latency of OP T, and lemma 3 yields C OP T 4.3 Analysis of the Randomied Algorithm n d. (2) With these results, we can now analye our randomied TCP acknowledgment algorithm. Algorithm A. This algorithm chooses between and 1 according to the probability density function p() = e /(e 1) and then runs A. Theorem 4. Let A be the randomied algorithm that picks between and 1 according to the probability density function p() and then runs the resulting A. For any input I, the ratio between the expected cost incurred by A on I and the optimal cost on I satisfies where P () = p(x)dx C A (I) C OP T (I) 1 + (p() P ()) n d Proof. Let C A denote the expected cost incurred by the algorithm A. Combining the calculation below with Equation 2 yields C A C OP T n OP T + p()(n + n OP T E )d 6

7 CS 655 Design and Analysis of Algorithms November 6, 27 C OP T n OP T + = C OP T n OP T + = C OP T n OP T + = C OP T n OP T + = C OP T + because = C OP T + p()n d p()n d = 1 p()n d p()(n + n OP T p()n + p()n OP T p() p()n + p()n OP T p() (n w dw (1 )n OP T ) d p()n d + n OP T p() n w dw p()(1 )n OP T d n w dwd p() p() n w dwd by changing the order of integration = C OP T + = C OP T + p()n d (p() P ())n d w n w P ()ddw n w P (w)dw n w dwd If we plug in the ski rental problem distribution, p() = e /(e 1), we get C A (I) C OP T (I) 1 + (p() P ())n d n d = 1 + ( e e 1 e 1 e 1 )n d n d = e e 1 5 Conclusion The proof that algorithm A is e/(e 1)-competitive suggests that the repeating ski rental generaliations are not harder than ordinary ski rental. Karlin et. al. actually show that if we restrict the inputs of the TCP acknowledgment problem so they can be defined by a single parameter (just like for ski rental), then the expression for the competitive ratio of running A on these basis inputs is exactly the same as that of ski rental. This is further proof that the repeating ski rental problems are fundamentally the same as ski rental. We also saw a framework for designing optimally competitive randomied algorithms for ski rental generaliations; define a one-parameter family of algorithms in terms of savings the algorithm would have gained had it acted earlier, then pick from this family of algorithms according to the probability density function e /(e 1). In other words, if it looks like the ski rental problem, it probably has an e/(e 1)-competitive algorithm. 7

8 CS 655 Design and Analysis of Algorithms November 6, 27 6 Acknowledgment These lecture notes borrowed heavily from Karlin et. al. s paper, Dynamic TCP acknowledgment and Other Stories about e/(e-1), Symposium on Theory of Computing, 21. 8

Dynamic TCP Acknowledgment and Other Stories about e/(e 1) 1. TCP acknowledgment, Online algorithms, Ski-rental, Basis inputs.

Dynamic TCP Acknowledgment and Other Stories about e/(e 1) 1. TCP acknowledgment, Online algorithms, Ski-rental, Basis inputs. Algorithmica (23) 36: 29 224 DOI: 1.17/s453-3-113-x Algorithmica 23 Springer-Verlag New York Inc. Dynamic TCP Acknowledgment and Other Stories about e/(e 1) 1 Anna R. Karlin, 2 Claire Kenyon, 3 and Dana

More information

Online bin packing with delay and holding costs

Online bin packing with delay and holding costs Online bin packing with delay and holding costs Lauri Ahlroth, André Schumacher, Pekka Orponen Aalto University School of Science, Department of Information and Computer Science and Helsinki Institute

More information

Lecture 2: Paging and AdWords

Lecture 2: Paging and AdWords Algoritmos e Incerteza (PUC-Rio INF2979, 2017.1) Lecture 2: Paging and AdWords March 20 2017 Lecturer: Marco Molinaro Scribe: Gabriel Homsi In this class we had a brief recap of the Ski Rental Problem

More information

Optimal Power-Down Strategies

Optimal Power-Down Strategies Sandy Irani irani@ics.uci.edu School of Information and Computer Science Univ. of California at Irvine, Irvine, CA 92697 Optimal Power-Down Strategies John Augustine jea@ics.uci.edu School of Information

More information

These are special traffic patterns that create more stress on a switch

These are special traffic patterns that create more stress on a switch Myths about Microbursts What are Microbursts? Microbursts are traffic patterns where traffic arrives in small bursts. While almost all network traffic is bursty to some extent, storage traffic usually

More information

Lecture 4 : Quest for Structure in Counting Problems

Lecture 4 : Quest for Structure in Counting Problems CS6840: Advanced Complexity Theory Jan 10, 2012 Lecture 4 : Quest for Structure in Counting Problems Lecturer: Jayalal Sarma M.N. Scribe: Dinesh K. Theme: Between P and PSPACE. Lecture Plan:Counting problems

More information

arxiv: v1 [cs.ds] 30 Jun 2016

arxiv: v1 [cs.ds] 30 Jun 2016 Online Packet Scheduling with Bounded Delay and Lookahead Martin Böhm 1, Marek Chrobak 2, Lukasz Jeż 3, Fei Li 4, Jiří Sgall 1, and Pavel Veselý 1 1 Computer Science Institute of Charles University, Prague,

More information

Measure Theory and Lebesgue Integration. Joshua H. Lifton

Measure Theory and Lebesgue Integration. Joshua H. Lifton Measure Theory and Lebesgue Integration Joshua H. Lifton Originally published 31 March 1999 Revised 5 September 2004 bstract This paper originally came out of my 1999 Swarthmore College Mathematics Senior

More information

An approach to service provisioning with quality of service requirements in ATM networks

An approach to service provisioning with quality of service requirements in ATM networks Journal of High Speed Networks 6 1997 263 291 263 IOS Press An approach to service provisioning with quality of service requirements in ATM networks Panagiotis Thomas Department of Electrical Engineering

More information

Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook

Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook TSP Randomization Outlook Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook Marc Uetz University of Twente m.uetz@utwente.nl Lecture 12: sheet 1 / 29 Marc Uetz Discrete Optimization Outline TSP

More information

The Parking Permit Problem

The Parking Permit Problem The Parking Permit Problem Adam Meyerson November 3, 2004 Abstract We consider online problems where purchases have time durations which expire regardless of whether the purchase is used or not. The Parking

More information

Lecture 11 February 28, Recap of Approximate Complementary Slackness Result

Lecture 11 February 28, Recap of Approximate Complementary Slackness Result CS 224: Advanced Algorithms Spring 207 Prof Jelani Nelson Lecture February 28, 207 Scribe: Meena Jagadeesan Overview In this lecture, we look at covering LPs A, b, c 0 under the setting where constraints

More information

Distance and Velocity

Distance and Velocity Distance and Velocity - Unit #8 : Goals: The Integral Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite integral and

More information

CS261: Problem Set #3

CS261: Problem Set #3 CS261: Problem Set #3 Due by 11:59 PM on Tuesday, February 23, 2016 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Submission instructions:

More information

Optimal Power-Down Strategies

Optimal Power-Down Strategies Sandy Irani irani@ics.uci.edu School of Information and Computer Science Univ. of California at Irvine, Irvine, CA 92697 Optimal Power-Down Strategies John Augustine jea@ics.uci.edu School of Information

More information

Homework 1 - SOLUTION

Homework 1 - SOLUTION Homework - SOLUTION Problem M/M/ Queue ) Use the fact above to express π k, k > 0, as a function of π 0. π k = ( ) k λ π 0 µ 2) Using λ < µ and the fact that all π k s sum to, compute π 0 (as a function

More information

Lecture 8: Decision-making under total uncertainty: the multiplicative weight algorithm. Lecturer: Sanjeev Arora

Lecture 8: Decision-making under total uncertainty: the multiplicative weight algorithm. Lecturer: Sanjeev Arora princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 8: Decision-making under total uncertainty: the multiplicative weight algorithm Lecturer: Sanjeev Arora Scribe: (Today s notes below are

More information

Colored Bin Packing: Online Algorithms and Lower Bounds

Colored Bin Packing: Online Algorithms and Lower Bounds Noname manuscript No. (will be inserted by the editor) Colored Bin Packing: Online Algorithms and Lower Bounds Martin Böhm György Dósa Leah Epstein Jiří Sgall Pavel Veselý Received: date / Accepted: date

More information

The Online Set Cover Problem

The Online Set Cover Problem The Online Set Cover Problem Noga Alon Baruch Awerbuch Yossi Azar Niv Buchbinder Joseph Seffi Naor Abstract Let X = {1, 2,..., n} be a ground set of n elements, and let S be a family of subsets of X, S

More information

Online bin packing 24.Januar 2008

Online bin packing 24.Januar 2008 Rob van Stee: Approximations- und Online-Algorithmen 1 Online bin packing 24.Januar 2008 Problem definition First Fit and other algorithms The asymptotic performance ratio Weighting functions Lower bounds

More information

CS 237: Probability in Computing

CS 237: Probability in Computing CS 237: Probability in Computing Wayne Snyder Computer Science Department Boston University Lecture 11: Geometric Distribution Poisson Process Poisson Distribution Geometric Distribution The Geometric

More information

Notes from Week 8: Multi-Armed Bandit Problems

Notes from Week 8: Multi-Armed Bandit Problems CS 683 Learning, Games, and Electronic Markets Spring 2007 Notes from Week 8: Multi-Armed Bandit Problems Instructor: Robert Kleinberg 2-6 Mar 2007 The multi-armed bandit problem The multi-armed bandit

More information

CS505: Distributed Systems

CS505: Distributed Systems Department of Computer Science CS505: Distributed Systems Lecture 10: Consensus Outline Consensus impossibility result Consensus with S Consensus with Ω Consensus Most famous problem in distributed computing

More information

CLASSICAL PROBABILITY MODES OF CONVERGENCE AND INEQUALITIES

CLASSICAL PROBABILITY MODES OF CONVERGENCE AND INEQUALITIES CLASSICAL PROBABILITY 2008 2. MODES OF CONVERGENCE AND INEQUALITIES JOHN MORIARTY In many interesting and important situations, the object of interest is influenced by many random factors. If we can construct

More information

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 10

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 10 EECS 70 Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 10 Introduction to Basic Discrete Probability In the last note we considered the probabilistic experiment where we flipped

More information

0 Real Analysis - MATH20111

0 Real Analysis - MATH20111 0 Real Analysis - MATH20111 Warmup questions Most of you have seen limits, series, continuous functions and differentiable functions in school and/or in calculus in some form You might wonder why we are

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 3 9/10/2008 CONDITIONING AND INDEPENDENCE

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 3 9/10/2008 CONDITIONING AND INDEPENDENCE MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 3 9/10/2008 CONDITIONING AND INDEPENDENCE Most of the material in this lecture is covered in [Bertsekas & Tsitsiklis] Sections 1.3-1.5

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Stavros Tripakis Abstract We introduce problems of decentralized control with communication, where we explicitly

More information

UNIVERSITY OF YORK. MSc Examinations 2004 MATHEMATICS Networks. Time Allowed: 3 hours.

UNIVERSITY OF YORK. MSc Examinations 2004 MATHEMATICS Networks. Time Allowed: 3 hours. UNIVERSITY OF YORK MSc Examinations 2004 MATHEMATICS Networks Time Allowed: 3 hours. Answer 4 questions. Standard calculators will be provided but should be unnecessary. 1 Turn over 2 continued on next

More information

A lower bound for scheduling of unit jobs with immediate decision on parallel machines

A lower bound for scheduling of unit jobs with immediate decision on parallel machines A lower bound for scheduling of unit jobs with immediate decision on parallel machines Tomáš Ebenlendr Jiří Sgall Abstract Consider scheduling of unit jobs with release times and deadlines on m identical

More information

b + O(n d ) where a 1, b > 1, then O(n d log n) if a = b d d ) if a < b d O(n log b a ) if a > b d

b + O(n d ) where a 1, b > 1, then O(n d log n) if a = b d d ) if a < b d O(n log b a ) if a > b d CS161, Lecture 4 Median, Selection, and the Substitution Method Scribe: Albert Chen and Juliana Cook (2015), Sam Kim (2016), Gregory Valiant (2017) Date: January 23, 2017 1 Introduction Last lecture, we

More information

Nearest Neighbor Pattern Classification

Nearest Neighbor Pattern Classification Nearest Neighbor Pattern Classification T. M. Cover and P. E. Hart May 15, 2018 1 The Intro The nearest neighbor algorithm/rule (NN) is the simplest nonparametric decisions procedure, that assigns to unclassified

More information

CS261: A Second Course in Algorithms Lecture #11: Online Learning and the Multiplicative Weights Algorithm

CS261: A Second Course in Algorithms Lecture #11: Online Learning and the Multiplicative Weights Algorithm CS61: A Second Course in Algorithms Lecture #11: Online Learning and the Multiplicative Weights Algorithm Tim Roughgarden February 9, 016 1 Online Algorithms This lecture begins the third module of the

More information

0.1 Motivating example: weighted majority algorithm

0.1 Motivating example: weighted majority algorithm princeton univ. F 16 cos 521: Advanced Algorithm Design Lecture 8: Decision-making under total uncertainty: the multiplicative weight algorithm Lecturer: Sanjeev Arora Scribe: Sanjeev Arora (Today s notes

More information

Solving and Graphing Inequalities

Solving and Graphing Inequalities Solving and Graphing Inequalities Graphing Simple Inequalities: x > 3 When finding the solution for an equation we get one answer for x. (There is only one number that satisfies the equation.) For 3x 5

More information

Lecture 7. Union bound for reducing M-ary to binary hypothesis testing

Lecture 7. Union bound for reducing M-ary to binary hypothesis testing Lecture 7 Agenda for the lecture M-ary hypothesis testing and the MAP rule Union bound for reducing M-ary to binary hypothesis testing Introduction of the channel coding problem 7.1 M-ary hypothesis testing

More information

Time Synchronization

Time Synchronization Massachusetts Institute of Technology Lecture 7 6.895: Advanced Distributed Algorithms March 6, 2006 Professor Nancy Lynch Time Synchronization Readings: Fan, Lynch. Gradient clock synchronization Attiya,

More information

Divisible Load Scheduling

Divisible Load Scheduling Divisible Load Scheduling Henri Casanova 1,2 1 Associate Professor Department of Information and Computer Science University of Hawai i at Manoa, U.S.A. 2 Visiting Associate Professor National Institute

More information

The Online Metric Matching Problem for Doubling Metrics

The Online Metric Matching Problem for Doubling Metrics The Online Metric Matching Problem for Doubling Metrics Anupam Gupta Kevin Lewi Abstract In the online minimum-cost metric matching problem, we are given a metric space with k servers. Requests arrive

More information

arxiv: v2 [cs.ds] 17 Nov 2015

arxiv: v2 [cs.ds] 17 Nov 2015 Online Algorithms for Multi-Level Aggregation Marcin Bienkowski 1, Martin Böhm 4, Jaroslaw Byrka 1, Marek Chrobak 2, Christoph Dürr 3, Lukáš Folwarczný 4, Łukasz Jeż 1,5, Jiří Sgall 4, Nguyen Kim Thang

More information

Notes on the Dual Ramsey Theorem

Notes on the Dual Ramsey Theorem Notes on the Dual Ramsey Theorem Reed Solomon July 29, 2010 1 Partitions and infinite variable words The goal of these notes is to give a proof of the Dual Ramsey Theorem. This theorem was first proved

More information

Convolutional Coding LECTURE Overview

Convolutional Coding LECTURE Overview MIT 6.02 DRAFT Lecture Notes Spring 2010 (Last update: March 6, 2010) Comments, questions or bug reports? Please contact 6.02-staff@mit.edu LECTURE 8 Convolutional Coding This lecture introduces a powerful

More information

ALGEBRAIC STRUCTURE AND DEGREE REDUCTION

ALGEBRAIC STRUCTURE AND DEGREE REDUCTION ALGEBRAIC STRUCTURE AND DEGREE REDUCTION Let S F n. We define deg(s) to be the minimal degree of a non-zero polynomial that vanishes on S. We have seen that for a finite set S, deg(s) n S 1/n. In fact,

More information

CS168: The Modern Algorithmic Toolbox Lecture #8: How PCA Works

CS168: The Modern Algorithmic Toolbox Lecture #8: How PCA Works CS68: The Modern Algorithmic Toolbox Lecture #8: How PCA Works Tim Roughgarden & Gregory Valiant April 20, 206 Introduction Last lecture introduced the idea of principal components analysis (PCA). The

More information

Time. Lakshmi Ganesh. (slides borrowed from Maya Haridasan, Michael George)

Time. Lakshmi Ganesh. (slides borrowed from Maya Haridasan, Michael George) Time Lakshmi Ganesh (slides borrowed from Maya Haridasan, Michael George) The Problem Given a collection of processes that can... only communicate with significant latency only measure time intervals approximately

More information

DIFFERENTIATION RULES

DIFFERENTIATION RULES 3 DIFFERENTIATION RULES DIFFERENTIATION RULES 3.2 The Product and Quotient Rules In this section, we will learn about: Formulas that enable us to differentiate new functions formed from old functions by

More information

Stefan Dobrev 1,RastislavKrálovič 2 and Dana Pardubská 2

Stefan Dobrev 1,RastislavKrálovič 2 and Dana Pardubská 2 RAIRO-Theor. Inf. Appl. 43 009 585 613 DOI: 10.1051/ita/00901 Available online at: www.rairo-ita.org MEASURING THE PROBLEM-RELEVANT INFORMATION IN INPUT Stefan Dobrev 1,RastislavKrálovič and Dana Pardubská

More information

Scheduling Coflows in Datacenter Networks: Improved Bound for Total Weighted Completion Time

Scheduling Coflows in Datacenter Networks: Improved Bound for Total Weighted Completion Time 1 1 2 Scheduling Coflows in Datacenter Networs: Improved Bound for Total Weighted Completion Time Mehrnoosh Shafiee and Javad Ghaderi Abstract Coflow is a recently proposed networing abstraction to capture

More information

Lecture 11: Quantum Information III - Source Coding

Lecture 11: Quantum Information III - Source Coding CSCI5370 Quantum Computing November 25, 203 Lecture : Quantum Information III - Source Coding Lecturer: Shengyu Zhang Scribe: Hing Yin Tsang. Holevo s bound Suppose Alice has an information source X that

More information

2.6 Complexity Theory for Map-Reduce. Star Joins 2.6. COMPLEXITY THEORY FOR MAP-REDUCE 51

2.6 Complexity Theory for Map-Reduce. Star Joins 2.6. COMPLEXITY THEORY FOR MAP-REDUCE 51 2.6. COMPLEXITY THEORY FOR MAP-REDUCE 51 Star Joins A common structure for data mining of commercial data is the star join. For example, a chain store like Walmart keeps a fact table whose tuples each

More information

The Inductive Proof Template

The Inductive Proof Template CS103 Handout 24 Winter 2016 February 5, 2016 Guide to Inductive Proofs Induction gives a new way to prove results about natural numbers and discrete structures like games, puzzles, and graphs. All of

More information

Online Packet Buffering

Online Packet Buffering Online Packet Buffering Dissertation zur Erlangung des Doktorgrades der Fakultät für Angewandte Wissenschaften der Albert-Ludwigs-Universität Freiburg im Breisgau Markus Schmidt Freiburg im Breisgau Februar

More information

Notes on Complexity Theory Last updated: November, Lecture 10

Notes on Complexity Theory Last updated: November, Lecture 10 Notes on Complexity Theory Last updated: November, 2015 Lecture 10 Notes by Jonathan Katz, lightly edited by Dov Gordon. 1 Randomized Time Complexity 1.1 How Large is BPP? We know that P ZPP = RP corp

More information

Online Packet Routing on Linear Arrays and Rings

Online Packet Routing on Linear Arrays and Rings Proc. 28th ICALP, LNCS 2076, pp. 773-784, 2001 Online Packet Routing on Linear Arrays and Rings Jessen T. Havill Department of Mathematics and Computer Science Denison University Granville, OH 43023 USA

More information

Lecture 6 Random walks - advanced methods

Lecture 6 Random walks - advanced methods Lecture 6: Random wals - advanced methods 1 of 11 Course: M362K Intro to Stochastic Processes Term: Fall 2014 Instructor: Gordan Zitovic Lecture 6 Random wals - advanced methods STOPPING TIMES Our last

More information

Analysis of an M/G/1 queue with customer impatience and an adaptive arrival process

Analysis of an M/G/1 queue with customer impatience and an adaptive arrival process Analysis of an M/G/1 queue with customer impatience and an adaptive arrival process O.J. Boxma 1, O. Kella 2, D. Perry 3, and B.J. Prabhu 1,4 1 EURANDOM and Department of Mathematics & Computer Science,

More information

CS168: The Modern Algorithmic Toolbox Lecture #8: PCA and the Power Iteration Method

CS168: The Modern Algorithmic Toolbox Lecture #8: PCA and the Power Iteration Method CS168: The Modern Algorithmic Toolbox Lecture #8: PCA and the Power Iteration Method Tim Roughgarden & Gregory Valiant April 15, 015 This lecture began with an extended recap of Lecture 7. Recall that

More information

Dynamic TCP acknowledgment in the LogP model

Dynamic TCP acknowledgment in the LogP model Journal of Algorithms 48 (2003) 407 428 www.elsevier.com/locate/jalgor Dynamic TCP acknowledgment in the LogP model Jens S. Frederiksen, a,1 Kim S. Larsen, a,,1 John Noga, b and Patchrawat Uthaisombut

More information

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Positioning Sytems: Trilateration and Correlation

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Positioning Sytems: Trilateration and Correlation EECS 6A Designing Information Devices and Systems I Fall 08 Lecture Notes Note. Positioning Sytems: Trilateration and Correlation In this note, we ll introduce two concepts that are critical in our positioning

More information

15-251: Great Theoretical Ideas In Computer Science Recitation 9 : Randomized Algorithms and Communication Complexity Solutions

15-251: Great Theoretical Ideas In Computer Science Recitation 9 : Randomized Algorithms and Communication Complexity Solutions 15-251: Great Theoretical Ideas In Computer Science Recitation 9 : Randomized Algorithms and Communication Complexity Solutions Definitions We say a (deterministic) protocol P computes f if (x, y) {0,

More information

Lecture 13: Introduction to Neural Networks

Lecture 13: Introduction to Neural Networks Lecture 13: Introduction to Neural Networks Instructor: Aditya Bhaskara Scribe: Dietrich Geisler CS 5966/6966: Theory of Machine Learning March 8 th, 2017 Abstract This is a short, two-line summary of

More information

CS261: A Second Course in Algorithms Lecture #12: Applications of Multiplicative Weights to Games and Linear Programs

CS261: A Second Course in Algorithms Lecture #12: Applications of Multiplicative Weights to Games and Linear Programs CS26: A Second Course in Algorithms Lecture #2: Applications of Multiplicative Weights to Games and Linear Programs Tim Roughgarden February, 206 Extensions of the Multiplicative Weights Guarantee Last

More information

15-451/651: Design & Analysis of Algorithms September 13, 2018 Lecture #6: Streaming Algorithms last changed: August 30, 2018

15-451/651: Design & Analysis of Algorithms September 13, 2018 Lecture #6: Streaming Algorithms last changed: August 30, 2018 15-451/651: Design & Analysis of Algorithms September 13, 2018 Lecture #6: Streaming Algorithms last changed: August 30, 2018 Today we ll talk about a topic that is both very old (as far as computer science

More information

LECTURE 11 - PARTIAL DIFFERENTIATION

LECTURE 11 - PARTIAL DIFFERENTIATION LECTURE 11 - PARTIAL DIFFERENTIATION CHRIS JOHNSON Abstract Partial differentiation is a natural generalization of the differentiation of a function of a single variable that you are familiar with 1 Introduction

More information

Essential facts about NP-completeness:

Essential facts about NP-completeness: CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions

More information

198:538 Complexity of Computation Lecture 16 Rutgers University, Spring March 2007

198:538 Complexity of Computation Lecture 16 Rutgers University, Spring March 2007 198:538 Complexity of Computation Lecture 16 Rutgers University, Spring 2007 8 March 2007 In this lecture we discuss Shamir s theorem that PSPACE is the set of languages that have interactive proofs with

More information

6.080/6.089 GITCS Apr 15, Lecture 17

6.080/6.089 GITCS Apr 15, Lecture 17 6.080/6.089 GITCS pr 15, 2008 Lecturer: Scott aronson Lecture 17 Scribe: dam Rogal 1 Recap 1.1 Pseudorandom Generators We will begin with a recap of pseudorandom generators (PRGs). s we discussed before

More information

Optimizing Energy Consumption under Flow and Stretch Constraints

Optimizing Energy Consumption under Flow and Stretch Constraints Optimizing Energy Consumption under Flow and Stretch Constraints Zhi Zhang, Fei Li Department of Computer Science George Mason University {zzhang8, lifei}@cs.gmu.edu November 17, 2011 Contents 1 Motivation

More information

Competitive Management of Non-Preemptive Queues with Multiple Values

Competitive Management of Non-Preemptive Queues with Multiple Values Competitive Management of Non-Preemptive Queues with Multiple Values Nir Andelman and Yishay Mansour School of Computer Science, Tel-Aviv University, Tel-Aviv, Israel Abstract. We consider the online problem

More information

Exam Spring Embedded Systems. Prof. L. Thiele

Exam Spring Embedded Systems. Prof. L. Thiele Exam Spring 20 Embedded Systems Prof. L. Thiele NOTE: The given solution is only a proposal. For correctness, completeness, or understandability no responsibility is taken. Sommer 20 Eingebettete Systeme

More information

CIS 2033 Lecture 5, Fall

CIS 2033 Lecture 5, Fall CIS 2033 Lecture 5, Fall 2016 1 Instructor: David Dobor September 13, 2016 1 Supplemental reading from Dekking s textbook: Chapter2, 3. We mentioned at the beginning of this class that calculus was a prerequisite

More information

Lecture 7: Stochastic Dynamic Programing and Markov Processes

Lecture 7: Stochastic Dynamic Programing and Markov Processes Lecture 7: Stochastic Dynamic Programing and Markov Processes Florian Scheuer References: SLP chapters 9, 10, 11; LS chapters 2 and 6 1 Examples 1.1 Neoclassical Growth Model with Stochastic Technology

More information

University of California Berkeley CS170: Efficient Algorithms and Intractable Problems November 19, 2001 Professor Luca Trevisan. Midterm 2 Solutions

University of California Berkeley CS170: Efficient Algorithms and Intractable Problems November 19, 2001 Professor Luca Trevisan. Midterm 2 Solutions University of California Berkeley Handout MS2 CS170: Efficient Algorithms and Intractable Problems November 19, 2001 Professor Luca Trevisan Midterm 2 Solutions Problem 1. Provide the following information:

More information

CS 453 Operating Systems. Lecture 7 : Deadlock

CS 453 Operating Systems. Lecture 7 : Deadlock CS 453 Operating Systems Lecture 7 : Deadlock 1 What is Deadlock? Every New Yorker knows what a gridlock alert is - it s one of those days when there is so much traffic that nobody can move. Everything

More information

Lecture 3: Lower bound on statistically secure encryption, extractors

Lecture 3: Lower bound on statistically secure encryption, extractors CS 7880 Graduate Cryptography September, 015 Lecture 3: Lower bound on statistically secure encryption, extractors Lecturer: Daniel Wichs Scribe: Giorgos Zirdelis 1 Topics Covered Statistical Secrecy Randomness

More information

EP2200 Course Project 2017 Project II - Mobile Computation Offloading

EP2200 Course Project 2017 Project II - Mobile Computation Offloading EP2200 Course Project 2017 Project II - Mobile Computation Offloading 1 Introduction Queuing theory provides us a very useful mathematic tool that can be used to analytically evaluate the performance of

More information

Improving Online Algorithms via ML Predictions

Improving Online Algorithms via ML Predictions Improving Online Algorithms via ML Predictions Ravi Kumar Google Mountain View, CA ravi.k53@gmail.com Manish Purohit Google Mountain View, CA mpurohit@google.com Zoya Svitkina Google Mountain View, CA

More information

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 Clojure Concurrency Constructs, Part Two CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 1 Goals Cover the material presented in Chapter 4, of our concurrency textbook In particular,

More information

Georgia Common Core GPS Coordinate Algebra Supplement: Unit 2 by David Rennie. Adapted from the Georgia Department of Education Frameworks

Georgia Common Core GPS Coordinate Algebra Supplement: Unit 2 by David Rennie. Adapted from the Georgia Department of Education Frameworks Georgia Common Core GPS Coordinate Algebra Supplement: Unit 2 by David Rennie Adapted from the Georgia Department of Education Frameworks Georgia Common Core GPS Coordinate Algebra Supplement: Unit 2 by

More information

CMSC 451: Lecture 7 Greedy Algorithms for Scheduling Tuesday, Sep 19, 2017

CMSC 451: Lecture 7 Greedy Algorithms for Scheduling Tuesday, Sep 19, 2017 CMSC CMSC : Lecture Greedy Algorithms for Scheduling Tuesday, Sep 9, 0 Reading: Sects.. and. of KT. (Not covered in DPV.) Interval Scheduling: We continue our discussion of greedy algorithms with a number

More information

Theoretical Cryptography, Lecture 10

Theoretical Cryptography, Lecture 10 Theoretical Cryptography, Lecture 0 Instructor: Manuel Blum Scribe: Ryan Williams Feb 20, 2006 Introduction Today we will look at: The String Equality problem, revisited What does a random permutation

More information

Online Interval Coloring and Variants

Online Interval Coloring and Variants Online Interval Coloring and Variants Leah Epstein 1, and Meital Levy 1 Department of Mathematics, University of Haifa, 31905 Haifa, Israel. Email: lea@math.haifa.ac.il School of Computer Science, Tel-Aviv

More information

FE610 Stochastic Calculus for Financial Engineers. Stevens Institute of Technology

FE610 Stochastic Calculus for Financial Engineers. Stevens Institute of Technology FE610 Stochastic Calculus for Financial Engineers Lecture 3. Calculaus in Deterministic and Stochastic Environments Steve Yang Stevens Institute of Technology 01/31/2012 Outline 1 Modeling Random Behavior

More information

The fundamental theorem of calculus for definite integration helped us to compute If has an anti-derivative,

The fundamental theorem of calculus for definite integration helped us to compute If has an anti-derivative, Module 16 : Line Integrals, Conservative fields Green's Theorem and applications Lecture 47 : Fundamental Theorems of Calculus for Line integrals [Section 47.1] Objectives In this section you will learn

More information

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Positioning Sytems: Trilateration and Correlation

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Positioning Sytems: Trilateration and Correlation EECS 6A Designing Information Devices and Systems I Fall 08 Lecture Notes Note. Positioning Sytems: Trilateration and Correlation In this note, we ll introduce two concepts that are critical in our positioning

More information

Q = (c) Assuming that Ricoh has been working continuously for 7 days, what is the probability that it will remain working at least 8 more days?

Q = (c) Assuming that Ricoh has been working continuously for 7 days, what is the probability that it will remain working at least 8 more days? IEOR 4106: Introduction to Operations Research: Stochastic Models Spring 2005, Professor Whitt, Second Midterm Exam Chapters 5-6 in Ross, Thursday, March 31, 11:00am-1:00pm Open Book: but only the Ross

More information

Lecture 18: Zero-Knowledge Proofs

Lecture 18: Zero-Knowledge Proofs COM S 6810 Theory of Computing March 26, 2009 Lecture 18: Zero-Knowledge Proofs Instructor: Rafael Pass Scribe: Igor Gorodezky 1 The formal definition We intuitively defined an interactive proof to be

More information

DIFFERENTIATION RULES

DIFFERENTIATION RULES 3 DIFFERENTIATION RULES DIFFERENTIATION RULES 3. The Product and Quotient Rules In this section, we will learn about: Formulas that enable us to differentiate new functions formed from old functions by

More information

Statistical inference

Statistical inference Statistical inference Contents 1. Main definitions 2. Estimation 3. Testing L. Trapani MSc Induction - Statistical inference 1 1 Introduction: definition and preliminary theory In this chapter, we shall

More information

Lecture 8: A Crash Course in Linear Algebra

Lecture 8: A Crash Course in Linear Algebra Math/CS 120: Intro. to Math Professor: Padraic Bartlett Lecture 8: A Crash Course in Linear Algebra Week 9 UCSB 2014 Qué sed de saber cuánto! Pablo Neruda, Oda a los Números 1 Linear Algebra In the past

More information

TCP is Competitive Against a Limited AdversaryThis research was supported in part by grants from NSERC and CITO.

TCP is Competitive Against a Limited AdversaryThis research was supported in part by grants from NSERC and CITO. TCP is Competitive Against a Limited AdversaryThis research was supported in part by grants from NSERC and CITO. Jeff Edmonds Computer Science Department York University, Toronto, Canada jeff@cs.yorku.ca

More information

Introduction to queuing theory

Introduction to queuing theory Introduction to queuing theory Claude Rigault ENST claude.rigault@enst.fr Introduction to Queuing theory 1 Outline The problem The number of clients in a system The client process Delay processes Loss

More information

6.041/6.431 Spring 2009 Quiz 1 Wednesday, March 11, 7:30-9:30 PM. SOLUTIONS

6.041/6.431 Spring 2009 Quiz 1 Wednesday, March 11, 7:30-9:30 PM. SOLUTIONS 6.0/6.3 Spring 009 Quiz Wednesday, March, 7:30-9:30 PM. SOLUTIONS Name: Recitation Instructor: Question Part Score Out of 0 all 0 a 5 b c 5 d 5 e 5 f 5 3 a b c d 5 e 5 f 5 g 5 h 5 Total 00 Write your solutions

More information

Online algorithms December 13, 2007

Online algorithms December 13, 2007 Sanders/van Stee: Approximations- und Online-Algorithmen 1 Online algorithms December 13, 2007 Information is revealed to the algorithm in parts Algorithm needs to process each part before receiving the

More information

Causality and Time. The Happens-Before Relation

Causality and Time. The Happens-Before Relation Causality and Time The Happens-Before Relation Because executions are sequences of events, they induce a total order on all the events It is possible that two events by different processors do not influence

More information

Taylor Series and Series Convergence (Online)

Taylor Series and Series Convergence (Online) 7in 0in Felder c02_online.te V3 - February 9, 205 9:5 A.M. Page CHAPTER 2 Taylor Series and Series Convergence (Online) 2.8 Asymptotic Epansions In introductory calculus classes the statement this series

More information

Online Scheduling of Parallel Jobs on Two Machines is 2-Competitive

Online Scheduling of Parallel Jobs on Two Machines is 2-Competitive Online Scheduling of Parallel Jobs on Two Machines is 2-Competitive J.L. Hurink and J.J. Paulus University of Twente, P.O. box 217, 7500AE Enschede, The Netherlands Abstract We consider online scheduling

More information

MICROPROCESSOR REPORT. THE INSIDER S GUIDE TO MICROPROCESSOR HARDWARE

MICROPROCESSOR REPORT.   THE INSIDER S GUIDE TO MICROPROCESSOR HARDWARE MICROPROCESSOR www.mpronline.com REPORT THE INSIDER S GUIDE TO MICROPROCESSOR HARDWARE ENERGY COROLLARIES TO AMDAHL S LAW Analyzing the Interactions Between Parallel Execution and Energy Consumption By

More information

Preferences and Utility

Preferences and Utility Preferences and Utility This Version: October 6, 2009 First Version: October, 2008. These lectures examine the preferences of a single agent. In Section 1 we analyse how the agent chooses among a number

More information

Chi-Squared Tests. Semester 1. Chi-Squared Tests

Chi-Squared Tests. Semester 1. Chi-Squared Tests Semester 1 Goodness of Fit Up to now, we have tested hypotheses concerning the values of population parameters such as the population mean or proportion. We have not considered testing hypotheses about

More information