Tight Competitive Analyses of Online Car-sharing Problems

The car-sharing problem, proposed by Luo, Erlebach and Xu in 2018, mainly focuses on an online model in which there are two locations: 0 and 1, and $k$ total cars. Each request which specifies its pick-up time and pick-up location (among 0 and 1, and the other is the drop-off location) is released in each stage a fixed amount of time before its specified start (i.e. pick-up) time. The time between the booking (i.e. released) time and the start time is enough to move empty cars between 0 and 1 for relocation if they are not used in that stage. The model, called $k$S2L-F, assumes that requests in each stage arrive sequentially regardless of the same booking time and the decision (accept or reject) must be made immediately. The goal is to accept as many requests as possible. In spite of only two locations, the analysis does not seem easy and the (tight) competitive ratio (CR) is only known to be 2.0 for $k=2$ and 1.5 for a restricted value of $k$, i.e., a multiple of three. In this paper, we remove all the holes of unknown CR's; namely we prove that the CR is $\frac{2k}{k + \lfloor k/3 \rfloor}$ for all $k\geq 2$. Furthermore, if the algorithm can delay its decision until all requests have come in each stage, the CR is improved to roughly 4/3. We can take this advantage even further, precisely we can achieve a CR of $\frac{2+R}{3}$ if the number of requests in each stage is at most $Rk$, $1 \leq R \leq 2$, where we do not have to know the value of $R$ in advance. Finally we demonstrate that randomization also helps to get (slightly) better CR's.


Introduction
Our problem in this paper is the online car-sharing problem.In car-sharing (not only for cars, but also for other resources like bikes and shuttle-buses), there are several service stations in the city, for instance in residential areas and downtown, at popular sightseeing spots, and so on.Customers can make a request with a pick-up time and place and a drop-off time and place.The decision for accepting or rejecting a request should be made in an online fashion and we want to maximize the profit by accepting as many requests as possible.Relocation of (unused) resources is usually possible with a much smaller or even negligible costs.(It is seen occasionally that a truck is carrying bikes for this purpose.)Theoretical studies of this problem have started rather recently and turned out to be nontrivial even for two locations.

50:2 Tight Competitive Analyses of Online Car-Sharing Problems
Model.We basically follow the problem setting of previous studies by  with main focus to that of two locations and k servers (i.e.cars).The two locations are denoted by 0 and 1 and k(≥ 2) servers are initially located at location 0. The travel time from 0 to 1 and 1 to 0 is the same, denoted by t.The problem for k servers and two locations is called the kS2L problem for short.
Figure 1 The car-sharing problem with two locations.
We denote the i-th request by r i = ( ti , t i , p i ) which is specified by the release time or the booking time ti , the start time t i , and the pick-up location p i ∈ {0, 1} (the drop-off location is 1 − p i ).If r i is accepted, the server must pick up the customer at p i at time t i and drop off the customer at 1 − p i at time t i + t.Suppose for each r i , t i is an integer multiple of the travel time between location 0 and 1, i.e., t i = vt for some v ∈ N. We assume that t i − ti is equal to a fixed value a, where a ≥ t for all requests.Without loss of generality, assume a = t.Then we are only interested in a discrete-time stage, denoted by 0, 1, 2, . ... Each server can only serve one request at a time.Serving a request yields a fixed positive profit y.A server used for a request with p i = 0 (p i = 1, resp.) cannot be used for a request with p i+1 = 0 (p i+1 = 1, resp.) in the next stage.We allow empty movements, i.e., a server can be moved from one location to the other without serving any request.An empty movement spends time t, but takes no cost.The goal of the kS2L problem is to maximize the total profit by serving a set of online requests.Note that the performance of an online scheduling algorithm is typically evaluated by competitive analysis.More precisely, the quality of an online algorithm is measured by the worst case ratio, called competitive ratio (CR), which is defined to be the fraction of the profit of the offline optimal algorithm over that of the online algorithm.The offline algorithm is aware of all requests in advance.If an online algorithm is randomized, we use expected values for the output of the online algorithm.The online algorithm is called 1/δ-competitive, if for any instances, the profit of the algorithm is at least δ times the offline optimal profit.So far the current model is exactly the same as kS2L-F in [7-10], although no randomized cases were discussed in these papers.

Simultaneous Decision Model.
Recall that in the kS2L model, two (or more) inputs with the same booking time still have an order.Thus we can equivalently think that if r 1 , . . ., r d are requests with booking time t, they are coming later than t − 1 and before or at t, one by one.Each of them should get a decision (accept or reject) immediately before the next request.The adversary can change r i after looking at the response of the online algorithm against r 1 , . . ., r i−1 .
This setting sounds reasonable as an online model, but the following question seems also natural; what if requests with the same booking time come exactly at the same time, the online player can see all of them and can make decisions all together simultaneously at the booking moment (equivalently the requests arrive in the same fashion as above but the player can delay his/her online decisions until the booking moment).In this study we also consider this new model, denoted by kS2L-S.We further extend the model, assuming that the number of requests with the same booking time is at most Rk for some constant R. We call the generalized model RkS2L-S.Notice that having more than k requests at the same location with the same booking time never helps.Therefore, we only need to study the range 50:3 0 ≤ R ≤ 2 and kS2L-S means the special case that R = 2. Our algorithm for RkS2L-S is adaptive in the sense that it automatically accommodates the value of R, which does not have to be known in advance.
Prior work.The car-sharing problem has received a considerable amount of attention in recent years.Luo et al. [7] studied the problem with a single server and two locations with both fixed booking time and variable booking time.Here "variable booking time" essentially means that requests with start time t may come after requests with start time t − 1.They gave lower bounds on the CR for both fixed and variable booking time under the positive empty movement assumption.Later, Luo et al. [8] studied the car-sharing problem with two servers and two locations, i.e. 2S2L.They considered only the problem with fixed booking time and proposed an online algorithm which can achieve a tight bound of two.Luo et al. [9] studied the car-sharing problem with k servers and two locations, for both fixed booking time (kS2L-F) and variable booking time (kS2L-V).Namely they showed the CR is at least 1.5 for all k and at most 1.5 for k = 3i for kS2L-F and at least 5/3 for all k and at most 5/3 for k = 5i for kS2L-V.Very recently, Luo et al. [10] studied the car-sharing problem on a star network with k servers as well as two types of travel time: a unit travel time and an arbitrary travel time.
In comparison with the online setting, Böhmová et al. [3] considered the offline car-sharing problem in which all input requests are known in advance.The objective is to minimize the number of vehicles while satisfying all the requests.The offline (i.e.static) problem can be solved in polynomial time.Another closely related problem is the on-line dial-a-ride problem (OLDARP), where objects are transported between given points in a metric space.The problem has been studied widely.The goal is to minimize the total makespan [1,2] or the maximum flow time [6].Christman et al. [4] studied a variation of OLDARP where each request yields a revenue.Yi et al. [12] studied another variation of OLDARP where each request has a deadline, having a similar flavor as car sharing.
Our contribution.Recall that the tight CR of kS2L-F is 1.5 for k = 3i [9] and 2 for k = 2 [8], but open for other k's.In this paper, we show that it is 2k k+⌊k/3⌋ for all k ≥ 2 and 1.5 for all k ≥ 2 if randomization is allowed.For kS2L-S that allows the online player to delay its decision, it is shown that we can indeed take this advantage.Namely the tight CR for kS2L-S is 2k k+⌊k/2⌋ for all k ≥ 2 and 4/3 for all k ≥ 2 if randomization is allowed.For RkS2L-S (we can assume 1 ≤ R ≤ 2 without loss of generality), it is shown that the CR is strictly improved if R < 2, namely the tight CR (for randomized algorithms) is improved to (2 + R)/3.Note that if R = 1.1 (the number of requests at each stage exceeds k by at most 10%), the CR becomes at most 1.034.
The basic idea of our algorithms is "greedy" and "balanced".Both notions have already appeared in [9], but our implementation of them is significantly different from theirs.More importantly, our analysis is completely new; namely we use a simple mathematical induction (augmented by two interesting parameters other than the profit itself) while a classification of request types was used in [9].
The merit of our new analysis is demonstrated more clearly in kS2L-S than in the original kS2L-F.Therefore we present the results for kS2L-S first and then those for kS2L-F; the deterministic case in Section 2 and the randomized case in Section 3. RkS2L-S is discussed in Section 4, where we introduce two magic numbers calculated from the number of requests in each stage.Finally all matching lower bounds are given in Section 5.

Deterministic algorithms
As mentioned in the previous section, we first discuss the basic GBA that works for the kS2L-S model and then its accept/reject version that works for the original kS2L-F model.The analysis for the former will carry over to that of the latter pretty well.The following table summarizes our notations which are used in the rest of the paper.

Notation k
The number of total servers (0, 1): Requests from location 0 to 1 (1, 0): Requests from location 1 to 0 Iℓ i : The number of (0,1)'s requested in stage i with start time i Ir i : The number of (1,0)'s requested in stage i with start time i Gℓ i : The number of (0,1)'s accepted by the algorithm in stage i Gr i : The number of (1,0)'s accepted by the algorithm in stage i Gf i : The number of servers not used, i.e., k − Gr i − Gℓ i Oℓ i : The number of (0,1)'s accepted by OPT in stage i Or i : The number of (1,0)'s accepted by OPT in stage i Of i : The number of servers not used, i.e., k − Or i − Oℓ i Suppose there are x and x ′ servers at location 0 and y and y ′ servers at location 1 at time i, where x servers will serve (0,1)'s with start time i but x ′ servers are not used.Similarly, y servers will serve (1,0)'s but y ′ servers not.Then at time i + 1 we can use x servers for (1,0)'s and y servers for (0,1)'s.Furthermore, x ′ + y ′ servers are available for requests of both directions since the requests with start time i + 1 come at time i and we can move x ′ + y ′ servers to whichever locations as we like.Now we introduce stages and say we have x (= Gℓ i ) servers at location 1, y (= Gr i ) servers at location 0, and x ′ + y ′ (= Gf i ) "floating" servers in stage i + 1.We also denote the server allocation at time i + 1 as y, x ′ + y ′ , x using the new notation −, −, − .Note that we need to have artificial Gr 0 , Gℓ 0 and Gf 0 for stage 1 whose values are 0, 0, and k, respectively.Now the idea of this new greedy balanced algorithm can be illustrated as follows.Let k = 100 and suppose requests in stage 1 are (Iℓ 1 , Ir 1 ) = (100, 100).As described above, the server allocation in stage 1 is 0, 100, 0 , and hence accepted requests, (Gℓ 1 , Gr 1 ), can be anything like (100,0), (75,25) or (0,100).However, if (100,0) is selected, then the server allocation in stage 2 is 0, 0, 100 and the adversary would send (Iℓ 2 , Ir 2 ) = (100, 0) for stage 2, by which no servers are available for the online player.Since the almighty adversary can select (0,100) in stage 1 and he/she can accept all the requests in stage 2, the CR would be 2. Thus one can easily see that the best thing an algorithm can do is to accept (Gℓ 1 , Gr 1 ) = (50, 50) in stage 1 to secure a CR of 1.5.This is the notion of "Balanced".Note that requests denoted by (Iℓ 2 , Ir 2 ) = (100, 0) have booking time 1, but a booking time of requests (and when they actually come) is no longer important once we know (Iℓ i , Ir i ) and the server allocation Thus we will simply use "requests for stage i" without mentioning their booking time.
Input: Iℓ i and Ir i are the numbers of (0,1)'s and (1,0)'s in stage i, respectively.An integer k is the number of total servers.The server allocation at the beginning of stage i is , namely Gr i−1 and Gℓ i−1 servers at locations 0 and 1, respectively and Gf i−1 = k − Gℓ i−1 − Gr i−1 floating servers.Output: Gℓ i and Gr i are the numbers of accepted (0,1)'s and (1,0)'s, respectively.
1: Recall that floating servers in stage i are actually sit at location 0 or 1 at time i − 1, say 30 ones at location 0 and 10 at location 1 among 40 floating ones.So if we need 20 floating servers in stage i at location 1, we need to move 10 servers from location 0 to 1 using the duration from time i − 1 to i.However, we do not describe this empty movement in our algorithms since it is easily seen and its cost is free in our model.
Observe that the greedy part of Algorithm 1 appears in lines 1 and 2 for (0,1)'s and in lines 4 and 5 for (1,0)'s.If the condition in line 1 is met, then we accept (0,1)'s until we have exhausted the servers or the (0,1)'s available in this stage.After that we accept as many (1,0)'s as possible.It works similarly for lines 4 and 5.If neither the condition in line 1 nor the one in line 4 is met, we just split the requests almost evenly in line 7.The following theorem shows that GBA achieves the optimal 4  3 -competitiveness for all even k and approaches this value when k is a large odd number.In the rest of this paper, we use ALG to denote an online algorithm and OPT an offline optimal scheduler in general.Proof.In order to prove the theorem, we consider the following six key values: Our goal is to bound A i by B i .To do so, it is popular to use a potential function for competitive analysis, which is typically the difference between configurations of ALG and OPT.In our present case, it may be the difference between server allocations of GBA and OPT.It turns out, however, that this configuration difference or a similar one is unlikely to work since we still have a freedom for server selection which is not controlled by this difference strongly.Instead we introduce four parameters, X i , Y i , U i and V i , which play a key role in our proof.Note that X i and Y i denote the total revenue of GBA and OPT respectively for the first i + 1 stages assuming that the adversary tries to penalize the algorithm choice by introducing k (0,1)'s in stage i + 1; the last two values, U i and V i , denote the total revenue of GBA and OPT respectively for the first i + 1 stages assuming that the adversary tries to penalize the algorithm choice by introducing k (1,0)'s in stage i + 1. Intuitively, GBA balances the accepted requests in both directions and guarantees that the CR's in these two instances ( Yi Xi and Vi Ui , respectively) are not too large.It turns out that taking care of these two extreme instances is sufficient to keep the CR low for all instances.
In order to prove that the algorithm is 1/δ-competitive, we show that the set of the following inequalities (i) to (iii), denoted by S(n), hold for every n by induction.
Now the main part of the proof is proving S(n) assuming, as stated in the induction hypothesis, that S(j) holds for all 0 ≤ j ≤ n − 1.Note that we can rewrite A i , B i , X i and so on as follows: Since Oℓ i ≤ min{Iℓ i , Or i−1 + Of i−1 } and Or i ≤ min{Ir i , Oℓ i−1 + Of i−1 }, the following lemma is obvious, but will be used frequently.
Now we are ready to prove the theorem.Suppose line 2 is executed.Then the following (L1) or (L2) holds for the value of Gℓ i and (R1), (R2) or (R3) for the value of Gr i .Similarly if line 5 is executed, (R1) or (R2) holds for Gr i and (L1), (L2) or (L3) for Gℓ i .

Thus (iii) is proved by the hypothesis on (ii). Finally for (L3),
then use the hypothesis on (i) to claim (iii).
The proof that (R1) or (R2) or (R3) implies (ii) is similar and omitted.Finally we show that (i) follows from any combination.Observe that (L1) and (R1) obviously implies (i) since no algorithms accept more requests than requested.All combinations including (L3) or (R3) are also obvious since GBA accepts k requests.Similarly for (L2) and (R2) when Gf i−1 = 0 (otherwise impossible).The remaining cases are (L1) and (R2), and (L2) and (R1).For the former, by Lemma 2 and we can use the hypothesis on (iii).(L2) and (R1) is similar and omitted.
What remains is the case that line 7 is executed.Observe that line 7 gives us Gℓ n ≥ ⌊k/2⌋, Gr n ≥ ⌊k/2⌋ and Gℓ n + Gr n = k.We have already shown that the first one implies (iii), the second one (ii) and the third one means all the servers accept requests and is obviously enough for (i).Thus the theorem is proved.◀ As seen in GBA and its analysis, a dangerous situation for the online player is that ALG accepts too many requests of one direction when it is possible.If ALG knows the total number of requests in each direction in advance, we can avoid this situation rather easily.Now we discuss kS2L-F, in which ALG does not know the total number of requests in advance.A simple and apparent solution is to stop accepting requests of one direction when its number gets to some value, even if more requests of that direction are coming and could I S A A C 2 0 2 1 50:8 Tight Competitive Analyses of Online Car-Sharing Problems be accepted.In the next algorithm, ARGBA, we set this value as 2k/3.It then turns out, a little surprisingly, that the analysis for Theorem 1 is also available for the new algorithm almost as it is.

Input: The server location is Gr
the beginning of this stage i.Requests are coming sequentially, each of which, r, is (0,1) or (1,0).k is the total number of servers.Output: Immediate accept or reject for r.Gℓ i and Gr i for the next server allocation. 1: ) is the number of (0,1)'s ((1,0)'s, resp.) received in this stage so far.)2: while a new request r comes do 3: if r is (0,1) then 4:  Proof.Observe that once a (0,1) (similarly for (1,0)) is rejected, then subsequent ones are all rejected.Let X i and Y i be the last (0,1) and (1,0), respectively, that are accepted and Gℓ i and Gr i be their numbers after lines 6 and 10, respectively.Also, let Iℓ i and Ir i be the total numbers of (0,1)'s and (1,0)'s in stage i, respectively (only used for analysis).Suppose the last accepted (0,1) has gone through the conditions in line 5.Then, one can see that the next (0,1), if any, is blocked by one of these conditions and thus one of the following four conditions, (L1) through (L4), is met.Similarly for (1,0)'s, one of (R1) through (R4) is met.Now consider stage n.In a way similar to the proof of Theorem 1, we can show that one of (L1) to (L4) (with subscript n replacing i) implies the induction (iii).In fact, the reason is exactly the same for (L1) and (L2) as before.Using Gℓ i ≥ ⌊k/3⌋ in (L4) we have and then use the hypothesis on (i) to claim (iii) (recall that our target CR is relaxed to 2k k+⌊k/3⌋ ).(L3) obviously implies Gℓ i ≥ ⌊k/3⌋.
Also we can show, though omitted, that one of (R1) to (R4) (with subscript n replacing i) implies the induction (ii).
We can furthermore show that any one of the 16 combinations of (L1) to (L4) and (R1) to (R4) implies (i): If a combination includes one of (L3), (L4), (R3) and (R4), then (i) is obvious since ARGBA accepts at least ⌈2k/3⌉ requests in this stage.So we only have to consider the four combinations ((L1) or (L2), and (R1) or (R2)), and these cases already appeared in the proof of Theorem 1, which concludes the proof.◀

Randomized Algorithms
Notice that the CR of GBA is 2 when k = 2.The reason is simple, i.e., the existence of the ceiling function, namely if we can accept a fractional request, our CR would be 4/3.Of course it is impossible to accept a request by one third, but it is possible to accept that request with probability 1/3, which has the same effect as accepting it by one third in terms of an expected number.We define the following function for probabilistic rounding.Let x be a (possibly fractional) non-negative number.Then define prrd(x) = ⌈x⌉ with probability x − ⌊x⌋ ⌊x⌋ with probability 1 − (x − ⌊x⌋) For instance, prrd(3.3) is 4 with probability 0.3 and 3 with probability 0.7.prrd(3) is always 3.
Note E[prrd(x)] = x.Now we are ready to introduce the Probabilistic GBA.

1:
The same as Algorithm 1 except that line 7 is replaced as follows: PrGBA is a 4/3-competitive algorithm for kS2L-S for any k ≥ 2.
Proof.Observe the induction in the proof of the deterministic case.The base case is fine with δ = 3/4, and we can keep using this 3/4 unless line 7 is executed.Since the expected value of Gr i and Gℓ i are both k/2 when the modified line 7 is executed, we can remove the ceiling sign from the description of the algorithm.Thus our new CR is 2k/(k + k/2) = 4/3.◀ Algorithm 4 PrARGBA(k): Probabilistic ARGBA.

I S A A C 2 0 2 1
▶ Theorem 5. PrARGBA is a 1.5-competitive algorithm for kS2L-F for any k ≥ 2.
Proof.The same idea as the proof of Theorem 4. If this modified part is executed, the expected value of Gℓ i is 2k/3 and hence the expected value of Gr i is k/3 if Gℓ i + Gr i = k.Thus the worst case of deterministic ARGBA, Gℓ i = ⌈2k/3⌉ and Gr i = ⌊k/3⌋, can be avoided.◀

4
Adaptive GBA kS2L-S gives the online player the advantage of an advance knowledge of the number of requests in the current stage.GBA does exploit this advantage, but not fully.Suppose (Iℓ 1 , Ir 1 ) = (50, 100).GBA accepts the same number, 50, of (0,1)'s and (1,0)'s in stage 1.
Thus the CR in these two steps is 4/3.Now what about accepting roughly 28.57(0,1)'s and 71.43 (1,0)'s in stage 1 (recall we can handle fractional numbers due to randomized rounding)?Then the best the adversary can do is to provide (Iℓ 2 , Ir 2 ) = (100, 0) or (0, 50), in both of which the CR is 200/171.43≈ 150/128.57≈ 1.17, significantly better than 1.5 of GBA.This is the basic idea of our new algorithm, AGBA.These key values 28.57 and 71.43 are denoted by α i and β i , respectively.The ultimate goal of AGBA is to accept exactly α i (0,1)'s and β i (1,0)'s while the ultimate goal of GBA was to accept k/2 (0,1)'s and k/2 (1,0)'s.If this goal is unachievable, to be figured out from the values of Iℓ i , Ir i , Gℓ i−1 , Gr i−1 and Gf i−1 , both algorithms simply turn greedy.Gℓ i ← prrd(α i ); 13: end if 15: end if 16: return Gℓ i and Gr i Suppose Iℓ i + Ir i is at most kR i for stage i.As mentioned in a moment, we do not lose generality if R i is restricted to 1 ≤ R i ≤ 2, under which the CR of AGBA is bounded by (2 + R)/3, where R is the maximum value of R i in the whole stages.We do not know R in advance and AGBA does not have to, either.
The competitive analysis is given by the following theorem.Note that if the input in stage i includes more than k (0,1)'s, we can select an arbitrary subset of size k and similarly for (1,0)'s.This guarantees that R ≤ 2 and the case that Iℓ i + Ir i < k is covered by R = 1.Thus the restriction of R, 1 ≤ R ≤ 2, makes sense.Also, note that α i + β i = k whenever R i ≥ 1. AGBA uses R i but not R. R = max{R i } by definition and so δ ≤ δ i (where δ i is the local value of δ in this stage, see its definition at Lemma 8) for all i.
▶ Theorem 6. Suppose the number of requests is limited to at most Rk in all stages for some R such that 1 ≤ R ≤ 2 and Rk is an integer.Then AGBA solves RkS2L-S and is 1/δ-competitive, where δ = 3/(2 + R).
Proof.Because of the probabilistic rounding used in lines 12, the expected values of Gℓ i and Gr i are α i and β i , respectively, if this part is executed.We need two lemmas; the second one illustrate a tricky nature of α i and β i .
Proof.A simple calculation of the formulas in line 2 is enough if the condition Iℓ i + Ir r ≥ k is met.Otherwise it is also obvious by line 4. ◀ Proof.If R i < 1 then δ i = 1, α i = Iℓ i and β i = Ir i , so the lemma is obviously true.Otherwise, a simple calculation: Similarly for the other.◀ The basic strategy of the proof is the same as Theorem 1.We consider the following four conditions for the values of Gℓ i and Gr i .Suppose line 7 is executed.Then Gℓ i satisfies (L2) and Gr i satisfies (R1).Similarly if line 10 is executed, (L1) and (R2) hold.
Now consider stage n.It is shown that (L1) or (L2) implies (iii) of the induction.For (L2), the analysis is the same as before and omitted.For (L1), using Lemma 2 for V n , we have If min{Iℓ n , Gr n−1 } = Iℓ n , then we are done using the hypothesis (i).Otherwise recall that the condition of line 9, by Lemma7 for the last inequality) and thus we can use Lemma 8 and the hypothesis on (i) to claim (iii).The proof that (R1) or (R2) implies (ii) is very similar and omitted.
Next we prove that each of the four combinations implies (i).(L1) and (R1), and (L2) and (R2) are obvious since AGBA is as efficient as OPT or accepts k requests (recall min{Iℓ n , Gr n−1 } ≥ α n and min{Ir n , Gℓ n−1 } ≥ β n mentioned above and by Lemma 7).For (L1) and (R2), using Lemma 2 and α n ≤ Iℓ n , we have I S A A C 2 0 2 1
The remaining case is the one that lines 12 and 13 are executed.If Gℓ n = α n , we have U n = A n−1 + k + α n and thus we can use Lemma 8 to claim (iii) as shown above.Similarly for Gr n and (ii).(i) is obvious since Gℓ i + Gr i = k, completing the proof.◀

CR Lower Bounds
The CR's given so far are all tight.In this section we prove matching lower bounds for kS2L-S, for kS2L-F, for kS2L-F with randomization, and for RkS2L-S with randomization (including for kS2L-S with randomization as a special case).Proof.Let A be any deterministic algorithm.The basic idea is similar to [9].The adversary gives k (0,1)'s (sequentially) for stage 1.If A accepts at most ⌊2k/3⌋ ones, then the adversary stops his/her requests and the game ends.Thus the CR is at least k ⌊2k/3⌋ .Otherwise, if A accepts ⌈2k/3⌉ or more, then the adversary gives another k (1,0)'s for stage 1 and k (0,1)'s for stage 2. Since A has accepted at least ⌈2k/3⌉ (0,1)'s in stage 1, A cannot use those servers for the (0,1)'s for stage 2. Hence A can accept at most k requests in stage 1 and at most k − ⌈2k/3⌉ requests in stage 2, meaning at most 2k − ⌈2k/3⌉ = k + ⌊k/3⌋ requests in total.OPT can accept k (1,0)'s in stage 1 and k (0,1)'s in stage 2, i.e., 2k in total.Thus the CR is at least and if E[kℓ] ≤ α (note that the adversary has the full information of A, so it can compute E[kℓ]), then the adversary requests k (1,0)'s (and zero (0,1)'s) in stage 2. The profit of A is at most The profit of OPT is k + ⌊Rk/2⌋, and the theorem is proved.If E[kℓ] > α then let , and it is easy to see that α + β = k.Hence we have E[kr] ≤ β because E[kℓ] + E[kr] = E[kℓ + kr] ≤ k.Now the adversary requests k (0,1)'s.The profit of A and OPT are exactly the same as above by replacing ⌊ Rk 2 ⌋ with ⌈ Rk 2 ⌉.We may omit the rest of calculation.Note that although the two input instances provide a tight lower bound for the competitive ratio, applying Yao's Minimax theorem on any probability distribution over these two input instances does not provide the same tight bound.◀

Concluding Remarks
We have presented a different greedy and balanced algorithm with a new analysis which fully exploits the notion of "floating servers," and the arguments of the mathematical induction using supplementary parameters X i and U i (and their OPT counterparts).We believe that the analysis technique is powerful for future studies of many extensions of the car sharing problem, which would be worthwhile to investigate for practical purposes.In particular, relaxation of the rental period condition should be challenging and important.

Algorithm 5
AGBA(k): Adaptive GBA.Input:The same as GBA Output: The same as GBA1: if R i = (Iℓ i + Ir i )/k ≥ 1 then

▶ Theorem 9 .▶ 10 .
No deterministic online algorithms for the kS2L-S problem can achieve a CR of less than 2k k+⌊k/2⌋ .Proof.Let A be any deterministic algorithm.The adversary requests k (0,1)'s and k (1,0)'s in stage 1.A accepts k ℓ (0,1)'s and k r (1,0)'s.If k ℓ ≤ ⌊k/2⌋, then the adversary requests k (1,0)'s (and zero (0,1)'s) in stage 2. The profit of A is k ℓ + k r in stage 1, and at most (k− k ℓ − k r ) + k ℓ in stage 2. Therefore, the total profit of A is at most k + k ℓ ≤ k + ⌊k/2⌋.The profit of OPT is 2k, and the theorem is proved.If k ℓ > ⌊k/2⌋, then k r ≤ ⌊k/2⌋.Now the adversary requests k (0,1)'s in stage 2. The profit of A and OPT are exactly the same as above and we may omit the rest of calculation.Thus the bound is tight.◀Theorem No deterministic online algorithms for the kS2L-F problem can achieve a CR of less than 2k k+⌊k/3⌋ .

▶ 11 . 13 ▶ Theorem 12 . 3 .
2k k+⌊k/3⌋ .Since 2k k+⌊k/3⌋ ≤ k ⌊2k/3⌋ for all k (this can be verified by checking for k = 3j, k = 3j + 1 and k = 3j + 2), the theorem is proved.◀Theorem No randomized online algorithms for the kS2L-F problem can achieve a CR of less than 1.5.Proof.The proof is almost the same as that of Theorem 10.Since the adversary has the full information (other than random values) of ALG, he/she can compute the expected value of ALG's output.So what we have to do is just removing the floor and ceiling signs from the previous proof and considering the resulting numbers as expected values.The proof is complete since the previous deterministic OPT has a profit of at least 2k.◀ Y.-C.Liang, K.-Y.Lai, H.-L. Chen, and K. Iwama 50:No randomized online algorithms for the RkS2L-S problem can achieve a CR of less than 2+R Proof.Let A be any randomized algorithm.The adversary requests ⌊Rk/2⌋ (0,1)'s and ⌈Rk/2⌉ (1,0)'s in stage 1 (⌊Rk/2⌋ + ⌈Rk/2⌉ = Rk by the integrality condition).A accepts kℓ (0,1)'s and kr (1,0)'s.Let α = (1−R)k+3⌊ Rk 2 ⌋ 2+R

Table 1
Overview of known and new results.