<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>An O(log n)-Competitive Posted-Price Algorithm for Online Matching                  on the Line</title></titleStmt>
			<publicationStmt>
				<publisher>Springer</publisher>
				<date>12/21/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10549895</idno>
					<idno type="doi"></idno>
					
					<author>Stephen Arndt</author><author>Josh Ascher</author><author>Kirk Pruhs</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Motivated by demand-responsive parking pricing systems,we consider posted-price algorithms for the online metric matching prob-lem. We give an O(log n)-competitive posted-price randomized algorithmin the case that the metric space is a line. In particular, in this settingwe show how to implement the ubiquitous guess-and-double techniqueusing prices.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>The problem of centrally assigning drivers to parking spots to minimize time and fuel usage may be reasonably modeled by the online metric matching problem. The setting for this problem is a collection of servers S = {s 1 , . . . , s n } (the parking spots) located at various locations in a metric space. In the case that the metric space is a line, we name the servers so that s 1 &#8804; s 2 . . . &#8804; s n . Over time a sequence R = {r 1 , . . . , r n } of requests (the cars) arrive at various locations in the metric space. Upon the arrival of each request (car) r i , the online algorithm must irrevocably be assigned r i to an available server (parking spot) s &#963;(i) , which results in s &#963;(i) being unavailable going forward. Conceptually think of the request (car) r i moving to server (parking spot) s &#963;(i) . Thus the cost incurred by such an assignment is the distance d(s &#963;(i) , r i ) between the location of s &#963;(i) and the location where r i arrived. The objective is to minimize the total cost of matching the requests (cars) to the servers (parking spots).</p><p>However, in order to be implementable within the context of SFpark, online algorithms must be posted-price algorithms. In this setting, posted-price means that before each car arrives, the algorithm sets a price on each available parking spot without knowing the next car's arrival location. We assume each car is driven by a selfish agent who moves to the available parking spot that minimizes the sum of the price of that parking spot and the distance to that parking spot. The objective remains to minimize the aggregate distance traveled by the cars. It is important to note that conceptually the objective of the parking pricing agency is minimizing social cost (or equivalently maximizing social good), not maximizing revenue.</p><p>Research into posted-price algorithms for online metrical matching was initiated in <ref type="bibr">[12]</ref>, as part of a line of research to study the use of posted-price algorithms to minimize social cost in online optimization problems. As a postedprice algorithm is a valid online algorithm, one cannot expect to obtain a better competitive ratio for posted-price algorithms than what is achievable by online algorithms. So this research line has primarily focused on problems where the optimal competitive ratio achievable by an online algorithm is (perhaps approximately) known, and seeks to determine whether a similar competitive ratio can be (again perhaps approximately) achieved by a posted-price algorithm. The higher-level goal is to determine the increase in social cost that is necessitated by the restriction that an algorithm has to use posted prices to incentivize selfish agents, instead of being able to mandate agent behavior.</p><p>Essentially all results in the posted-price online algorithms literature use one of two algorithmic design techniques. The simpler algorithmic design paradigm is called mimicry. A posted-price algorithm A mimics an online algorithm B if the probability that B will take a particular action is equal to the probability that a self-interested agent will choose this same action when the prices of actions are set using A. However, many online algorithms are not mimickable. So another algorithmic design paradigm, called monotonization, first seeks to identify a sufficient property for an online algorithm to be mimickable, and then seeks to design an online algorithm with this property. In all the examples in the literature, the identified property involves some sort of monotonicity in the behavior of the algorithm. In particular, for online metric matching on a tree metric (which includes a line as a special case), an online algorithm A is mimickable if and only if it is monotone in the sense that as the request location moves closer to the location of an available server the probability that the request is matched to that server cannot decrease <ref type="bibr">[9]</ref>.</p><p>There are three online algorithms for online metric matching on a line that interest us here:</p><p>-The Robust Matching (RM) algorithm is a deterministic primal-dual algorithm that is &#920;(log n)-competitive <ref type="bibr">[22]</ref>. The Robust Matching algorithm is not mimickable <ref type="bibr">[8]</ref>, and intuitively seems far from being mimickable. -The Harmonic (H) algorithm is a randomized algorithm that is &#920;(log &#916;)competitive, where &#916; is the ratio of the distance between the furthest pair of servers and the distance between the closest pair of servers <ref type="bibr">[15]</ref>. The Harmonic algorithm chooses between the first available server to the left of the request and the first available server to the right of the request with probability inversely proportional to the distance from the request to these servers. <ref type="bibr">[12]</ref> showed that the Harmonic algorithm is mimickable, thus obtaining an O(log &#916;)-competitive posted-price algorithm. -The Doubled Harmonic (DH) algorithm is a randomized algorithm that is O(log n)-competitive. Doubled Harmonic combines a variation of Harmonic that uses an estimation Z of the optimal cost (between the requests and the servers), with a standard guess-and-double technique for maintaining a good estimate of the current optimal cost to date <ref type="bibr">[15]</ref>. We show in Appendix B that Doubled Harmonic is not mimickable.</p><p>Thus the specific research question that we address is whether we can design a monotone variation of Doubled Harmonic that is O(log n)-competitive, thus leading to an O(log n)-competitive posted-price algorithm. But, even though it is the title of the paper, obtaining a better competitive ratio is only a secondary motivation for this research. Our primary motivation is to determine whether in this setting we can implement guess-and-double monotonically, with the hope that this will provide insights into designing posted-price algorithms in other settings where the standard online algorithms use the ubiquitous guess-and-double technique. To understand why answering this research question isn't completely straightforward, we need to first understand the Doubled Harmonic algorithm.</p><p>Firstly, for ease of presentation, we will make some simplifying assumptions, namely:</p><p>-No pair of servers is closer than 1 unit of distance from each other. We show that this is without loss of generality in Appendix A.1. -All requests arrive at the location of some server. We show that this is without loss of generality in Appendix A.2.</p><p>Intuitively Doubled Harmonic modifies Harmonic in following ways<ref type="foot">foot_0</ref> . Firstly, if the distance between consecutive servers is small (less than Z/n 2 ), where Z is the estimate of optimal maintained by the algorithm, then this distance is artificially inflated (to Z/n 2 ). Secondly, if the actual optimal cost between the requests and servers becomes at least the estimate Z, then the estimate Z is increased geometrically until it exceeds the current optimal cost, and the algorithm conceptually reruns itself on all the requests to date with this new estimate to compute which servers it would ideally like to be available now. The algorithm then continues forward imagining these servers are available, and then correcting to the actually available servers using some optimal matching between the imaginary available servers and the actually available servers. Unfortunately the full algorithm, with corner cases, is a bit more complicated.</p><p>Definition 1. We define the pseudo-distance pd (s i , s i+1 ) between two adjacent servers s i and s i+1 to be</p><p>and s i+1s i otherwise; here Z will be a parameter in the algorithms. We then define the pseudo-distance between two arbitrary servers s i and s j , where i &lt; j to be j-1 h=i pd (s h , s h+1 ).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Definition 2 (Doubled Harmonic Algorithm Description).</head><p>Until a request arrives at a location where there is not an available server, the request is assigned to the available server where it arrives. When the first request r t arrives at a location where there isn't an available server, the Doubled Harmonic algorithm maintains the following invariants:</p><p>-An estimate Z = 10 j , for some integer j, such that optimal cost to date is at least Z/10 and is strictly less than Z. -A set of imaginary servers S &#953; = {s &#953;(1) , . . . s &#953;(k) } that in some sense the algorithm imagines are available (but which may or may not actually be available). S &#953; is initialized to S -{s &#963;(1) , . . . , s &#963;(t-1) }. -The set S &#961; = {s &#961;(1) , . . . s &#961;(k) } of servers that are really available.</p><p>-An arbitrary optimal matching M between S &#953; and S &#961; .</p><p>Then it responds to the arrival of a request r t in the following way:</p><p>-If r t is triggering, meaning that it causes the optimal cost to date to be at least Z, then the estimate Z is set to 10 j where j is the minimum integer that will reestablish the invariant on Z, and the algorithm then performs what we call an adjustment operation (which we define below) up through request r t-1 . -If there is an imaginary server s &#953;(i) at the location of r t then no action is taken (later we will think of this as an imaginary move of length 0). -If there is no imaginary server to the left of r t then it moves to the first imaginary server to its right. This is called an imaginary move.</p><p>-Else if there is no imaginary server to the right of r t then it moves to the first imaginary server to its left. This is called an imaginary move. -Else let s &#953;(h) and s &#953;(h+1) be the first imaginary servers to the left and right of r t , respectively. Then r t moves to s &#953;(h) with probability</p><p>and r t moves to s &#953;(h+1) with probability</p><p>So the algorithm chooses between the imaginary server to the left and the imaginary server to the right with probability inversely proportional to the pseudo-distance. Let us call this movement imaginary movement.</p><p>-After the imaginary movement of the request to a server in s &#953;(j) &#8712; S &#953; , the request continues moving to the server in s &#961;(h) &#8712; S &#961; that s &#953;(j) is matched to in M , which we call a corrective move, and s &#953;(j) is removed from S &#953; .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Definition 3 (Adjustment Operation Description).</head><p>This algorithm takes as input a request r t . The algorithm simulates Doubled Harmonic on all requests up to r t , sets S &#953; to be the servers that would be available at the end of this simulation, and recomputes an optimal matching M .</p><p>There are two reasons why modifying Doubled Harmonic to be monotone isn't straightforward (and presumably why this wasn't done in <ref type="bibr">[12]</ref>):</p><p>1. The first is that the behavior of the algorithm is quite different depending on whether the new request is triggering or not, which is challenging to implement with prices because the prices have to be set before the location of the request is known. 2. The correction moves used by Doubled Harmonic are intuitively not coordinated with the imaginary moves.</p><p>Our main contribution is an algorithm that we call Modified Doubled Harmonic (MDH) that circumvents these issues by modifying Doubled Harmonic in the following way:</p><p>1. Triggering requests r t are just assigned as though they had appeared at a location x near r t where r t would not have been triggering had it arrived at location x. Intuitively because triggering requests are rare, it's not particularly critical that they be handled cheaply. 2. During the correction step the request moves in same direction as it would in Doubled Harmonic, but stops at the first available server. Note that this correction step cannot be implemented by any fixed matching, as Doubled Harmonic does.</p><p>One big hurdle in naturally extending poly-log competitiveness results on posted-price algorithms for online metric matching on a spider metric <ref type="bibr">[9,</ref><ref type="bibr">10]</ref> to tree metrics is the seeming need to be able to implement guess-and-double in a monotonic way on a tree, which was the main motivation for considering how to accomplish this on a line <ref type="bibr">[8]</ref>. So our takeaway is that this result suggests trying to design the correction step for a tree to be as flexible as possible, so as to make it as easy as possible to monotonically blend with the imaginary movement.</p><p>Due to space limitations some proofs have been moved to appendix.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1">Additional Related Work</head><p>Online metric matching was first studied in <ref type="bibr">[17,</ref><ref type="bibr">18]</ref>, and each showed independently that (2n-1)-competitive is the optimal competitive ratio for deterministic algorithms in a general metric space. The best known competitive ratio for a randomized algorithm against an oblivious adversary is O log 2 n <ref type="bibr">[7,</ref><ref type="bibr">20]</ref>, and the best known lower bound is &#937;(log n).</p><p>In this paper, we focus on matching on the line, which is perhaps the most interesting case. <ref type="bibr">[4]</ref> gave the first deterministic, o(n)-competitive algorithm for this problem. <ref type="bibr">[19]</ref> showed that the Generalized Work Function algorithm is &#937;(log n) and O(n) competitive. <ref type="bibr">[21]</ref> showed that no randomized algorithm can achieve a competitive ratio of o &#8730; log n for online matching on the line. <ref type="bibr">[14]</ref> shows how to set prices to mimic the O(1)-competitive algorithm Slow-Fit from <ref type="bibr">[5,</ref><ref type="bibr">6]</ref> for the problem of minimizing makespan on related machines. Monotonization is used in <ref type="bibr">[16]</ref> to obtain an O(1)-competitive posted-price algorithm for minimizing maximum flow time on related machines.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Modified Doubled Harmonic Description</head><p>We explain the Modified Doubled Harmonic algorithm mainly in terms of how it differs from Doubled Harmonic. Modified Doubled Harmonic makes the same initial assumptions about the instance, and maintains the same invariants, as does Doubled Harmonic. Intuitively Modified Doubled Harmonic modifies Doubled Harmonic in the following ways. Firstly, it handles a triggering request (by pretending it arrived at a nearby point where the request wouldn't have been triggering if it arrived there) before doing the double step of guess-and-double. Secondly, during the correction step the request moves in same direction as it would in Doubled Harmonic, but stops at the first available server. Unfortunately the details of both of these two modifications are a bit complicated.</p><p>Note that the optimal matching M between S &#953; and S &#961; partitions the real line into subintervals of three different types:</p><p>Left Islands are maximal subintervals that contain points x where an s &#953;(j) &#8712; S &#953; to the right of x is matched to a s &#961;(h) &#8712; S &#961; to the left of x in M .</p><p>Right Islands are maximal subintervals that contain points x where an s &#953;(j) &#8712; S &#953; to the left of x is matched to a s &#961;(h) &#8712; S &#961; to the right of x in M .</p><p>Stationary Islands are maximal subintervals that are disjoint from left and right islands.</p><p>Note that this partitioning will be the same for all choices of M <ref type="bibr">[22]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Definition 4 (Modified Doubled Harmonic).</head><p>The algorithm behaves the same way as Doubled Harmonic up until the first request that arrives at the location of an unavailable server. The algorithm responds to the arrival of a subsequent request r t in the following manner:</p><p>1. If r t appears at the location of a available server s &#961;(j) , then it is assigned to s &#961;(j) . 2. Else if r t appears to the left of the leftmost available server s &#961; <ref type="bibr">(1)</ref> , then it is assigned to s &#961;(1) .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Else if r t appears to the right of the rightmost available server s &#961;(k) , then it is assigned to s &#961;(k) . 4. Else if r t is not triggering, (a) If r t appears in a left island, it is assigned to the first available server to its left. (b) Else if r t appears in a right island, it is assigned to the first available</head><p>server to its right. (c) Else let s &#953;(h) and s &#953;(h+1) be the first imaginary servers to the left and right of r t , respectively. Then r t moves to the first available server to its left with probability</p><p>and r t moves to the first available server to its right with probability</p><p>So the algorithm chooses between the imaginary server to the left and the imaginary server to the right with probability inversely proportional to the pseudo-distance, and then moves to the nearest available server in that direction. 5. Else (Comment: r t is triggering) (a) Let s &#961;(h) and s &#961;(h+1) be the first available servers to the left and right of r t , respectively. (b) Let y &#8467; be defined in the following way: If one moves from r t to the left, let y &#8467; be the first point x that one comes to where either r t would not have been triggering if it had arrived at x, or x is the location of s &#961;(h) . (c) Let y r be defined in the following way: If one moves from r t to the right, let y r be the first point x that one comes to where either r t would not have been triggering if it had arrived at x, or x is the location of s &#961;(h+1) .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>(d) Let m be the midpoint between s &#961;(h) and s &#961;(h+1) . (e) If R(s &#961;(h)</head><p>, y r , s &#961;(h+1) ) &lt; 1 2 then mimic the assignment of a request appearing at y r . (f ) Else if R(s &#961;(h) , y &#8467; , s &#961;(h+1) ) &gt; 1  2 then mimic the assignment of a request appearing at y &#8467; . (g) Else if r t &lt; m then mimic the assignment of a request appearing at y &#8467; . (h) Else r t &#8805; m, and mimic the assignment of a request appearing at y r . 6. If r t was triggering (this could happen in Cases 1, 2, 3, or 5), the algorithm updates the estimate Z and calls the adjustment operation up through request r t (note the adjustment operation was defined when we defined Doubled Harmonic).</p><p>To show Modified Doubled Harmonic is well-defined, we make the following observations.  Proof. The first two observations follow directly from the definitions of Left Island and Right Island. The third observation follows from the fact that r t has available servers on each side, and so it must have imaginary servers on each side.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Monotonicity Analysis</head><p>Note that Modified Doubled Harmonic is a neighbor algorithm, that is it always assigns requests to a neighboring server. In Lemma 1 we show that if a neighbor algorithm is monotone on intervals between adjacent available servers s &#961;(i) , s &#961;(i+1) then it is monotone. In Lemma 2 we analyze the probability of a non-triggering request in s &#961;(i) , s &#961;(i+1) being assigned to s &#961;(i+1) . In Lemma 3 we analyze the probability of a triggering request in s &#961;(i) , s &#961;(i+1) being assigned to s &#961;(i+1) . Then we conclude in Theorem 1 that Modified Doubled Harmonic is monotone on each interval s &#961;(i) , s &#961;(i+1) .</p><p>Let r t &#8594; s &#961;(j) denote the event that request r t is matched to s &#961;(j) . We will use the notation r t = x as shorthand for r t arrived at location x. We say a point x on the line is a trigger point if a request arriving at location x would be a triggering request, and otherwise we say x is a non-trigger point.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma 1. A neighbor algorithm A is monotone if, for all intervals of adjacent available servers s</head><p>Proof. Suppose for all intervals of adjacent available servers</p><p>] and A has an available server at s &#961;(j+1) . We want to show the following monotonicity condition holds:</p><p>We proceed by simple casework. If u = v, then we have equality; and if</p><p>Otherwise, if there does not exist an available server to the left of u, then Pr[r t &#8594; s &#961;(j+1) | r t = v] = 1. Thus, it remains to consider the case where u, v &#8712; s &#961;(j) , s &#961;(j+1) for adjacent available servers at s &#961;(j) , s &#961;(j+1) . We know Pr r t &#8594; s &#961;(j+1) | r t = x is non-decreasing across this interval, and so we must have Pr</p><p>Thus in all cases, the monotonicity condition holds. If instead we pick u, v, s &#961;(j+1) &#8712; R 1 arbitrary with v &#8712; [s &#961;(j+1) , u], the same reasoning holds. Thus the described condition implies A is monotone, and so it is equivalent to monotonicity for neighbor algorithms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Let r t</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>MDH</head><p>---&#8594; s &#961;(j) denote the event that request r t is matched to available server s &#961;(j) using Modified Doubled Harmonic. We now fix an arbitrary interval of adjacent available servers s &#961;(i) , s &#961;(i+1) . Proof. Note that the interval s &#961;(i) , s &#961;(i+1) can be expressed as the union of a left island, a stationary island, and a right island (any two of which could possibly be empty). Since <ref type="bibr">[22]</ref> guarantees they must appear in this order, the fact that MDH assigns a request r t in a stationary island to s &#961;(i+1) with probability inversely proportional to its pseudodistance from s &#961;(i+1) yields the result.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma 3. For all subintervals</head><p>containing only trigger points be arbitrary. Note that the only information used to make the assignments of triggering requests are the adjacent non-trigger points (or endpoints of the interval) and the arrival location of the triggering requests relative to the midpoint. Since (x L , x R ) contains no non-trigger points and is entirely contained on one side of m, all of this information is identical. Thus, all requests in (x L , x R ) have the same probability of being assigned to s &#961;(i+1) .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Theorem 1. Modified Doubled Harmonic is monotone.</head><p>Proof. The non-trigger points in s &#961;(i) , s &#961;(i+1) , along with m, partition the interval into subintervals for which Pr r t MDH ---&#8594; s &#961;(i+1) | r t = x is constant via Lemma 3. Further, Lemma 2 shows that Pr r t MDH ---&#8594; s &#961;(i+1) | r t = x is nondecreasing across non-trigger points, and Case 5 of Definition 4 ensures that the probability of assigning a triggering request to s &#961;(i+1) is sandwiched between the probability of assigning its neighboring non-trigger points to s &#961;(i+1) . So, Lemma 1 implies that MDH is monotone.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Cost Analysis</head><p>In this section we prove Theorem 2, which states that Modified Doubled Harmonic is O(log n)-competitive.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Theorem 2. MDH is O(log n)-competitive for online matching on the line.</head><p>We first break the execution of Modified Doubled Harmonic into phases, where each phase terminates with a triggering request. We show in Lemma 4 that the aggregate cost of the nontriggering requests during a phase is at most O(log n) times the current estimate of the optimal cost plus the imaginary cost that Doubled Harmonic would have incurred during that phase. We accomplish this by showing that for each nontriggering request, the cost of the optimal matching between the imaginary and available servers decreases by at least the amount that the cost for Modified Doubled Harmonic exceeds the imaginary cost that Doubled Harmonic would have incurred on that request. In Lemma 5 we bound the cost to Modified Doubled Harmonic for a triggering request by twice the greedy cost (which is can be seen to be O(log n) times OPT via the traingle inequality) and the cost to Modified Doubled Harmonic if the request had arrived at a nearby non-trigger point. Once we have established Lemma 4 and Lemma 5, the bounding of Modified Doubled Harmonic's cost proceeds as in <ref type="bibr">[15]</ref>. Details can be found in the Appendix.</p><p>We first need some definitions. Let S &#953; (t) be the set of imaginary servers before the arrival of r t , and let S &#961; (t) be the set of available servers before the arrival of r t . Let D (S &#953; (t), S &#961; (t)) be the optimal cost of matching S &#953; (t) and S &#961; (t). Let s &#963;(t) be the available server that Modified Doubled Harmonic used for request r t . For a nontriggering request r t , if r t appeared in a left island or a right island, let s &#947;(t) be the imaginary server that would be selected if one selected a neighboring imaginary server to either the left or right of r t with probability inversely proportional to the pseudo-distance. If instead r t appeared in a stationary island, then if one moves from r t in the direction of s &#963;(t) , let s &#947;(t) be the first imaginary server one hits. Define a phase as the sequence of requests which appear while MDH has the same estimate Z on the optimal cost. Phases begin with a sequence of nontriggering requests, and terminate with a single triggering request, after which the estimate Z inflates. Lemma 4. Consider an arbitrary phase, and renumber the nontriggering requests in that phase to r 1 , r 2 , . . . , r k . With probability one the expression</p><p>is a non-increasing function of t.</p><p>Proof. Define g(t) to be the above expression for the chosen phase, and let t &#8712; [1, k] be arbitrary. Then we have</p><p>where S &#961; (t + 1) = S &#961; (t) \ {s &#963;(t) } and S &#953; (t + 1) = S &#953; (t) \ {s &#947;(t) }. Write S &#961; (t) = {s &#961;(1) , s &#961;(2) , . . . , s &#961;(&#8467;) } and S &#953; (t) = {s &#953;(1) , s &#953;(2) , . . . , s &#953;(&#8467;) } where the servers in each set have been ordered left-to-right. Suppose s &#963;(t) = s &#961;(a) and s &#947;(t) = s &#953;(b) . Now, suppose a &lt; b. Then because s &#961;(a) &lt; s &#961;(b) and MDH is a neighbor algorithm, we must have r t &lt; s &#961;(b) . Further, because s &#953;(a) &lt; s &#953;(b) and s &#953;(b) is a neighboring imaginary server to r t , we must have r t &gt; s &#953;(a) . The final observation is the trickiest to notice: r t &#8804; s &#961;(a) , meaning that a &lt; b implies MDH cannot assign r t leftwards. We can show this through simple casework on the description of Modified Doubled Harmonic. The only cases where leftward assignment is possible are Case 3, Case 4a, and Case 4c. However, in all of these cases, we must have a &#8805; b. Indeed, in Case 3, a = &#8467; &#8805; b. In Case 4a, r t is in a left island, and so <ref type="bibr">[22]</ref> shows r t must have more available servers than imaginary servers on its left, forcing a &#8805; b. In Case 4c, r t is in a stationary island, and so <ref type="bibr">[22]</ref> shows there must be an equal number of available and imaginary servers to the left of (and including the location of) r t . By definition of s &#947;(t) when r t is in a stationary island, we must have a = b. Thus given a &lt; b, leftward assignment of r t is not possible, and so r t &#8804; s &#961;(a) . Finally, we can deduce s &#953;(a) &lt; r t &#8804; s &#961;(a) &lt; s &#961;(b) . Simple computation yields</p><p>The first inequality follows by simple computation and application of the triangle inequality, but for completeness, the proof is given in the Appendix (Lemma 6). If a = b, direct computation gives the same result. If a &gt; b, applying the same reasoning as before gives s &#961;(b) &lt; s &#961;(a) &#8804; r t &lt; s &#953;(a) , and the same result follows. Thus in all cases, g(t + 1)g(t) &#8804; 0 giving g(t + 1) &#8804; g(t). Thus g(t) is a non-increasing function of t, completing the proof. Lemma 5. Consider a triggering request r t . Let s j be the available server closest to r t . Let y &#8467; and y r be defined as in the Modified Doubled Harmonic algorithm, and let s &#8467; and s r be the available servers that Modified Doubled Harmonic would have assigned a request arriving at y &#8467; and y r , respectively. Then</p><p>Proof (Sketch). For brevity we give the proof sketch, and the full proof is given in the Appendix. We proceed by showing the claim holds in each potential trigger case of Definition 4. In Cases 1, 2, and 3, the claim trivially holds, because r t is assigned greedily to s j . It remains to consider Case 5. Suppose r t appeared in between adjacent available servers s &#961;(h) and s &#961;(h+1) , and let m be the midpoint of s &#961;(h) , s &#961;(h+1) .</p><p>(a) If R(s &#961;(h) , y r , s &#961;(h+1) ) &lt; 1  2 , then r t mimics the assignment of a request arriving at y r . Thus</p><p>r t mimics the assignment of a request appearing at y &#8467; . Thus E d r t , s &#963;(t) &#8804; E [d (y &#8467; , s &#8467; )]. (c) Else if r t &lt; m, then r t mimics the assignment of a request appearing at y &#8467; . Because y &#8467; &#8804; r t &#8804; m and R(s &#961;(h) , y &#8467; , s &#961;(h+1) ) &#8804; 1 2 , we have E d r t , s &#963;(t) &#8804; 2 max (E [d (y &#8467; , s &#8467; )] , d (r t , s j )). (d) Else r t &#8805; m, and r t mimics the assignment of a request appearing at y r . Because y r &#8805; r t &#8805; m and R(s &#961;(h) , y r , s &#961;</p><p>Thus in all cases, the claim holds.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A Remedying Some Assumptions</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.1 Minimum Distance 1 Between Servers</head><p>First, note that we may always assume the minimum distance between servers at different locations is 1, which can be easily remedied by a suitable scaling. Thus to resolve the assumption that the minimum distance between adjacent servers is 1, the important piece to resolve is that no two servers exist at the same location.</p><p>Suppose we have a monotone neighbor algorithm A which is &#945;-competitive under the assumptions that all servers exist at different locations, and requests appear at server locations. We will construct a monotone neighbor algorithm B which is 2&#945;-competitive and removes the first assumption.</p><p>Again we may assume the instance given to B has minimum distance 1 between adjacent servers at different locations, which can be easily remedied by a suitable scaling. We do this primarily for ease of analysis. Let = 1 5n . On the instance given to B, construct an instance for A by first placing one server per server location; and then perturbing the extra servers at the same location by at most (so that all servers are now at distinct locations). B then services request r in the following way.</p><p>-If r appears at an available server s in the instance of B, place a simulated request r at an available server s in the same " -window" in the instance of A. Then r B -&#8594; s and r A -&#8594; s. -Otherwise, let t be the location of r's appearance. Place a simulated request r at t in the instance of A. Given r A -&#8594; s for an available server s, then r B -&#8594; s.</p><p>It is easy to see that B is a monotone neighbor algorithm given A is a monotone neighbor algorithm. It remains to show B is 2&#945;-competitive. Note that each assignment in ON B and OPT B can differ from the corresponding assignment in ON A and OPT A by at most . Thus</p><p>If OPT B = 0, then ON B = 0, because all requests appeared at available servers. Otherwise, OPT B &gt; 0, and so some request is forced to match to a server at a different location. Because the minimum distance between adjacent servers (at different locations) is 1, we must have ON B &#8805; OPT B &#8805; 1. The same property holds for the instance of A (where some request is forced to assign outside of its " -window"), and so ON A &#8805; OPT A &#8805; 1 -2 &#8805; 3  5 . Thus</p><p>and so B is 2&#945;-competitive, as desired.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.2 Requests Appear at Server Locations</head><p>Suppose we have a monotone neighbor algorithm B which is &#946;-competitive under the assumption that requests appear at server locations. We will construct a monotone neighbor algorithm C which is (2&#946; + 1)-competitive and makes no such assumption. Specifically, C services request r in the following way.</p><p>-Let t be the server closest to r, regardless of whether t is available or not.</p><p>-Place a simulated request r at the location of t in the running instance of B.</p><p>-Given r B -&#8594; s for an available server s, then r C -&#8594; s.</p><p>Let S = {s 1 , s 2 , . . . , s n } be the set of servers in the instance and R = {r 1 , r 2 , . . . , r n } be the set of requests. Without loss of generality, assume the servers of S and the requests of R have been written, according to their locations, in increasing order of coordinate value. Let t i be the server nearest to r i , regardless of whether it is available or not upon appearance of r i . Then the set T = {t 1 , t 2 , . . . , t n } is written as "ordered" as well.</p><p>First, we show C is (2&#946; + 1)-competitive. Suppose B assigns ri to s &#963;(i) for each i.</p><p>, where the structure of OPT B and OPT C is given by <ref type="bibr">[22]</ref>. Note OPT C &#8805; n i=1 d(r i , t i ) since t i is the nearest server to r i for each request r i . Then we have</p><p>as desired. Further, it is easy to see that C is a neighbor algorithm given B is a neighbor algorithm. Lastly, we must show C is monotone. Indeed, the sets of points closest to s i for each server s i partition the real line into disjoint intervals (where all servers at the same location are understood to share the same interval). Any requests appearing within the same interval are treated identically in C. This discretization ensures that because B is monotone and thus satisfies the condition in Lemma 1, C satisfies the same condition, and so it is also monotone.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B Proof that Doubled Harmonic is Not Monotone</head><p>Consider the following instance.</p><p>Suppose that r 1 arrives at s 2 . Then, r 1 DH --&#8594; s 2 . Next, suppose r 2 arrives at s 2 . Then the optimal matching of r 1 and r 2 has cost 4, the estimate Z is set to 10, the set of imaginary servers is set to S &#953; = {s 1 , s 3 , s 4 }, and the set of available servers is set to S &#961; = {s 1 , s 3 , s 4 }. Clearly the optimal matching M between S &#953; and S &#961; just assigns each server to itself. Suppose DH then performs the imaginary move r 2 &#8594; s 1 and the subsequent corrective move s 1 &#8594; s 1 . This leaves S &#953; = {s 3 , s 4 } and S &#961; = {s 3 , s 4 }. Now, we show that the assignment of r 3 is not monotone.</p><p>Suppose that r 3 appears at s 1 . Then, the optimal matching of the requests has cost 7. DH performs the imaginary move r 3 &#8594; s 3 and the subsequent corrective move s 3 &#8594; s 3 , and so DH assigns r 3 to s 3 with probability 1.</p><p>Suppose that r 3 instead appears at s 2 . Now, the optimal matching of the requests has cost 11. The estimate Z is then set to 100, and the adjustment operation is performed. With probability 4  11 , DH simulates assigning r 1 to s 2 and r 2 to s 3 . The imaginary move of r 3 is then to s 1 with probability 27 31 , and the subsequent corrective move assigns r 3 to s 3 . The imaginary move of r 3 to s 4 has probability 4  31 , and the subsequent corrective move assigns r 3 to s 4 . Thus with nonzero probability, DH assigns r 3 to s 4 (and thus NOT to s 3 ) in this case.</p><p>Thus the probability that DH assigns r 3 to s 3 is higher for arrival at s 1 (probability 1) than for arrival at s 2 (probability &lt; 1). Further note that this violation of monotonicity is induced by the fact that an adjustment operation will not occur if r 3 arrives at s 1 , but it will occur if r 3 arrives at s 2 . Thus DH is not monotone.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C Auxiliary Lemma for Lemma 4</head><p>Lemma 6. Let P, Q be two finite sets of points in R 1 with the same number of elements. Suppose P = {p 1 , p 2 , . . . , p m } and Q = {q 1 , q 2 , . . . , q m }, where the points have been written in increasing order of location. Let D(P, Q) be the optimal cost of matching P and Q. Further, let</p><p>Proof. We know via <ref type="bibr">[22]</ref> that</p><p>Then we have</p><p>For g &gt; h, the proof follows identically, only with P, Q and g, h switched.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D Cost Analysis Definitions</head><p>To explicitly prove our cost results, we first introduce many useful definitions.</p><p>Let OPT(t) be the optimal cost of matching the first t requests to the servers, and suppose that OPT(n) &#8712; 10 &#8467; , 10 &#8467;+1 . For ease of presentation, suppose that before the estimate Z is instantiated during execution of MDH, it holds a default value of 1. Then the estimate Z runs through Z = 10 ki for 0</p><p>Let Z i = 10 ki for each 0 &#8804; i &#8804; m. We now introduce some definitions which allow us to partition the requests according to Z i . Let -&#964; i be the maximum index t such that OPT(t) &lt; Z i for each 0 &#8804; i &#8804; m.</p><p>-&#961; i be the i'th triggering request, which upon appearance causes OPT(t) to increase from &lt; Z i-1 to &#8805; Z i-1 . Equivalently &#961; i = r &#964;i-1+1 . -B i be the sequence of requests r t arriving after &#961; i and before &#961; i+1 .</p><p>Let B 0 and B m be the sequence of requests appearing before &#961; 1 and after &#961; m , respectively. This allows us to decompose the full request sequence as B 0 , &#961; 1 , B 1 , &#961; 2 , . . . , B m-1 , &#961; m , B m . The phase of the algorithm associated with Z i is given by the pair (B i , &#961; i+1 ). However, we will no longer use this phase terminology, and rather reference the B i 's and &#961; i 's directly. We now introduce some definitions which allow us to partition MDH's assignments and DH's underlying imaginary moves according to Z i . Let -W i = rt&#8712;Bi { r t , s &#963;(t) } be the set of assigned edges for the requests in B i . -X i = rt&#8712;Bi { r t , s &#947;(t) } conceptually be the set of chosen imaginary moves for the requests in B i .</p><p>Conceptually, X i is a set of possible imaginary moves of Doubled Harmonic. These imaginary moves are relevant for us because we bound the cost of Modified Doubled Harmonic's assignments against the cost of these imaginary moves. We are also interested in how MDH/DH simulates request assignments during an adjustment operation. For this reason, define s &#956;(i,t) to be the imaginary server chosen for the request r t during the adjustment operation triggered by &#961; i . Of course, s &#956;(i,t) is only defined for t &#8804; &#964; i-1 , because the adjustment operation which occurs after the estimate inflates to Z = Z i only simulates request assignments up to the triggering request &#961; i = r &#964;i-1+1 . Now, let <ref type="figure">s &#956;(i</ref>,<ref type="figure">t</ref>) } be the set of simulated assignments of the requests for the adjustment operation triggered by &#961; i .</p><p>-e i = { r t , s &#963;(t ) } be the assigned edge of &#961; i . Here t = &#964; i-1 + 1.</p><p>-f i = { r t , s &#947;(t ) } conceptually be the chosen imaginary move for &#961; i . Here t = &#964; i-1 + 1, and s &#947;(t ) is a neighboring imaginary server to &#961; i chosen with probability inversely proportional to the pseudodistance after the adjustment operation triggered by &#961; i is performed. -E i = {e 1 , e 2 , . . . , e i } be the set of assigned edges for the triggering requests up through &#961; i .</p><p>This allows us to decompose the full assigned edge set W = ( m i=0 W i ) &#8746; E m in the order W = W 0 , e 1 , W 1 , e 2 , . . . , W m-1 , e m , W m . We can further decompose the chosen imaginary moves in the order X = X 0 , f 1 , X 1 , f 2 , . . . , X m-1 , f m , X m . Lastly, for an edge set U , let |U | be the sum of the lengths of the edges in U .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E Bounding Non-Trigger Costs</head><p>Let i &#8712; [0, m] be arbitrary. We now pursue the goal of bounding |W i |, the total cost of the non-trigger assignments while Modified Doubled Harmonic has estimate Z = Z i . We start by recalling an important result from <ref type="bibr">[15]</ref>, which gives a cost bound on the imaginary moves and the simulated assignments from the adjustment operation. Let ti = &#964; i-1 + 2 be the time of the first request in B i . To bound |W i | -|X i |, we will bound D S &#961; ti , S &#953; ti , which will be sufficient for our purposes upon application of Lemma 4. We do so by constructing a matching M i : S &#953; ti &#8594; S &#961; ti whose cost is appropriately bounded.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma 7. [15] E [|X</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma 8. [15] There exists a bijection M</head><p>Proof. <ref type="bibr">[15]</ref> Cover the line with {f i } &#8746; Y i and i-1 j=0 W j &#8746; E i . For all imaginary and available servers at the same location, match them together. Otherwise, for each remaining imaginary server in S &#953; ti , follow the edges of this covering until an available server in S &#961; ti is reached, and match them together. Via the triangle inequality, the induced matching</p><p>Proof. ti is the time of the first request in B i , and &#964; i + 1 is the time of the (i + 1)'st triggering request &#961; i+1 . Thus ti &#8804; &#964; i + 1 and so Lemma 4 implies g (&#964; i + 1) &#8804; g ti . Thus</p><p>The third inequality follows from the fact that D S &#961; ti , S &#953; ti is the optimal cost of matching S &#961; ti and S &#953; ti . The last inequality follows from Lemma 8. Applying Lemma 7 gives the desired result.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F Bounding Trigger Costs</head><p>We now prove a sequence of lemmas with the eventual goal of proving Lemma 13. We begin by introducing some basic functions to compute assignment costs. In Lemma 5, we bound the cost to Modified Doubled Harmonic for a triggering request by twice the greedy cost (which is clearly O(log n) times OPT) and the cost to Modified Doubled Harmonic if the request had arrived at a nearby nontrigger point. We bound the greedy cost of &#961; i in Lemma 12, and the cost bound on the non-trigger points is a simple corollary from Lemma 9. Combining these results, we prove Lemma 13.</p><p>First, we introduce some basic functions for computing assignment costs. The function L h (x) is the linear transformation of s &#961;(h) , s &#961;(h+1) onto (0, 1) (which maps s &#961;(h) to 0 and s &#961;(h+1) to 1). The function N (&#945;, &#947;) = &#945;(1&#947;) + (1&#945;)&#947; is a "normalized" assignment cost, where we assume the adjacent available servers exist at 0 and 1. The following lemma makes these ideas rigorous. Lemma 10. Suppose request r t appears in between adjacent available servers s &#961;(h) and s &#961;(h+1) . Further, suppose r t assigns to s &#961;(h) , s &#961;(h+1) with probabilities 1p, p. Then the expected cost of r t 's assignment is</p><p>Proof. The proof follows directly from simple computation.</p><p>The utility of decomposing r t 's assignment cost in this way comes from the fact that we may now concern ourselves with studying N , the normalized assignment cost, which simplifies much of the computation. Next, we establish some useful facts about the function N . Each fact will be used in bounding the cost in each subcase of Case 5 of Definition 4.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma 11. The following facts hold for all</head><p>Proof.</p><p>(a) This follows directly via simple computation.</p><p>(b) This follows directly via simple computation.</p><p>Thus upon application of (c), we have</p><p>Proof (of <ref type="bibr">Lemma 5)</ref>. We proceed by showing the claim holds in each potential trigger case of Definition 4. In Cases 1, 2, and 3, the claim trivially holds, because &#961; i is assigned greedily to s j . It remains to consider Case 5. Suppose &#961; i appeared in between adjacent available servers s &#961;(h) and s &#961;(h+1) , and let m be the midpoint of s &#961;(h) , s &#961;(h+1) . Suppose that under the linear transformation L h : s &#961;(h) , s &#961;(h+1) &#8594; (0, 1), &#961; i maps to &#945;, y &#8467; maps to &#946; &#8467; , and y r maps to &#946; r . Further, m trivially maps to 1 2 . In comparing the costs of assignments in s &#961;(h) , s &#961;(h+1) , it suffices to compare the costs of the normalized assignments in (0, 1), given the normalization factor of s &#961;(h+1)s &#961;(h) is always the same.</p><p>Let p &#8467; = R(s &#961;(h) , y &#8467; , s &#961;(h+1) ) and p r = R(s &#961;(h) , y r , s &#961;(h+1) ). Lemma 11 cleanly handles each subcase of Case 5.</p><p>(a) If p r &lt; 1  2 , then &#961; i mimics the assignment of a request arriving at y r . We know &#945; &#8804; &#946; r , and so N (&#945;, p r ) &#8804; N (&#946; r , p r ). (b) Else if p &#8467; &gt; 1  2 , then &#961; i mimics the assignment of a request appearing at y &#8467; . We know &#945; &#8805; &#946; &#8467; , and so N (&#945;, p &#8467; ) &#8804; N (&#946; &#8467; , p &#8467; ). (c) Else if &#961; i &lt; m, then &#961; i mimics the assignment of a request appearing at y &#8467; .</p><p>We know &#946; &#8467; &#8804; &#945; &#8804; 1 2 and p &#8467; &#8804; 1 2 , and so N (&#945;, p &#8467; ) &#8804; 2 max (&#945;, N (&#946; &#8467; , p &#8467; )). Note that &#945; is simply the normalized greedy assignment of &#961; i . (d) Else &#961; i &#8805; m, and &#961; i mimics the assignment of a request appearing at y r . We know &#946; r &#8805; &#945; &#8805; 1 2 and p r &#8805; 1 2 , and so N (&#945;, p r ) &#8804; 2 max (1&#945;, N (&#946; r , p r )). Note that 1&#945; is simply the normalized greedy assignment of &#961; i .</p><p>Given &#961; i assigns rightwards to s &#961;(h+1) with probability p, in all cases, we have</p><p>Multiplying both sides by the normalization factor of s &#961;(h+1)s &#961;(h) gives the desired result.</p><p>It remains to bound the cost of all individual non-trigger assignments and the greedy assignment. First, we obtain a bound on the greedy assignment of &#961; i . Lemma 12. For a triggering request &#961; i , let s be the available server nearest to</p><p>Proof. Run the adjustment operation on all requests up to &#961; i = r &#964;i-1+1 to generate simulated assigned servers s &#956;(i,t) and a set of simulated assignments Y i = &#964;i-1 t=1 r t , s &#956;(i,t) solely for the purposes of our argumentation. This produces a set of imaginary servers S &#953; . Cover the line with the edges in Y i and the assigned edges i-1 j=0 W j &#8746; E i-1 . This covering partitions the line into disjoint intervals for which each interval has the same number of requests, servers in Y i , and previously assigned servers in {s &#963; <ref type="bibr">(1)</ref> , s &#963;(2) , . . . , s &#963;(&#964;i-1) }. By extension, each partition must have the same number of imaginary servers in S &#953; and available servers in S &#961; . Now pick an imaginary server s &#947;(t ) for the triggering request &#961; i in the same way we picked s &#947;(t ) , where here t = &#964; i-1 + 1. This gives a generated imaginary move f i = r t , s &#947;(t ) , and add f i to this covering. From &#961; i , follow f i , reaching a (previously) imaginary server s &#953;(g) &#8712; S &#953; . Some available server must exist within the partition containing s &#953;(g) , and so the triangle inequality ensures that some available server exists at most distance</p><p>j=0 |W j | from &#961; i . Given s is the available server nearest to &#961; i , we must have</p><p>where in the final step we apply Lemma 7.</p><p>Next, we obtain a bound on assignments of requests appearing at non-trigger points, which is a direct corollary from Lemma 9.</p><p>Corollary 1. For a non-trigger point y, let s be the available server that Modified Doubled Harmonic would have assigned a request arriving at y, given the estimate is currently</p><p>With all of the pieces in place, we establish a cost bound on E [|e i |].</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma 13. E [|e</head><p>Proof. The proof follows directly from application of Lemma 5, Corollary 1, and Lemma 12. Note that we apply Corollary 1 when the estimate is Z = Z i-1 because &#961; i causes the estimate to inflate from Z = Z i-1 to Z = Z i .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>G Proving Theorem 2</head><p>We now make the recursive bounds on E We now proceed by induction on i. The base case of |W 0 | = 0 is trivial, and simply define |e 0 | = 0. Let i &#8712; [0, m -1] be arbitrary, and assume the claim holds for all j &#8712; [0, i]. Then</p><p>completing the induction.</p><p>Finally, we now prove Theorem 2. The O(log n)-competitiveness of Modified Doubled Harmonic is a direct consequence of Lemma 14 and the the geometric sums are asymtotically equal to their largest summand. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Proof (of Theorem 2). Aggregating the edges W = (</head></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>Technically our description of Doubled Harmonic differs in some ways from how it is described in<ref type="bibr">[15]</ref>, but we believe that our description is a bit simpler, and the same analysis holds.</p></note>
		</body>
		</text>
</TEI>
