Book contents
- Frontmatter
- Dedication
- Contents
- Preface
- Acknowledgements
- Notation
- 1 Introduction
- 2 Ski-Rental
- 3 List Accessing
- 4 Bin-Packing
- 5 Paging
- 6 Metrical Task System
- 7 Secretary Problem
- 8 Knapsack
- 9 Bipartite Matching
- 10 Primal–Dual Technique
- 11 Facility Location and k-Means Clustering
- 12 Load Balancing
- 13 Scheduling to Minimize Flow Time (Delay)
- 14 Scheduling with Speed Scaling
- 15 Scheduling to Minimize Energy with Job Deadlines
- 16 Travelling Salesman
- 17 Convex Optimization (Server Provisioning in Cloud Computing)
- 18 Multi-Commodity Flow Routing
- 19 Resource Constrained Scheduling (Energy Harvesting Communication)
- 20 Submodular Partitioning for Welfare Maximization
- Appendix
- Bibliography
- Index
1 - Introduction
Published online by Cambridge University Press: 07 May 2024
- Frontmatter
- Dedication
- Contents
- Preface
- Acknowledgements
- Notation
- 1 Introduction
- 2 Ski-Rental
- 3 List Accessing
- 4 Bin-Packing
- 5 Paging
- 6 Metrical Task System
- 7 Secretary Problem
- 8 Knapsack
- 9 Bipartite Matching
- 10 Primal–Dual Technique
- 11 Facility Location and k-Means Clustering
- 12 Load Balancing
- 13 Scheduling to Minimize Flow Time (Delay)
- 14 Scheduling with Speed Scaling
- 15 Scheduling to Minimize Energy with Job Deadlines
- 16 Travelling Salesman
- 17 Convex Optimization (Server Provisioning in Cloud Computing)
- 18 Multi-Commodity Flow Routing
- 19 Resource Constrained Scheduling (Energy Harvesting Communication)
- 20 Submodular Partitioning for Welfare Maximization
- Appendix
- Bibliography
- Index
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.
- Type
- Chapter
- Information
- Online Algorithms , pp. 1 - 10Publisher: Cambridge University PressPrint publication year: 2023