Skip to main content Accessibility help
×
Hostname: page-component-77c89778f8-rkxrd Total loading time: 0 Render date: 2024-07-19T10:20:42.896Z Has data issue: false hasContentIssue false

1 - Introduction

Published online by Cambridge University Press:  07 May 2024

Rahul Vaze
Affiliation:
Tata Institute of Fundamental Research, Mumbai, India
HTML view is not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

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 ≤ in.

Type
Chapter
Information
Online Algorithms , pp. 1 - 10
Publisher: Cambridge University Press
Print publication year: 2023

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Introduction
  • Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
  • Book: Online Algorithms
  • Online publication: 07 May 2024
  • Chapter DOI: https://doi.org/10.1017/9781009349178.002
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Introduction
  • Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
  • Book: Online Algorithms
  • Online publication: 07 May 2024
  • Chapter DOI: https://doi.org/10.1017/9781009349178.002
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Introduction
  • Rahul Vaze, Tata Institute of Fundamental Research, Mumbai, India
  • Book: Online Algorithms
  • Online publication: 07 May 2024
  • Chapter DOI: https://doi.org/10.1017/9781009349178.002
Available formats
×