49 results
Online Algorithms
- Rahul Vaze
-
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023
-
Online algorithms are a rich area of research with widespread applications in scheduling, combinatorial optimization, and resource allocation problems. This lucid textbook provides an easy but rigorous introduction to online algorithms for graduate and senior undergraduate students. In-depth coverage of most of the important topics is presented with special emphasis on elegant analysis. The book starts with classical online paradigms like the ski-rental, paging, list-accessing, bin packing, where performance of online algorithms is studied under the worst-case input and moves on to newer paradigms like 'beyond worst case', where online algorithms are augmented with predictions using machine learning algorithms. The book goes on to cover multiple applied problems such as routing in communication networks, server provisioning in cloud systems, communication with energy harvested from renewable sources, and sub-modular partitioning. Finally, a wide range of solved examples and practice exercises are included, allowing hands-on exposure to the concepts.
2 - Ski-Rental
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 11-26
-
- Chapter
- Export citation
-
Summary
Introduction
In this chapter, we consider a canonical online problem that captures the basic decision question encountered in online algorithms. Assume that you arrive at a ski resort in the middle of the ski season. To rent a pair of skis, it takes $1 per day, while to buy them outright, it costs $P. On each new day, you only get to see whether the season is on-going or not, and have to decide whether to buy the ski or keep renting. The objective is to ski for as long as the season lasts with minimum cost possible without, however, knowing the remaining length of the skiing season. This problem is popularly known as the ski-rental problem. The ski-rental problem illustrates the inherent challenge of making decisions under uncertainty, where the uncertainty can even be controlled by an adversary depending on your current or past decisions.
The ski-rental problem models the classic rent/buy dilemma, where the uncertainty about future utility makes the problem challenging. It is highly relevant in various real-world applications, e.g., whether to rent/buy an expensive equipment or a luxury item with unknown number of days of utility, networking/scheduling problems where there are multiple servers with different service guarantees and prices. In scheduling, the following simple problem is equivalent to the ski-rental problem. Consider two servers, where one is shared and follows a FIFO discipline and has a minimal cost while the other is costly but dedicated. The decision to make for each user/packet is whether to stay with the shared server or jump to the dedicated one any time until it is served/processed.
In this chapter, we consider both deterministic and randomized algorithms for the ski-rental problem, and derive optimal algorithms in both settings, which is typically not possible for most of the other online problems considered in the book. We also describe the generic technique to lower bound the competitive ratio of randomized algorithms using Yao's principle. Two extensions of the ski-rental problem – the TCP (transmission control protocol) acknowledgement problem and the Bahncard problem – are also discussed at the end.
Frontmatter
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp i-iv
-
- Chapter
- Export citation
7 - Secretary Problem
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 119-138
-
- Chapter
- Export citation
-
Summary
Introduction
In this chapter, we encounter another canonical online problem (called the secretary problem), where items (secretaries) arrive sequentially, and the objective is to select the best item (hire the best secretary); however, the selecting (hiring) decision has to be made right after the item is presented (secretary is interviewed). Moreover, once an item is selected (secretary is hired), the process stops, and no more items are presented (secretaries are interviewed), while if an item is not selected (secretary is not hired), then that item (secretary) cannot be selected later in hindsight.
Secretary problem captures the basic limitation of online algorithms: its limited view of the input and the requirement to make decisions after observing partial inputs that cannot be changed in the future. The secretary problem is trivial in the offline setting but turns out to be quite difficult in the online setting. In this chapter, we will first show that in the adversarial input setting, the competitive ratio of any online algorithm is unbounded. Thus, a randomized input setting called the secretarial input is considered, where the value or rank of items can be chosen adversarially; however, the order of arrival of items is uniformly random. Under the secretarial input, we present the optimal online algorithm that belongs to the class of algorithms that observes a constant fraction of the total number of items and builds a threshold using that; thereafter it selects the earliest arriving item whose value is more than the threshold. The optimal competitive ratio turns out to be 1/e for a large number of items. We also consider the natural generalization of the secretary problem, called the k-secretary, where multiple items are allowed to be selected.
The basic decision question encountered in the secretary or the k-secretary problem is faced in many real-life situations such as selling a house, accepting a marriage proposal, business opportunity needing massive investment, university admissions with acceptance deadlines, and many others.
Problem Formulation
Let the set of items be I with item i ∈ I having value v(i). Without loss of generality, we will assume that all items have distinct values, i.e., v(i) ≠ v( j) for i ≠ j. We are interested in selecting the item i* with the largest value in I, i.e.,
9 - Bipartite Matching
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 161-188
-
- Chapter
- Export citation
-
Summary
Introduction
In this chapter, we consider a rich combinatorial problem of matching over bipartite graphs, with two sets of vertices, left and right, and an edge can exist only between a left and a right vertex. A matching is a subset of edges such that no two edges in the matching have any common left or right vertex. In the online setting, one side of the vertices, say, right, are available ahead of time, and the left vertices are revealed sequentially. Once a left vertex arrives, its associated edges and the edge weights are also revealed. For a given bipartite graph, the objective is to maximize the number of edges that are part of the matching in the unweighted (weights are 1/0) case, or to maximize the sum-weight of all the edges that are part of matching in the weighted case.
The matching problem is a fundamental combinatorial object that models large classes of association problems, such as web advertising, scheduling jobs to servers, where each server can handle at most one job, crowdsourcing, where each agent can only accomplish at most one job, etc.
In this chapter, we will consider both the unweighted and the weighted case. For the unweighted case, any deterministic algorithm is shown to have a competitive ratio of at most 1/2, which is easily achieved by a greedy algorithm. The main challenge in the unweighted case is to find an optimal randomized algorithm under the worst-case or adversarial input. We first present an upper bound of 1 − 1/e on the competitive ratio of any randomized algorithm, and then analyse an algorithm whose competitive ratio approaches 1 − 1/e with an increasing number of left or right vertices.
The weighted case is a generalization of the secretary problem, and hence adversarial inputs result in the competitive ratio being unboundedly large for any online algorithm. Thus, for the weighted case, typically the secretarial input is considered. Under the secretarial input, we first discuss an algorithm with a competitive ratio of 1/8 that is based on the sample and price philosophy, and then describe an algorithm called ROM whose competitive ratio is 1/e − 1/n, where n is the number of left vertices. Since the competitive ratio of any online algorithm for the secretary problem (Chapter 7) is at most 1/e, ROM is an almost optimal algorithm.
Acknowledgements
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp xix-xx
-
- Chapter
- Export citation
20 - Submodular Partitioning for Welfare Maximization
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 421-432
-
- Chapter
- Export citation
-
Summary
Introduction
In this chapter, we consider a combinatorial resource allocation problem, called the submodular partition or welfare problem, where the objective is to divide or partition a given set of resources among multiple agents (with a possibly different valuation for each subset of resources), such that the sum of the agents’ valuation (for resources assigned to them) is maximized.
When the agents’ valuations of the subsets of resources is arbitrary, this problem is not only NP-hard, but also APX hard, i.e., it is hard to find even a good approximate solution. Thus, a natural, submodularity assumption is made on the agent valuations, that essentially captures the diminishing returns property, i.e., the incremental increase in any agents’ valuation decreases as more and more resources are assigned to it. Important examples of this problem include combinatorial auctions, e.g., spectrum allocation among various cellular telephone service providers, advertisement-display slot assignments on web platforms, public utility allocations, etc.
Under the submodularity assumption, the partitioning problem becomes approximable. Early research in this direction considered an offline setting, but surprisingly the same ideas are applicable in the online setting as well, but with a slightly weaker guarantee.
In this chapter, for the online submodular partitioning problem, we present a simple greedy algorithm, and derive its competitive ratio, as a function of the curvature of the submodular valuation functions and a new metric called the discriminant. Curvature measures the ‘distance’ as to how far the valuation function is from being linear, while the discriminant counts the amount of improvement made by the greedy algorithm in each iteration. We also discuss some important applications of the submodular partition problem.
Submodular Partition Problem
We begin with a formal definition of a submodular function.
Submodularity captures the diminishing returns property exhibited by or expected to hold for natural utility metrics, i.e., the rate of increase of utility function decreases with an increase in the size of the allocated set.
Alternate and equivalent definitions of submodularity are as follows.
Important examples of submodular functions include set union, entropy, mutual information [347], number of edges crossing a graph cut [348], etc. Showing these quantities are submodular can be easy or hard depending on the choice of the three definitions one chooses.
1 - Introduction
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 1-10
-
- Chapter
- Export citation
-
Summary
What Is an Online Algorithm
We begin the discussion on what an online algorithm is using a simple example. Consider a vector X = (x1, x2, … , xn), where xi ∈ +. Let the objective be to select that element of X that has the largest value xi⋆ , where i⋆ = arg maxi xi. In the usual setting, called offline, when the full vector X is observable/available, the best element i⋆ can be found trivially. Here trivially means that it is always possible to find i⋆, disregarding the complexity of finding it.
Next, consider an online setting, where at step t, an online algorithm observes xt, the tthelement of X, and needs to make one of the following two decisions: (i) Either select xt, and declare it to be of the largest value, in which case no future element of X\Xt is presented to it, where Xt = (x1, x2, … , xt), or (ii) does not select xt, and moves on to observe xt+1, but in this case, it cannot later select any of the elements of Xt seen already.
Thus, an online algorithm is limited in its view of the input and has to make decisions after observing partial inputs that cannot be changed in the future. Under these online/causal constraints, the online algorithm's objective is still to select the best element i*. Clearly, this is a challenging task, and depends on the order in which elements of X are presented, i.e., the online algorithm's decisions might be different with input X or (X), whereis any permutation, since the online algorithm makes decisions after observing partial inputs. In fact one can argue that no online algorithm can always select the best element i⋆ unlike an offline algorithm. Hence, a trivial problem in the offline setting turns out to be quite difficult in the online setting, where it is known as the secretary problem. We will discuss the secretary problem in detail in Chapter 7.
To better understand the definition of an online algorithm, consider another example. Let Y = ﹛y1, y2, … , yn﹜ be a set of elements, where yi represents the ‘size’ of element i with 0 < yi < 1, 1 ≤ i ≤ n.
18 - Multi-Commodity Flow Routing
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 397-408
-
- Chapter
- Export citation
-
Summary
Introduction
In this chapter, we consider a canonical network flow problem, popularly known as multicommodity routing, where the network is represented as a directed graph. Each flow request identifies a source–destination pair and a flow demand, i.e., the amount of flow going from the source to the destination (possibly over multiple paths of the graph) should be at least as much as the demand. Each edge of the graph is equipped with a latency function, and the cost of an edge is equal to the latency function evaluated at the total flow passing through it. Requests arrive sequentially or in an online manner, and have to be routed irrevocably using only the causal information, and the goal is to minimize the sum of the cost of all edges after all request arrivals.
Unlike many other problems considered in this book, the offline optimal solution is easy to find by solving a convex program. On the online front, however, an optimal online algorithm is not known. We consider both the splittable and the unsplittable cases (where only one path can be used to route the demand for each source–destination pair). For both cases, we consider affine latency functions and present the best-known guarantees on the competitive ratio that are achieved by a locally optimal algorithm that solves a convex program on each request arrival given the past routing decisions.
It is worthwhile noting that the unsplittable problem considered in this chapter is similar to the network load balancing problem studied in Section 12.4, where the objective was to minimize the maximum load exerted on any one edge of the network. Compared to that objective, in this chapter, we consider minimizing the sum of the ‘loads’ exerted on all edges of the network via summing the latency functions of each edge evaluated at their flow allocation. This new cost function has a fundamentally different competitive ratio guarantee compared to the network load balancing problem. In particular, we showed in Chapter 12 that the best competitive ratio for the network load balancing problem scales as Θ(log(n)), where n is the number of vertices in the network graph. In contrast, we will show that for affine latency functions, a simple algorithm is constant competitive.
4 - Bin-Packing
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 49-66
-
- Chapter
- Export citation
-
Summary
Introduction
In this chapter, we consider a very basic packing problem, called bin-packing, where the objective is to pack items with different weights or sizes in boxes or bins of fixed capacity using as few bins as possible. In particular, assuming that the capacity of each bin is 1 and the weight of each item is at most 1, the problem is to divide the set of items into as few partitions (corresponding to individual bins) as possible, such that the sum of the weight of items in each partition is at most 1. The offline problem when the full set of items is available ahead of time is known to be NP-hard.
Applications of the bin-packing problem in both offline and online settings include inventory management where pellets or containers need to be packed with objects of different sizes and weights, subject to a size or weight capacity, job scheduling where each server can process jobs subject to a maximum capacity, and storing large data sets on disks of finite size, and many others.
Bin-packing is one of the most well-studied problems in the area of online algorithms for which multiple classes of algorithms have been studied. In this chapter, we review two such classes: AnyFit algorithms that try to fit an item in a bin using some local rule and (ii) the Harmonic algorithm that creates special classes of bins ahead of time and assigns an item to a bin of a particular class. The philosophy behind these two classes of algorithms is entirely different; however, they result in very similar competitive ratios when the number of items is large.
We show that with a large number of items, the competitive ratio of AnyFit class of algorithms is 1.7, while the competitive ratio of the Harmonic algorithm is 1.691, where both the ratios are tight. We also show that for arbitrarily many number of items, the lower bound on the competitive ratio of any deterministic online algorithm is 5/3.
Problem Formulation
Consider that there is an infinite supply of bins each with a capacity 1. Items with weight wi arrive sequentially that have to be placed in one of the bins (subject to the sum-weight of the items placed in any bin being less than its capacity) irrevocably with an objective of minimizing the number of bins used.
Preface
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp xiii-xviii
-
- Chapter
- Export citation
-
Summary
Let me begin with a disclaimer! Online algorithms, the subject topic of this book, have nothing to do with the internet or the online connected world. Online algorithms should really be called limited information algorithms or myopic algorithms that have to make decisions with limited information while being compared against the best algorithm in hindsight.
The simplest example of an online algorithm is the game of Tetris, where at each time, the player has to make a decision about where to place the newly arrived tile, given the current state of tile positions and the knowledge of only the newly revealed tile and the next upcoming tile, so as to make as many completed lines with similar colour disappear as possible. Clearly, if all the future arriving tiles were revealed at each time, the optimal placement of the newly arrived tile to maximize the number of completed lines can be computed. However, with the limited information setting of the game, the quest is to get as close to the optimal algorithm in hindsight.
To put online algorithms in perspective, let's ask a question: what does an algorithm usually do? Given a (full) input instance, it provides a routine to optimize an objective function, subject to a set of constraints. When the full input instance is known before the algorithm starts to execute, it is referred to as the offline setting.
For many optimization problems of interest, however, the input instance is revealed sequentially, and an algorithm has to execute or make irrevocable decisions sequentially with the partially revealed input amid uncertainty about the future input, e.g., as we discussed for the game of Tetris. This sequential decision setting is generally referred to as the online setting, and the corresponding algorithm as an online algorithm. Compared to the offline algorithm, an online algorithm's output is a function of its sequentially made decisions and the order in which input is revealed.
To contrast the offline versus the online setting, consider one of simplest problems of memory management in random access memory (RAM) of computing systems. RAM is a fast but limited sized memory, and files before processing have to be loaded in the RAM. At each step of computation, a file is requested. If the requested file is available in the RAM, then execution starts immediately. Otherwise, a fault is counted to model the delay, etc., for loading the requested file into the RAM before execution.
Contents
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp vii-xii
-
- Chapter
- Export citation
11 - Facility Location and k-Means Clustering
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 217-246
-
- Chapter
- Export citation
-
Summary
Introduction
In this section, we consider two related combinatorial online problems that have wide applications in the area of operations research and machine learning, called the facility location problem, and the k-clustering problem. With the facility location problem, requests arrive sequentially whose locations belong to a metric space. On the arrival of a new request, the decision to be made is whether to assign this request to any one of the currently open facilities or open a new facility. The cost of assigning a request to an open facility is equal to the distance between the location of the request and the location of the open facility, while opening a new facility incurs a fixed cost. The cost of an online algorithm is the sum of the costs of all requests plus the total facility opening cost, and the objective is to find online algorithms to minimize the competitive ratio.
The facility location problem is a rich object and captures important problems such as: where to install charging stations for electric vehicles with routing and infrastructure costs. In this chapter, we first derive lower bounds on the competitive ratios of both deterministic and randomized algorithms, and show that the best competitive ratio possible for any online algorithm is at least, where n is the number of requests. On the positive side, we present a randomized algorithm whose competitive ratio is at most O(log n). We also consider a secretarial input setting where the order of arrival of requests is uniformly random, for which the same randomized algorithm is at most 8-competitive. A deterministic algorithm with a competitive ratio of at most O(log n) is also established for a more general setting, where the facility-opening cost depends on the location.
Next, we consider a related problem called the k-clustering problem, where requests arrive online and the objective is to partition the set of requests into at most k-clusters that minimizes the total cost defined as follows. The cost of each cluster is the distance of all requests that belong to the cluster from its centroid (called the centre), and the total cost is the sum of the cost of all the clusters. The k-clustering problem essentially models the classification problem, a fundamental object in machine learning.
10 - Primal–Dual Technique
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 189-216
-
- Chapter
- Export citation
-
Summary
Introduction
In this chapter, we describe a generic primal–dual technique to bound the competitive ratio for a variety of online problems, whose relaxations can be posed as linear programs (LPs). The basic idea of this approach is to interpret the relaxation of the problem that we are interested in solving as the primal program (let it be a minimization problem). Then considering the primal and its dual together, an algorithm is proposed that updates both the primal and the dual solutions on each new request of the input sequence, such that the increment in the primal cost is upper bounded by c (for some c > 1) times the increment in the dual cost. Combining this with the weak duality of LPs, that means that the primal cost is lower bounded by the optimal value of the dual, it follows that the competitive ratio of the proposed algorithm is at most c.
We first describe this recipe in detail, and then discuss three versatile problems that are well suited for this primal–dual schema's application.
The first problem we consider is the set cover problem, where we are given a universe of elements and a collection of subsets of the universe, with each subset having an associated cost. The elements of the universe arrive online, and on each new element's arrival, if that element is not part of the current cover (collection of subsets), then at least one subset that contains that element has to be included in the cover. The objective is to choose that set of subsets that minimizes the sum of the cost of the cover at the end of all element arrivals in the input.
The set cover problem is a special case of what is known as covering problems, where the objective is to minimize the cost of selected resources under some generic coverage constraints. The dual of the covering problem is a packing problem, such as the knapsack problem (Chapter 8), where the objective is to maximize the profit of included items subject to some capacity constraints on the total size of the included items.
The next problem we consider is a packing problem, called the AdWords, that is highly relevant for online web portals like Google, Facebook, etc., where items (ad slots) arrive online and their valuation from multiple interested buyers (advertisers) are revealed.
Appendix
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 433-438
-
- Chapter
- Export citation
-
Summary
Types of Adversaries and Their Relationships
Definition A.1.1 For randomized online algorithms, the oblivious adversary has to generate the entire input sequence in advance (using only the information about distribution used by the randomized algorithm) before any requests are served by the online algorithm. Thus, the adversary has no access to the random choices made by the algorithm. Moreover, OPT's cost is equal to the cost of the optimal offline algorithm knowing the entire input sequence in advance.
Let the oblivious adversary be denoted as Qo. Then Qo knows the distribution D used by the randomized algorithmR, but does not know the actual random choices made byR. Another way to describe this interaction is that Qo chooses input 1, 2, … , which is processed by R sequentially with decisions d1, d2, … and Qo has to make request i without any knowledge of d1, d2, … , di−1.
Definition A.1.2 For a minimization problem, a randomized algorithm R is -competitive against an oblivious adversary Qo if
whereis the input generated by Qo.
Definition A.1.3 Adaptive adversary Qa: Adversary is allowed to observe the online algorithm's decisions (random choices) and generate the next request based on that. Thus, Qa's request i can depend on d1, d2, … , di−1
Definition A.1.4 Adaptive offline adversary Qaf: Adversary is allowed to observe the online algorithm's decisions (random choices) and generate the next request based on that. Moreover, OPT is allowed access to this sequence offline and hence is charged the optimum offline cost for that sequence. Thus, once R has made its sequential decisions d1, d2, … , dn that can be used to generate 1, 2, … , n, OPT's cost is the cost incurred by the optimal offline algorithm knowing the full sequence 1, 2, … , n ahead of time.
A slightly weaker definition is as follows.
Definition A.1.5 Adaptive online adversary Qao: Adversary is allowed to observe the online algorithm's decisions (random choices) and generate the next request based on that. OPT, however, also must serve each request online, i.e., before knowing the random choices made by the online algorithm on the present request, which in turn possibly influences the next request made by the adversary.
6 - Metrical Task System
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 97-118
-
- Chapter
- Export citation
-
Summary
Introduction
In this chapter, we consider a very general and abstract online problem that generalizes various problems already studied in this book, e.g., paging and list accessing. For any generic problem, the cost paid by any online algorithm on the arrival of a new request is a function of its current state and the action taken to fulfil the new request. Typically, the chosen action also alters the state of the algorithm, which then determines the subsequent costs. To model this interplay between cost and state transitions, an abstract paradigm called the metrical task system (MTS) is defined, where there is a set of all possible states (one of them is occupied by any online algorithm at any time).
Requests arrive over time, and the cost of an online algorithm to serve or fulfil each request depends on the state from which it chooses to fulfil the request. This cost is called the state dependent cost. If the online algorithm serves the newly arrived request from its current state, then the only cost it pays is the state dependent cost. Otherwise, it first transitions to a new state and then serves the request. In the event of a transition, the algorithm pays the state dependent cost of the new state in addition to the switching cost to move from the present state to the new state. The switching cost is restricted to satisfying the usual metric properties, e.g., the triangle inequality. The overall cost of an online algorithm is the sum of the state dependent cost and the switching cost, summed over all requests. This is a very generic formulation and can model any finite state dependent dynamical system.
We begin this chapter by deriving a lower bound on the competitive ratio of any deterministic algorithm for the MTS. Because of the generality of the MTS, the power of deterministic online algorithms is limited, and the competitive ratio of any deterministic online algorithm is at least 2|S| − 1, where |S| is the total number of states. Thus, more the number of states, more is the power that adversary has over an online algorithm. We next present a simple algorithm called work-function, based on the broad principle of dynamic programming, that achieves this lower bound exactly.
15 - Scheduling to Minimize Energy with Job Deadlines
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 329-360
-
- Chapter
- Export citation
-
Summary
Introduction
In Chapter 13, we considered the problem of minimizing flow time for both single and multiple servers, when server speeds were fixed, and the only decision variable was which job to schedule or process at each time. With speed tuneable servers, a natural extension of this problem, called speed scaling, was studied in Chapter 14, where the problem of minimizing flow time plus energy was studied, with two decision variables: which job to schedule or process and its processing speed.
In this chapter, we consider an alternate formulation of the speed scaling problem, where jobs have deadlines, and server speeds are tuneable with corresponding power functions. The problem is to find which job to schedule or process at each time, and its processing speed, so as to minimize the total energy used, such that each job is complete by its deadline. For this formulation, both the common deadline case (all deadlines are identical) and the individual deadline case are of interest.
With a single server, for the commonly used power function P(s) = s,> 1 with speed s, we present an online algorithm for both the common and the individual deadlines case, for which the competitive ratio is upper bounded by , and the upper bound is also tight for the considered algorithm. For P(s) = s,> 1, we also consider the more modern paradigm of machine learning augmented algorithm for going beyond the worst case, where prediction about job arrival times and their sizes is available, but with uncertain accuracy.
Another power function of interest, motivated by information theory, is given by P(s) = 2s − 1, which results in fundamentally different results than P(s) = s. For P(s) = 2s − 1, with a single server, we present an online algorithm whose competitive ratio is at most 3 only for the common deadline case. For the common deadline case, we also show how to extend results from the single server case to the multiple server case without changing the competitive ratio.
Notation
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp xxi-xxii
-
- Chapter
- Export citation
19 - Resource Constrained Scheduling (Energy Harvesting Communication)
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 409-420
-
- Chapter
- Export citation
-
Summary
Introduction
In this chapter, we consider a more complicated scheduling problem than Chapter 15, where the resource needed for the processing of packets, energy, itself arrives over time, and the algorithm has only causal knowledge about it. This paradigm is relevant for communication systems powered by renewable energy sources, where the amount of energy arriving at each time slot is unpredictable. This scenario also models scheduling problems on factory floors where the availability time of, say, raw materials or multiple machines needed to complete a complicated job is uncertain and is revealed causally to the algorithm.
Conventionally, in online scheduling, unlimited energy is available, and the objective is to minimize a combination of energy used and relevant performance metrics, e.g., makespan, completion time, flow time, and the only uncertainty is about the packet or job arrival times and their sizes. For the online scheduling problem considered in the chapter, both the amount of energy and its arrival slots in the future are unknown to the algorithm and are possibly controlled by the adversary. With energy arriving over time and in arbitrary amounts, the generic scheduling problem is to minimize any performance metric, subject to the energy neutrality constraint, i.e., the amount of energy used by any time is at most the amount of energy that has arrived so far.
With arbitrary energy arrivals, we consider a canonical problem of transmitting a single packet (with a fixed number of bits) to minimize its completion time. Without loss of generality, we assume that the total amount of energy that arrives over time is sufficient to transmit the packet completely by the optimal offline algorithm OPT. The challenge is to propose an algorithm that can compete with OPT. We show that a Lazy algorithm has a competitive ratio of 2, which is also the best possible.
The considered problem in this chapter is fairly versatile. For example, it can model a scheduling paradigm where there are multiple servers but their availability is unknown, and the amount of work done in each slot is a concave function of the number of servers used in that slot. Then a scheduling problem (with any usual performance metric such as flow time, makespan, completion time) emerges where the decision is: how many servers to use among the available ones at each time.
Bibliography
- Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
-
- Book:
- Online Algorithms
- Published online:
- 07 May 2024
- Print publication:
- 16 November 2023, pp 439-462
-
- Chapter
- Export citation