Next Article in Journal
Simple Histogram Equalization Technique Improves Performance of VGG Models on Facial Emotion Recognition Datasets
Previous Article in Journal
Hybrid Machine Learning Algorithms to Evaluate Prostate Cancer
Previous Article in Special Issue
EPSOM-Hyb: A General Purpose Estimator of Log-Marginal Likelihoods with Applications in Probabilistic Graphical Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Competitive Analysis of Algorithms for an Online Distribution Problem

by
Alessandro Barba
1,†,
Luca Bertazzi
1,† and
Bruce L. Golden
2,*,†
1
Department of Economics and Management, University of Brescia, 25121 Brescia, Italy
2
Robert H. Smith School of Business, University of Maryland, College Park, MD 20742, USA
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Algorithms 2024, 17(6), 237; https://doi.org/10.3390/a17060237
Submission received: 22 April 2024 / Revised: 25 May 2024 / Accepted: 29 May 2024 / Published: 3 June 2024

Abstract

:
We study an online distribution problem in which a producer has to send a load from an origin to a destination. At each time period before the deadline, they ask for transportation price quotes and have to decide to either accept or not accept the minimum offered price. If this price is not accepted, they have to pay a penalty cost, which may be the cost to ask for new quotes, the penalty cost for a late delivery, or the inventory cost to store the load for a certain duration. The aim is to minimize the sum of the transportation and the penalty costs. This problem has interesting real-world applications, given that transportation quotes can be obtained from professional websites nowadays. We show that the classical online algorithm used to solve the well-known Secretary problem is not able to provide, on average, effective solutions to our problem, given the trade-off between the transportation and the penalty costs. Therefore, we design two classes of online algorithms. The first class is based on a given time of acceptance, while the second is based on a given threshold price. We formally prove the competitive ratio of each algorithm, i.e., the worst-case performance of the online algorithm with respect to the optimal solution of the offline problem, in which all transportation prices are known at the beginning, rather than being revealed over time. The computational results show the algorithms’ performance on average and in the worst-case scenario when the transportation prices are generated on the basis of given probability distributions.

1. Introduction

Online problems are optimization problems in which the instance is revealed in an online manner and the solution is produced online. We study an online distribution problem where transportation prices are revealed over time. The producer has to accept one of these prices in order to send a load to a customer. The decision is taken on the basis of the transportation prices revealed so far. Only the range in which the transportation prices will fall is known, and the unit penalty cost must be paid whenever the offered price is not accepted. The latter cost may be the cost of obtaining a new quote, the penalty for a late delivery, the inventory cost the company has to pay to store the load for a certain time, or a combination of these costs. This penalty cost is constant from one period to the next.
This problem has interesting real-world applications. In the last few years, transportation quotes have been easily obtainable from professional websites. For example, please refer to Shiply (www.shiply.com) or to Freightquote (www.freightquote.com). After providing the data concerning the load (origin, destination, type of products, weight and volume), transportation prices are obtained from transportation companies. At the end of the first time period, a decision must be made: to accept or to reject the minimum offered price without any information on the prices that will be observed in the future. These steps are repeated until a price is accepted. Note that the prices provided by the transportation companies over time do not follow any trend because they mainly depend on the availability of other requests from close enough origins and destinations.
For this problem, we design online algorithms, i.e., algorithms that make irrevocable decisions without full knowledge of the problem instance. The decision makers have full knowledge of the past, but no (or just partial) knowledge of the future. To evaluate their performance, Sleator et al. [1] suggested that these algorithms be compared with optimal offline algorithms. Moreover, Karlin et al. [2] introduced the concept of a competitive ratio. An online algorithm ALG is c-competitive (with c 1 ) if, given any problem instance I, the cost A L G ( I ) of the solution given by the online algorithm ALG is no more than c times the cost O P T ( I ) of an optimal offline algorithm that knows the entire sequence of transportation prices in advance:
A L G ( I ) O P T ( I ) c ,   f o r   a n y   p r o b l e m   i n s t a n c e   I .
The smallest c such that A L G ( I ) c O P T ( I ) is called the competitive ratio of ALG. For the sake of simplicity, in the following, we will omit the reference to I. The availability of the competitive ratio provides a guarantee for the worst-case performance of the online algorithm with respect to the optimal solution of the offline problem, where all information is already available at the beginning, before the first decision is made. The competitive ratio is also interesting from a managerial point of view, because the producer knows that, by using the online algorithm, the total cost they will pay over the time horizon will be at most c times the cost of the offline problem. If several online algorithms are available, the one with the smallest competitive ratio should be used to achieve the best possible worst-case performance guarantee.
We refer to Borodin and El-Yaniv [3] and to Hentenryck and Bent [4] for a comprehensive description of online algorithms and competitive analyses, to Albers [5] for a survey on online algorithms, and to Jaillet and Wagner [6] for a survey of online vehicle routing problems. Recent contributions have been presented by Chen et al. [7] for an online machine minimization problem; Ma et al. [8] for online knapsack problems; Berǵe et al. [9] for the online k-Canadian traveller problem; Li et al. [10,11], Yu and Jacobson [12], Shamsaei et al. [13], and Jiang et al. [14] for online scheduling problems; Akbari et al. [15] for a post-disaster road restoration problem; Zhang et al. [16] for the management of online orders in modern crowdsourced truck logistics platforms; Shiri et al. [17] for ambulance routing in disaster response with partial or no information on victim conditions; Fujii et al. [18] for the Secretary problem with predictions; Arnosti et al. [19] for static threshold policies in the prophet Secretary problem; Salem et al. [20] for Secretary problems with biased evaluations using partial ordinal information; Shiri et al. [21] for the ambulance routing problem on a road network; and Chen et al. [22] for a review of online integrated production and distribution scheduling. Finally, for an extensive overview of the most recent contributions on online algorithms, we refer the work by to Höhne et al. [23,24,25] and Amouzandeh et al. [26]. In particular, the last survey covers papers published in 2023 concerning online algorithms for server problems, matching problems, packing problems, scheduling problems, allocations and auction problems, and other miscellaneous problems.
The distribution problem we study is related to the well-known Secretary problem, the prophet inequality problem (see Ferguson [27] and Correa et al. [28]), and the one-way trading problem (see El-Yaniv et al. [29]). However, to the best of our knowledge, our problem is new. In fact, in the Secretary problem, the number of secretaries who will be interviewed is known in advance, while in our problem, only the maximum number of quotes is known. Moreover, no penalty cost is charged in the Secretary problem. In addition, in the Secretary problem, the objective is slightly different; namely, in the Secretary problem, we seek to maximize the probability of selecting the best option, while in our problem, we minimize the total cost. Finally, the Secretary problem has a simple solution: reject the first k offers and, after that, accept the next better one. Instead, we will computationally show that this solution is significantly worse than those of the online algorithms we propose for the distribution problem. Our problem is also different from the one-way trading problem, as we pay the penalty cost.
The paper is organized as follows. In Section 2, the problem is formally described. In Section 3 and Section 4, the competitive ratio of algorithms with a given time of acceptance and of algorithms with a threshold price, respectively, is provided. In Section 5 and Section 6, a numerical comparison of these competitive ratios and computational results, obtained when transportation prices are randomly generated from given probability distributions, is provided.

2. Problem Description

We consider the problem in which a producer has to ship a load to a customer. The shipment can be performed in any of the discrete time periods t = { 0 , 1 , , H } , where H is the deadline to send this load. In each time period t, each transportation company in a given set offers a price to send this load. Each offered price is not lower than a minimum value p and not greater than a maximum value P, where P is the default price, e.g., the cost the producer has to pay to send the load by using their own vehicles or the transportation price to pay to a carrier with predefined tariffs. The producer has to decide either to accept the minimum price offered at time period t, say P t , or to reject it. In the former case, the shipment is performed at price P t , while in the latter case, a penalty cost h is charged to obtain new quotes, due to a late delivery, to store the load for one time period, or due to a combination of the above. The problem is to determine the price the producer has to accept in order to minimize the sum of transportation and penalty costs.

3. Online Algorithms with a Given Time of Acceptance

In this section, we provide the competitive ratio of online algorithms in which the minimum price P j offered at a given time period j is accepted. Each of these algorithms can be formally described as follows.
Algorithm ALG 1 j : At time period j, accept P j .
If we denote the total cost obtained by applying the algorithm ALG 1 j by A L G 1 j and the optimal cost of the offline problem by O P T , then the following theorem holds.
Theorem 1.
A L G 1 j O P T P + h j p .
Proof of Theorem 1.
Since the producer accepts price P j at time period j, the total cost obtained by applying algorithm A 1 j is A L G 1 j = P j + h j . The optimal offline cost O P T is not lower than p. Therefore, A L G 1 j O P T P j + h j p P + h j p .
We now show that this algorithm cannot have a better competitive ratio. Consider first the following instance: j > 0 , P j = P , P t = p for t j . The total cost generated by the algorithm ALG 1 j is P + h j , while the optimal offline cost is O P T = p (obtained by accepting the price offered at time 0); therefore, in this instance, A L G 1 j O P T = P + h j p . Consider now the following instance: j = 0 , P 0 = P , P t = p for 0 < t H and h < P p . Since the total cost generated by the algorithm is A L G 1 j = P and the optimal cost is O P T = p + h (obtained by accepting the price offered at time 1), then in this instance, A L G 1 j O P T = P p + h P p for h 0 .
Since the worst-case ratio of the algorithms ALG 1 j is increasing in j, the following theorem holds.
Theorem 2.
In the worst case, the best algorithm with a given time of acceptance is ALG 1 0 , with a competitive ratio P p .
This result is very interesting also from a managerial point of view. If ALG 1 0 is used, the maximum percent cost increase with respect to the optimal solution of the offline problem is given by ( P p 1 ) 100 . For example, if P p = 2 , this means that the online algorithm will give a percent cost increase of at most 100% with respect to the cost of the optimal solution of the offline problem.
We now show that there exists a class of instances in which the algorithm ALG 1 0 gives an optimal solution to the online problem. In particular, when the penalty cost h is greater than or equal to the difference between the default price P and the minimum price p, it is always optimal to select the first offered price.
Theorem 3.
A L G 1 0 is optimal in the class of instances with h P p .
Proof of Theorem 3.
The total cost A L G generated by any algorithm ALG either is the cost of accepting P 0 at time 0, that is, A L G 1 0 , or is not lower than the cost of accepting the minimum price p at time 1, that is, p + h . Since in the latter case, A L G p + h P A L G 1 0 , as h P p and A L G 1 0 P , then ALG 1 0 gives an optimal solution. □
We now analyze the worst-case performance of online algorithms in which the minimum price offered from 0 to a given time period j is accepted at time period j. Although these algorithms are not fairly comparable to the previous ones, since the price offered in a period does not expire at the end of the period, the results can serve, in most cases, as an aspirational benchmark. Each of these algorithms can formally be described as follows.
Algorithm ALG 2 j : At time period j, accept the minimum price offered from time period 0 to time period j.
If we denote the total cost obtained by applying the algorithm ALG 2 j by A L G 2 j , then the following theorem holds.
Theorem 4.
A L G 2 j O P T max { P p , p + h j p } .
Proof of Theorem 4.
Since the producer accepts the minimum price offered from 0 to j at time period j, the total cost obtained by applying algorithm ALG 2 j is P j * + h j , where P j * = min 0 t j P t . Let us distinguish the following two cases.
Case 1: P t P j * , t > j
In this case, the optimal offline cost O P T is not lower than P j * . Therefore, A L G 2 j O P T P j * + h j P j * p + h j p , since P j * + h j P j * is a decreasing function in P j * and P j * p .
Case 2: P i < P j * for some i > j
In this case, the optimal offline cost O P T is not lower than the minimum between P j * and p + h j . Therefore, A L G 2 j O P T max { P j * + h j P j * , P j * + h j p + h j } max { p + h j p , P j * p } max { p + h j p , P p } .
We now show that this algorithm cannot have a better competitive ratio. Consider the following instance for Case 1: P t = p , t . The total cost generated by algorithm ALG 2 j is p + h j , while the optimal offline cost is O P T = p (obtained by accepting the price offered at time 0). Therefore, in this instance, A L G 2 j O P T = p + h j p . Consider now the following two instances for Case 2: P t = p + ϵ for 0 t j , where ϵ < h , and P t = p , t > j . The total cost generated by algorithm ALG 2 j is p + ϵ + h j , while the optimal offline cost is O P T = p + ϵ (obtained by accepting the price offered at time 0, since ϵ < h ). Therefore, in this instance, A L G 2 j O P T = p + ϵ + h j p + ϵ p + h j p for ϵ 0 . The second instance is the following: P t = P , t j , P t = p , t > j , and h < P p j + 1 . The total cost generated by algorithm ALG 2 j is P + h j , while the optimal offline cost is O P T = p + h ( j + 1 ) (obtained by accepting the price offered at time j + 1 , as h < P p j + 1 ); therefore, in this instance, A L G 2 j O P T = P + h j p + h ( j + 1 ) P p for h 0 .
Since the competitive ratio of algorithm ALG 1 j is P + h j p , while it is max { P p , p + h j p } for ALG 2 j , the two algorithms have the same worst-case performance for j = 0 , while the following theorem holds for j > 0 .
Theorem 5.
In the worst case, ALG 2 j dominates ALG 1 j when j > 0 .

4. Online Algorithms with a Given Threshold Price

In this section, we analyze the class of algorithms in which the first price less than or equal to a given threshold p ¯ ( p p ¯ P ) is accepted. This type of online algorithm is very useful from a practical point of view, given that it is simple to use. Moreover, we will now prove that it has a better worst-case performance with respect to the algorithms with a given time of acceptance. We first consider the case in which, at time period H, the price P H is accepted if every prior price has been rejected (algorithm ALG 3 p ¯ ); then, we consider the case in which the minimum price offered from 0 to H is accepted at time period H if every prior price has been rejected (algorithms ALG 4 p ¯ ).
Each of the algorithms ALG 3 p ¯ can be formally described as follows.
Algorithm ALG 3 p ¯ :  Accept the first price that is no greater than p ¯ . At time period H, accept P H if every prior price has been rejected.
If we denote the total cost obtained by applying the algorithm ALG 3 p ¯ by A L G 3 p ¯ , then the following theorem holds.
Theorem 6.
A L G 3 p ¯ O P T max { p ¯ p , P + h H p ¯ } .
Proof of Theorem 6.
Consider first the case in which there exists a time period s between 0 and H 1 such that P s p ¯ . The cost A L G 3 p ¯ generated by algorithm ALG 3 p ¯ is P s + h s . The optimal offline cost O P T is no lower than the minimum between p ¯ and p + h s , as P t is greater than p ¯ for t < s and it is greater or equal than p starting from time period s. Therefore, A L G 3 p ¯ O P T max { P s + h s p ¯ , P s + h s p + h s } max { P + h H p ¯ , p ¯ + h s p + h s } max { P + h H p ¯ , p ¯ p } .
Consider now the case in which the producer accepts P H . The cost generated by the algorithm ALG 3 p ¯ is no greater than P + h H , while the optimal cost O P T is no lower than p ¯ , as P t was greater than p ¯ for each 0 t < H . Therefore, in this case, A L G 3 p ¯ O P T P + h H p ¯ . Hence, A L G 3 p ¯ O P T max { p ¯ p , P + h H p ¯ } .
We now show that this algorithm cannot have a better competitive ratio. Consider first the following instance: P t = P for all 0 t < s , P s = p ¯ , P t = p for all t > s and h such that p ¯ + h s > p + h ( s + 1 ) , i.e., h < p ¯ p , and h < P p s + 1 . The cost generated by algorithm ALG 3 p ¯ is p ¯ + h s , while the optimal offline cost is O P T = p + h ( s + 1 ) . Therefore, in this instance, A L G 3 p ¯ O P T = p ¯ + h s p + h ( s + 1 ) p ¯ p for h 0 . Consider now the following instance: P t = p ¯ + ϵ , where ϵ < < 1 , for all 0 t < H 1 and P H = P . The cost generated by algorithm ALG 3 p ¯ is P + h H , while the optimal offline cost is obtained by accepting p ¯ + ϵ at time 0, that is, O P T = p ¯ + ϵ . Therefore, in this instance, A L G 3 p ¯ O P T = P + h H p ¯ + ϵ P + h H p ¯ for ϵ 0 .
Let us now compute the optimal threshold p ¯ 3 * in the worst case.
Theorem 7.
In the worst case, if p p ( P + h H ) P , then the optimal threshold is p ¯ 3 * = p ( P + h H ) .
Proof of Theorem 7.
Consider the competitive ratio max { p ¯ p , P + h H p ¯ } . Since the first component is increasing in p ¯ and the second is decreasing in p ¯ , the threshold that minimizes the competitive ratio satisfies p ¯ p = P + h H p ¯ . Therefore, since p ¯ 3 * is non-negative, then p ¯ 3 * = p ( P + h H ) . □
Note that if p ( P + h H ) < p or if p ( P + h H ) > P , then p ¯ 3 * = P is the optimal threshold, implying that P 0 is accepted at time 0. In fact, in the second case, the competitive ratio is a decreasing function in p ¯ in the interval [ p , P ] , while in the first case, the competitive ratio is an increasing function in p ¯ . However, setting p ¯ 3 * = p implies accepting price P H at time period H in the worst case. This is dominated by accepting P 0 at time period 0.
Theorem 8.
If p p ( P + h H ) P , then A L G 3 p ¯ 3 * O P T P + h H p . Otherwise, A L G 3 p ¯ 3 * O P T P p .
Consider now the case in which the minimum price offered from 0 to H is accepted at time period H if every prior price has been rejected (algorithm ALG 4 p ¯ ). Although these algorithms are not fairly comparable to the previous one, since the price offered in a period does not expire at the end of the period, the result can serve, in most cases, as an aspirational benchmark. Each of these algorithms can be described as follows.
Algorithm ALG 4 p ¯ :  Accept the first price that is no greater than p ¯ . At time period H, accept the minimum price offered from 0 to H if every prior price has been rejected.
Let us denote the total cost generated by applying Algorithm ALG 4 p ¯ by A L G 4 p ¯ .
Theorem 9.
A L G 4 p ¯ O P T max { p ¯ p , p ¯ + h H p ¯ } .
Proof of Theorem 9.
Consider first the case in which there exists a time period s between 0 and H 1 such that P s p ¯ . The cost A L G 4 p ¯ generated by algorithm ALG 4 p ¯ is P s + h s . The optimal offline cost O P T is no lower than the minimum between p ¯ and p + h s . Therefore, A L G 4 p ¯ O P T max { P s + h s p ¯ , P s + h s p + h s } max { p ¯ + h H p ¯ , p ¯ + h s p + h s } max { p ¯ + h H p ¯ , p ¯ p } .
Consider now the case in which at time period H the producer accepts the minimum price P * offered between 0 and H. The cost generated by algorithm ALG 4 p ¯ is P * + h H , while the optimal offline cost O P T is no lower than P * , as P t was greater than P * for each 0 t < H . Therefore, in this case, A L G 4 p ¯ O P T P * + h H P * < p ¯ + h H p ¯ , since P * > p ¯ and P * + h H P * are decreasing functions in P * . Therefore, A L G 4 p ¯ O P T max { p ¯ p , p ¯ + h H p ¯ } .
We now show that this algorithm cannot have a better competitive ratio. Consider first the following instance: P t = P for all 0 t < s , P s = p ¯ , P t = p for all t > s and h such that p ¯ > p + h ( s + 1 ) , i.e., h < p ¯ p s + 1 . The cost generated by algorithm ALG 4 p ¯ is A L G 4 p ¯ = p ¯ + h s , while the optimal offline cost is O P T = p + h ( s + 1 ) . Therefore, in this instance, A L G 4 p ¯ O P T = p ¯ + h s p + h ( s + 1 ) p ¯ p for h 0 . Consider now the following instance: P t = p ¯ + ϵ , where ϵ < < 1 , for all 0 t < H 1 and P H = P . The cost generated by algorithm ALG 4 p ¯ is A L G 4 p ¯ = p ¯ + ϵ + h H , while the optimal offline cost is obtained by accepting p ¯ + ϵ at time 0, that is, O P T = p ¯ + ϵ . Therefore, in this instance, A L G 4 p ¯ O P T = p ¯ + ϵ + h H p ¯ + ϵ p ¯ + h H p ¯ for ϵ 0 .
Since the competitive ratio of algorithm ALG 3 p ¯ is max { p ¯ p , P + h H p ¯ } , while it is max { p ¯ p , p ¯ + h H p ¯ } for ALG 4 p ¯ , the following theorem holds.
Theorem 10.
In the worst case, ALG 4 p ¯ dominates ALG 3 p ¯ .
Let us now compute the optimal threshold p ¯ 4 * in the worst case.
Theorem 11.
In the worst case, if p + p ( p + 4 h H ) 2 P , then the optimal threshold is p ¯ 4 * = p + p ( p + 4 h H ) 2 .
Proof of Theorem 11.
Consider the competitive ratio max { p ¯ p , p ¯ + h H p ¯ } . Since the first component is increasing in p ¯ and the second is decreasing in p ¯ , the threshold that minimizes the competitive ratio satisfies p ¯ p = p ¯ + h H p ¯ . Therefore, since p ¯ 4 * is non-negative, then p ¯ 4 * = p + p ( p + 4 h H ) 2 . □
Note that p + p ( p + 4 h H ) 2 p . If p + p ( p + 4 h H ) 2 > P , then p ¯ 4 * = P is the optimal threshold, implying that P 0 is accepted at time 0. In fact, in this case, the competitive ratio is a decreasing function in p ¯ in the interval [ p , P ] .
Theorem 12.
If p + p ( p + 4 h H ) 2 P , then A L G 4 p ¯ 4 * O P T p + p ( p + 4 h H ) 2 p . Otherwise, A L G 4 p ¯ 4 * O P T P p .

5. Comparison of the Competitive Ratios

In this section, we provide a numerical comparison of the competitive ratios when p = 100 , P = 200 , H = 5 , 15 and h = 0.01 , 0.1 , 1 , 10 , 100 . The results are shown in Table 1. We just consider ALG 1 0 , ALG 3 p ¯ 3 * and ALG 4 p ¯ 4 * because all other algorithms are dominated in the worst case. In particular, we do not show the performance ratios of ALG 2 0 , as it has the same worst-case performance of ALG 1 0 , as stated in Section 3. Instead, we show the performance ratios of ALG 4 p ¯ 4 * in a separate column, as it provides an aspirational benchmark for the performance of ALG 3 p ¯ 3 * , as stated in Section 4.
Note that all competitive ratios are not decreasing in h and that ALG 1 0 is dominated by ALG 3 p ¯ 3 * , which is dominated, not surprisingly, by ALG 4 p ¯ 4 * , in the worst case. This means that ALG 3 p ¯ 3 * should be used in practice. Moreover, if it is possible to select the minimum price offered from 0 to H at time period H, instead of just the price offered at time period H, ALG 4 p ¯ 4 * is able to provide better competitive ratios when the penalty cost is small enough.

6. Computational Results

In this section, we first show the performance of the online algorithms when the transportation prices are obtained from a professional website. Then, we show the results we obtained in a systematic computational experiment in which the transportation prices are randomly generated in the interval [ p , P ] on the basis of given probability distributions. Our competitive algorithms are compared with the algorithm used to optimally solve the Secretary problem: reject the first k offers and, after that, accept the next better one. This algorithm is called ALG 5 k . For the sake of convenience, we provide a glossary of the algorithms that have been implemented in this article in Table 2.

6.1. A Real-World Instance

We first show the performance of the online algorithms with transportation prices obtained from a professional website to check what happens under real market conditions. We consider a load of 20 pallets, with a weight of 1000 pounds each, sent from New York to Los Angeles. The minimum price p is set to USD 3000, while the default price P is set to USD 6000. The deadline H is set to 8 days. For this load, we obtained the prices shown in Figure 1. Given these prices, we analyze the performance of the online algorithms when the penalty cost h is set equal to USD 0.01, 0.1, 1, 10, 100 to cover different practical situations. In the Secretary problem algorithms, k is set equal to 1 and 3.
The results reported in Table 3 show that ALG 1 0 is significantly dominated by ALG 3 p ¯ 3 * . In fact, the average cost increase for ALG 1 0 is 29.07%, while for ALG 3 p ¯ 3 * , it is only 1.77%. Moreover, ALG 4 p ¯ 4 * is able to outperform ALG 3 p ¯ 3 * in all cases, with the only exception of the case with h = 100 , due to the high penalty cost. On average, the cost increase is 2.12%. The Secretary problem algorithms ALG 5 1 and ALG 5 3 perform worse than ALG 3 p ¯ 3 * , as their cost increase is 4.43% and 2.03%, respectively. Finally, as expected, ALG 5 3 dominates, on average, ALG 5 1 .

6.2. Randomly Generated Instances

We now show the results obtained when the transportation prices are randomly generated in the interval [ p , P ] on the basis of the following probability distributions: uniform, exponential with λ = 0.01 , normal with mean 150 and standard deviation 5, normal with mean 150 and standard deviation 15, triangular with mode 150, and beta with α = β = 2 . We consider the discretized and truncated version of these distributions in the support [ 100 , 200 ] . These probability distributions have been selected to capture different market conditions with low and high volatilities.
We generate 100, 500, and 1000 scenarios to check the convergence of the expected costs of the online algorithms. Since convergence is computationally guaranteed with 1000 scenarios, we only show the results obtained with 1000 scenarios. The values of the parameters p, P, H, and h are defined as in Section 5. Note that H is equal to 5 and 15 time periods and the penalty cost h ranges from 0.01 to 100 to cover very different scenarios in terms of penalty costs and deadlines. This allows us to check the versatility and adaptability of the algorithms. In the Secretary problem algorithms, k is set equal to 1 and 2 when H = 5 and is equal to 1 , 2 , , 5 when H = 15 . For the sake of brevity, we do not show the results obtained for k = 2 , 3 , 4 when H = 15 , as the resulting cost tends to increase with k due to the penalty cost.
The computational results are shown in Table 4, Table 5, Table 6, Table 7, Table 8 and Table 9. Each table is organized as follows: the first column gives the unit penalty cost h. Then, for each probability distribution, five columns show, for each value of the penalty cost, the average results obtained by the corresponding online algorithms ALG 1 0 , ALG 3 p ¯ 3 * , ALG 4 p ¯ 4 * , and ALG 5 k , where k = 1 , 2 when H = 5 and k = 1 , 5 when H = 15 , over 1000 scenarios. Table 4, Table 5 and Table 6 show the average cost, the average ratio of the cost with respect to the cost of the offline problem, and the maximum ratio of the cost with respect to the cost of the offline problem, respectively, when H = 5 . Table 7, Table 8 and Table 9 show the average cost, the average ratio, and the maximum ratio, respectively, when H = 15 .
The computational results show that, for both H = 5 and H = 15 , the average ratios are significantly lower than the corresponding maximum ratios. Moreover, the maximum ratios tend to be very close to the competitive ratios shown in Table 1. ALG 1 0 is significantly dominated by ALG 3 p ¯ 3 * , which is dominated by ALG 4 p ¯ 4 * when the maximum ratios are computed, and tends to be dominated on average. The performance of the latter algorithm is very good. For each probability distribution, the average and maximum ratios decrease, even if not monotonically, with h and they are equal to 1, as expected, for h = 100 (see Theorem 3). The ratios are very different with different probability distributions. In particular, the uniform distribution gives the largest ratios, while the normal distribution with a mean of 150 and a standard deviation of 5 gives the smallest ratios.
We do not show in detail the performance of the algorithms ALG 1 j and ALG 2 j for j > 0 . As expected, the computational results show that the average and the maximum ratios increase with j and that ALG 2 j dominates ALG 1 j (as an example, see Table 10 for the case with H = 5 and Uniform distribution).
Finally, the results show that, for any probability distribution, the algorithm ALG 5 k used to optimally solve the Secretary problem is significantly worse than the algorithms we propose to solve the distribution problem, both for H = 5 and H = 15 . Moreover, the average and maximum ratios of the algorithm ALG 5 k tend to increase when k increases due to the penalty cost. These results highlight the need for designing specific algorithms for the online distribution problem. Finally, we note that the Secretary problem algorithms become more competitive when the penalty cost is low.

7. Conclusions

We studied an online distribution problem in which a producer has to decide either to accept or not accept the transportation price currently offered to send a load to a customer. The aim is to minimize the sum of transportation costs and penalty costs, which are incurred whenever the current price is not accepted. This problem can be viewed as a new variant of the Secretary problem. We demonstrated computationally that the algorithm used to optimally solve the Secretary problem is not effective for this problem due to the different objective functions. Therefore, we designed two specific classes of online algorithms to solve it: algorithms with a given time of acceptance and algorithms with a given threshold price. For each algorithm, we proved its competitive ratio. We showed that the competitive ratios of the algorithms in the second class dominate the ones of the algorithms in the first class. The computational results, for which the transportation prices were either obtained from a professional website or randomly generated from given probability distributions, allowed us to computationally demonstrate the same type of dominance. The probability distributions we used were able to generate scenarios with different levels of volatility in the transportation prices. Moreover, note that our algorithms require short computational times and, therefore, they are scalable to any deadline we may have in real-world online distribution settings. However, in future work, we might experiment with more sophisticated algorithms, including hybrid algorithms that combine the features of some of the algorithms proposed in this paper. We might also modify the algorithm based on the Secretary problem to take into account the size of the penalty, as well as the deadline. In addition, a user-friendly software package could be developed to implement the algorithms we have proposed, making them accessible to professionals who may benefit from their application.

Author Contributions

Conceptualization, A.B., L.B. and B.L.G.; Methodology, A.B., L.B. and B.L.G.; Software, A.B., L.B. and B.L.G.; Formal analysis, A.B., L.B. and B.L.G.; Data curation, A.B., L.B. and B.L.G.; Writing—original draft, A.B., L.B. and B.L.G.; Writing—review & editing, A.B., L.B. and B.L.G.; Supervision, A.B., L.B. and B.L.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Acknowledgments

The authors wish to thank the editor and the two anonymous referees for their valuable comments that allowed us to improve the paper.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Sleator, D.D.; Tarjan, R.E. Amortized efficiency of list update and paging rules. Commun. ACM 1985, 28, 202–208. [Google Scholar] [CrossRef]
  2. Karlin, A.R.; Manasse, M.S.; Rudolph, L.; Sleator, D.D. Competitive snoopy caching. Algorithmica 1988, 3, 79–119. [Google Scholar] [CrossRef]
  3. Borodin, A.; El-Yaniv, R. Online Computation and Competitive Analysis; Cambridge University Press: Cambridge, UK, 2005. [Google Scholar]
  4. Hentenryck, P.V.; Bent, R. Online Stochastic Combinatorial Optimization; The MIT Press: Cambridge, MA, USA, 2009. [Google Scholar]
  5. Albers, S. Online algorithms: A survey. Math. Program. 2003, 97, 3–26. [Google Scholar] [CrossRef]
  6. Jaillet, P.; Wagner, M.R. Online vehicle routing problems: A survey. In The Vehicle Routing Problem: Latest Advances and New Challenges; Springer: Berlin/Heidelberg, Germany, 2008; pp. 221–237. [Google Scholar]
  7. Chen, L.; Megow, N.; Schewior, K. An O(log m)-Competitive Algorithm for Online Machine Minimization. SIAM J. Comput. 2018, 47, 2057–2077. [Google Scholar] [CrossRef]
  8. Ma, W.; Simchi-Levi, D.; Zhao, J. A Competitive Analysis of Online Knapsack Problems with Unit Density. arXiv 2019, arXiv:1907.08735. [Google Scholar] [CrossRef]
  9. Bergé, P.; Desmarchelier, J.; Guo, W.; Lefebvre, A.; Rimmel, A.; Tomasik, J. Multiple Canadians on the road: Minimizing the distance competitive ratio. J. Comb. Optim. 2019, 38, 1086–1100. [Google Scholar] [CrossRef]
  10. Li, W.; Li, S.; Feng, Q. Online batch scheduling with kind release times and incompatible families to minimize makespan. Optim. Lett. 2018, 12, 301–310. [Google Scholar] [CrossRef]
  11. Li, K.; Zhang, H.J.; Cheng, B.Y.; Pardalos, P.M. Uniform parallel machine scheduling problems with fixed machine cost. Optim. Lett. 2018, 12, 73–86. [Google Scholar] [CrossRef]
  12. Yu, G.; Jacobson, S.H. Online c-benevolent job scheduling on multiple machines. Optim. Lett. 2018, 12, 251–263. [Google Scholar] [CrossRef]
  13. Shamsaei, F.; Telha, C.; Van Vyve, M. On the on-line maintenance scheduling problem. Optim. Lett. 2018, 12, 387–397. [Google Scholar] [CrossRef]
  14. Jiang, Y.; Zhou, P.; Cheng, T.; Ji, M. Optimal online algorithms for MapReduce scheduling on two uniform machines. Optim. Lett. 2019, 13, 1663–1676. [Google Scholar] [CrossRef]
  15. Akbari, V.; Shiri, D.; Salman, F.S. An online optimization approach to post-disaster road restoration. Transp. Res. Part Methodol. 2021, 150, 1–25. [Google Scholar] [CrossRef]
  16. Zhang, H.; Luo, K.; Xu, Y.; Xu, Y.; Tong, W. Online crowdsourced truck delivery using historical information. Eur. J. Oper. Res. 2022, 301, 486–501. [Google Scholar] [CrossRef]
  17. Shiri, D.; Akbari, V.; Tozan, H. Online optimisation for ambulance routing in disaster response with partial or no information on victim conditions. Comput. Oper. Res. 2023, 159, 106314. [Google Scholar] [CrossRef]
  18. Fujii, K.; Yoshida, Y. The Secretary Problem with Predictions. Math. Oper. Res. 2023, 49, 653–1302. [Google Scholar] [CrossRef]
  19. Arnosti, N.; Ma, W. Tight guarantees for static threshold policies in the prophet secretary problem. Oper. Res. 2023, 71, 1777–1788. [Google Scholar] [CrossRef]
  20. Salem, J.; Gupta, S. Secretary problems with biased evaluations using partial ordinal information. Manag. Sci. 2023. [Google Scholar] [CrossRef]
  21. Shiri, D.; Akbari, V.; Salman, F.S. Online algorithms for ambulance routing in disaster response with time-varying victim conditions. OR Spectr. 2024, 1–35. [Google Scholar] [CrossRef]
  22. Chen, Z.L. Online Integrated Production and Distribution Scheduling: Review and Extensions. INFORMS J. Comput. 2024. [Google Scholar] [CrossRef]
  23. Höhne, F.; Schmitt, S.; van Stee, R. SIGACT News Online Algorithms Column 35: 2019 in review. ACM SIGACT News 2019, 50, 77–92. [Google Scholar] [CrossRef]
  24. Höhne, F.; Schmitt, S.; van Stee, R. SIGACT News Online Algorithms Column 36: 2020 in review. ACM SIGACT News 2021, 51, 89–107. [Google Scholar] [CrossRef]
  25. Hohne, F.; Schmitt, S.; van Stee, R. SIGACT news online algorithms column 38: 2021 in review. ACM SIGACT News 2022, 52, 80–96. [Google Scholar] [CrossRef]
  26. Amouzandeh, A.; Schmitt, S.; van Stee, R. SIGACT News Online Algorithms Column 41: 2023 in review. ACM SIGACT News 2024, 54, 108–125. [Google Scholar] [CrossRef]
  27. Ferguson, T.S. Who solved the secretary problem? Stat. Sci. 1989, 4, 282–289. [Google Scholar] [CrossRef]
  28. Correa, J.; Foncea, P.; Hoeksma, R.; Oosterwijk, T.; Vredeveld, T. Recent developments in prophet inequalities. ACM SIGecom Exch. 2019, 17, 61–70. [Google Scholar] [CrossRef]
  29. El-Yaniv, R.; Fiat, A.; Karp, R.M.; Turpin, G. Optimal search and one-way trading online algorithms. Algorithmica 2001, 30, 101–139. [Google Scholar] [CrossRef]
Figure 1. Offered transportation prices.
Figure 1. Offered transportation prices.
Algorithms 17 00237 g001
Table 1. Comparison of the competitive ratios.
Table 1. Comparison of the competitive ratios.
h H = 5 H = 15
ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 *
0.0121.41441.000521.41471.0015
0.121.41601.005021.41951.0148
121.43181.047721.46631.1325
1021.58111.366021.87081.8229
100222222
Table 2. Glossary of algorithms.
Table 2. Glossary of algorithms.
ALG 1 0 Best algorithm with a given time of acceptance
ALG 3 p ¯ 3 * Best algorithm with a given threshold price
ALG 4 p ¯ 4 * Best algorithm with a given threshold price when the minimum price offered from 0 to H is accepted at time period H if every prior price has been rejected
ALG 5 k Secretary problem algorithm
Table 3. Performance of the online algorithms on the real-world data.
Table 3. Performance of the online algorithms on the real-world data.
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 3
0.011.31611.02491.00001.05971.0249
0.11.31591.02481.00001.05961.0248
11.31381.02391.00021.05811.0239
101.29391.01491.00241.04421.0149
1001.21381.00001.10331.00001.0132
Av.1.29071.01771.02121.04431.0203
Table 4. Average costs when H = 5 .
Table 4. Average costs when H = 5 .
UniformExponential
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2
0.01150.04122.73113.69133.24133.25141.36119.83109.55127.07127.36
0.1150.04122.85114.13133.45133.57141.36119.90109.98127.28127.68
1150.04124.75118.01135.49136.78141.36121.23113.52129.37130.93
10150.04135.96135.18155.95168.83141.36129.90127.67150.25163.39
100150.04150.04150.04360.52489.41141.36141.36141.36359.14488.02
Av.150.04131.27126.21183.73212.37141.36126.44120.42178.62207.48
Normal(150,5)Normal(150,15)
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2
0.01149.59147.28143.33146.52146.64148.81135.46130.93140.87141.19
0.1149.59147.66143.78146.73146.98148.81135.64131.38141.08141.51
1149.59149.40148.28148.87150.30148.81137.53135.87143.23144.75
10149.59149.53192.59170.19183.51148.81145.93159.52164.76177.13
100149.59149.59149.59383.40515.61148.81148.81148.81380.04500.95
Av.149.59148.69155.52199.14228.61148.81140.67141.30194.00221.11
TriangularBeta
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2
0.01149.30130.25124.00138.91138.52150.55128.54121.71137.37136.54
0.1149.30130.40124.45139.12138.84150.55128.68122.16137.57136.86
1149.30132.05128.89141.21142.08150.55130.83126.57139.64140.10
10149.30143.22148.12162.13174.47150.55141.98144.41160.31172.45
100149.30149.30149.30371.29498.38150.55150.55150.55367.04496.00
Av.149.30137.04134.95190.53218.46150.55136.12133.08188.39216.39
Table 5. Average ratios when H = 5 .
Table 5. Average ratios when H = 5 .
UniformExponential
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2
0.011.32721.08281.00021.17601.17631.29391.09641.00021.16211.1645
0.11.32451.08151.00211.17551.17691.29111.09471.00211.16171.1653
11.29801.07691.01641.17151.18421.26521.08501.01431.15891.1740
101.14371.03551.02691.20851.31591.12791.03821.01971.22181.3339
1001.00001.00001.00002.65383.46331.00001.00001.00002.80843.6750
Av.1.21871.05531.00911.47711.66331.19561.06291.00731.50261.7025
Normal(150,5)Normal(150,15)
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2
0.011.04411.02751.00021.02261.02351.14061.03541.00021.07841.0804
0.11.04261.02861.00181.02261.02431.13871.03501.00201.07831.0811
11.02931.02751.02031.02451.03451.12041.03341.02031.07791.0893
101.00191.00151.29091.14331.23171.03571.01551.10621.15671.2441
1001.00001.00001.00002.59123.46171.00001.00001.00002.65363.4349
Av.1.02361.01701.06261.36091.55511.08711.02391.02571.40901.5860
TriangularBeta
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2
0.011.20991.05211.00021.12551.12161.24381.05821.00021.13361.1258
0.11.20771.05131.00211.12521.12231.24141.05731.00211.13321.1265
11.18631.04641.02051.12311.13021.21881.05621.02041.13061.1342
101.07171.02751.05851.18051.27301.09311.03021.04411.17961.2723
1001.00001.00001.00002.65393.46111.00001.00001.00002.62073.4358
Av.1.13511.03541.01631.44161.62171.15941.04041.01341.43951.6189
Table 6. Maximum ratios when H = 5 .
Table 6. Maximum ratios when H = 5 .
UniformExponential
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2
0.011.98981.40991.00052.00052.00051.99981.40941.00051.93251.9513
0.11.98801.40861.00502.00502.00501.99801.40441.00501.93691.9540
11.97031.39601.04762.05002.05001.98021.40201.04761.98061.9806
101.80911.42501.36502.50002.50001.81821.37501.36502.41752.4175
1001.00001.00001.00007.00007.00001.00001.00001.00006.84006.8400
Av.1.75141.32791.08363.11113.11111.75921.31821.08363.02153.0287
Normal(150,5)Normal(150,15)
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2
0.011.22641.14101.00041.16271.17171.74011.34261.00051.63011.6301
0.11.22461.14201.00381.16421.17421.73431.34031.00481.63431.6343
11.21371.16221.03761.19711.19861.67861.33111.04631.67591.6759
101.13571.11321.36501.52551.52551.44531.24691.36502.09262.0926
1001.00001.00001.00004.88724.88721.00001.00001.00006.25936.2593
Av.1.16011.11171.08131.98741.99141.51971.25221.08332.65842.6584
TriangularBeta
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 2
0.011.81661.35871.00051.78481.78481.83131.39951.00051.85341.8534
0.11.81031.35401.00491.78921.78921.82671.39501.00501.85781.8578
11.75001.33641.04761.83331.83331.78181.36191.04761.90201.9020
101.61481.39291.36232.27452.27451.60171.42201.36502.34312.3431
1001.00001.00001.00006.68636.68631.00001.00001.00006.75496.7549
Av.1.59831.28841.08312.87362.87361.60831.31571.08362.94232.9423
Table 7. Average costs when H = 15 .
Table 7. Average costs when H = 15 .
UniformExponential
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5
0.01149.36120.62105.57128.63123.81141.52119.07103.43121.90118.62
0.1149.36120.75106.72128.94124.72141.52119.15104.49122.21119.53
1149.36124.44113.12132.00133.83141.52121.78110.30125.27128.71
10149.36144.26142.57162.65224.91141.52138.45137.17155.90220.41
100149.36149.36149.36469.101135.71141.52141.52141.52462.171137.42
Av.149.36131.89123.47204.26348.60141.52127.99119.38197.49344.94
Normal(150,5)Normal(150,15)
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5
0.01149.24143.98140.83145.71144.91149.74132.54123.33138.19135.23
0.1149.24144.88142.18146.06145.83149.74132.75124.68138.50136.16
1149.24146.20155.68149.49155.09149.74137.40137.29141.55145.41
10149.24149.24149.24183.81247.71149.74149.60149.45172.11237.90
100149.24149.24149.24526.981173.90149.74149.74149.74477.661162.83
Av.149.24146.71147.44230.41373.49149.74140.41136.90213.60363.50
TriangularBeta
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5
0.01148.99127.63115.44133.62130.91150.55126.18113.37133.01129.59
0.1148.99127.81116.78133.92131.83150.55126.33114.71133.31130.54
1148.99132.33126.64137.01141.09150.55130.58123.70136.27139.98
10148.99148.22147.37167.90233.68150.55149.36148.29165.83234.37
100148.99148.99148.99476.781159.60150.55150.55150.55461.481178.29
Av.148.99136.99131.04209.85359.42150.55136.60130.12205.98362.55
Table 8. Average ratios when H = 15 .
Table 8. Average ratios when H = 15 .
UniformExponential
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5
0.011.41761.14491.00061.22041.17451.37011.15251.00061.17981.1479
0.11.40881.13901.00531.21581.17651.36131.14581.00441.17531.1500
11.34101.11751.01471.18641.20801.29901.11791.01241.15151.1872
101.13941.10071.08831.27311.76801.13101.10741.09741.28041.8092
1001.00001.00001.00003.64908.02631.00001.00001.00003.78958.4663
Av.1.26141.10041.02181.70892.67071.23231.10471.02301.71532.7521
Normal(150,5)Normal(150,15)
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5
0.011.06071.02271.00061.03551.02971.21921.07841.00061.12381.0986
0.11.05591.02441.00561.03321.03161.21241.07421.00611.12011.1003
11.02851.00731.07301.03051.06951.15821.06221.05901.09401.1256
101.00141.00141.00141.24071.66631.03821.03721.03621.20891.6693
1001.00001.00001.00003.60247.89591.00001.00001.00003.39907.8924
Av.1.02931.01121.01611.58852.53861.12561.05041.02041.58912.5772
TriangularBeta
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5
0.011.29531.10921.00071.16091.13661.33311.11621.00071.17671.1460
0.11.28771.10421.00651.15681.13841.32521.11101.00671.17241.1481
11.22741.08981.03991.12881.16581.26261.09441.03391.14271.1783
101.06951.06421.05821.22831.71071.09331.08491.07741.22811.7418
1001.00001.00001.00003.52688.01121.00001.00001.00003.42538.1109
Av.1.17601.07351.02111.64032.63261.20281.08131.02371.62902.6650
Table 9. Maximum ratios when H = 15 .
Table 9. Maximum ratios when H = 15 .
UniformExponential
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5
0.011.99761.40941.00151.97182.00071.99961.40891.00152.00152.0015
0.11.98011.40441.01471.98512.00701.99601.39901.01472.01502.0150
11.94171.43141.13162.11882.11881.96081.43141.13042.15002.1500
101.75221.64041.57273.45543.45541.76361.66361.64553.50003.5000
1001.00001.00001.000016.880016.88001.00001.00001.000017.000017.0000
Av.1.73431.37711.14415.28225.29241.74401.38061.15845.33335.3333
Normal(150,5)Normal(150,15)
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5
0.011.19591.15501.00111.16171.17011.71901.38941.00141.61951.6195
0.11.18501.15571.01151.17151.17931.70971.38371.01381.63181.6318
11.16671.16331.11451.27011.27011.62261.39421.12711.75451.7545
101.09221.09221.09222.29012.29011.46551.46551.46552.98182.9818
1001.00001.00001.000012.595412.59541.00001.00001.000015.254515.2545
Av.1.12791.11321.04393.69783.70101.50341.32661.12164.64854.6485
TriangularBeta
h ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5 ALG 1 0 ALG 3 p ¯ 3 * ALG 4 p ¯ 4 * ALG 5 1 ALG 5 5
0.011.89091.39561.00151.74431.88531.96851.36471.00151.82791.8314
0.11.87931.39211.01461.75711.89181.95291.35651.01471.80931.8426
11.81481.38101.13161.88571.95371.80911.41351.13161.91511.9533
101.53661.52891.46433.17143.17141.64661.57521.57523.18873.1887
1001.00001.00001.000016.445516.44551.00001.00001.000016.402016.4020
Av.1.62431.33951.12245.00085.06961.67541.34201.14465.02865.0436
Table 10. Average and maximum ratios for ALG 1 j and ALG 2 j when H = 5 and a uniform distribution is assumed.
Table 10. Average and maximum ratios for ALG 1 j and ALG 2 j when H = 5 and a uniform distribution is assumed.
ALG 1 0 ALG 1 1 ALG 1 2 ALG 1 3 ALG 1 4 ALG 1 5
Average1.21871.37861.53741.70471.854722.0103
Maximum1.75142.17372.38972.65022.86023.1111
ALG 2 0 ALG 2 1 ALG 2 2 ALG 2 3 ALG 2 4 ALG 2 5
Average1.21871.23451.32321.44401.57211.7065
Maximum1.75141.88651.92022.12672.19022.1111
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Barba, A.; Bertazzi, L.; Golden, B.L. Competitive Analysis of Algorithms for an Online Distribution Problem. Algorithms 2024, 17, 237. https://doi.org/10.3390/a17060237

AMA Style

Barba A, Bertazzi L, Golden BL. Competitive Analysis of Algorithms for an Online Distribution Problem. Algorithms. 2024; 17(6):237. https://doi.org/10.3390/a17060237

Chicago/Turabian Style

Barba, Alessandro, Luca Bertazzi, and Bruce L. Golden. 2024. "Competitive Analysis of Algorithms for an Online Distribution Problem" Algorithms 17, no. 6: 237. https://doi.org/10.3390/a17060237

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop