Abstract
We study a common delivery problem encountered in nowadays online food-ordering platforms: Customers order dishes online, and the restaurant delivers the food after receiving the order. Specifically, we study a problem where k vehicles of capacity c are serving a set of requests ordering food from one restaurant. After a request arrives, it can be served by a vehicle moving from the restaurant to its delivery location. We are interested in serving all requests while minimizing the maximum flow-time, i.e., the maximum time length a customer waits to receive his/her food after submitting the order. The problem also has a close connection with the broadcast scheduling problem with maximum flow time objective. We show that the problem is hard in both offline and online settings even when \(k = 1\) and \(c = \infty \): There is a hardness of approximation of \(\Omega (n)\) for the offline problem, and a lower bound of \(\Omega (n)\) on the competitive ratio of any online algorithm, where n is number of points in the metric. We circumvent the strong negative results in two directions. Our main result is an O(1)-competitive online algorithm for the uncapaciated (i.e, \(c = \infty \)) food delivery problem on tree metrics; we also have a negative result showing that the condition \(c = \infty \) is needed. Then we consider the speed-augmentation model, in which our online algorithm is allowed to use \(\alpha \)-speed vehicles, where \(\alpha \ge 1\) is called the speeding factor. We develop an exponential time \((1+\epsilon )\)-speeding \(O(1/\epsilon )\)-competitive algorithm for any \(\epsilon > 0\). A polynomial time algorithm can be obtained with a speeding factor of \(\alpha _{\textsf{TSP}}+ \epsilon \) or \(\alpha _{\textsf{CVRP}}+ \epsilon \), depending on whether the problem is uncapacitated. Here \(\alpha _{\textsf{TSP}}\) and \(\alpha _{\textsf{CVRP}}\) are the best approximation factors for the traveling salesman (TSP) and capacitated vehicle routing (CVRP) problems respectively. We complement the results with some negative ones.





Similar content being viewed by others
Notes
In FDP, we could define the completion time of a request as the time the vehicle returns to the depot after serving the request. The maximum flow time objective for the two versions differs by an O(1) factor.
Equivalently we could use a metric (V, d) to describe the travel times, but for many of our results it is more convenient to use the graph G with edge lengths.
Notice that the algorithm can easily check if the optimum maximum flow time is 0 or not.
Recall that in the notation \({\textsf{mst}}_e\), we can view requests as vertices by ignoring their arrival times.
By the definition of \(\alpha _{\textsf{TSP}}\) (resp. \(\alpha _{\textsf{CVRP}}\)), we do not know if an \(\alpha _{\textsf{TSP}}\)- (resp. \(\alpha _{\textsf{CVRP}}\)-) approximation for TSP (resp. CVRP) exists or not. So, we need to include an \(\epsilon \) term in the definition of \(\alpha \) in the the second and third cases.
References
Altinkemer, K., Gavish, B.: Technical note - heuristics for delivery problems with constant error guarantees. Transp. Sci. 24, 294–297 (1990)
Haimovich, M., Rinnooy Kan, A.H.: Bounds and heuristics for capacitated routing problems. Math. Oper. Res. 10(4), 527–542 (1985)
Charikar, M., Raghavachari, B.: The finite capacity dial-a-ride problem. In: Proceedings 39th Annual Symposium on Foundations of Computer Science (Cat. No. 98CB36280), pp. 458–467 (1998). IEEE
Gupta, A., Hajiaghayi, M., Nagarajan, V., Ravi, R.: Dial a ride from k-forest. ACM Transact. Algorithms (TALG) 6(2), 1–21 (2010)
Hwang, D., Jaillet, P.: Online scheduling with multi-state machines. Networks 71(3), 209–251 (2018)
Bienkowski, M., Kraska, A., Liu, H.-H.: Traveling repairperson, unrelated machines, and other stories about average completion times. In: International Colloquium on Automata, Languages and Programming (ICALP) (2021)
Feuerstein, E., Stougie, L.: On-line single-server dial-a-ride problems. Theoret. Comput. Sci. 268(1), 91–105 (2001)
Ascheuer, N., Krumke, S.O., Rambau, J.: Online dial-a-ride problems: minimizing the completion time. In: Annual Symposium on Theoretical Aspects of Computer Science, pp. 639–650 (2000). Springer
Krumke, S.O., de Paepe, W.E., Poensgen, D., Lipmann, M., Marchetti-Spaccamela, A., Stougie, L.: On minimizing the maximum flow time in the online dial-a-ride problem. In: International Workshop on Approximation and Online Algorithms, pp. 258–269 (2005). Springer
Krumke, S.O., Laura, L., Lipmann, M., Marchetti-Spaccamela, A., de Paepe, W., Poensgen, D., Stougie, L.: Non-abusiveness helps: An \(o(1)\)-competitive algorithm for minimizing the maximum flow time in the online traveling salesman problem. In: APPROX, pp. 200–214 (2002). Springer
Chekuri, C., Im, S., Moseley, B.: Minimizing maximum response time and delay factor in broadcast scheduling. In: European Symposium on Algorithms, pp. 444–455 (2009). Springer
Chang, J., Erlebach, T., Gailis, R., Khuller, S.: Broadcast scheduling: algorithms and complexity. ACM Transact. Algorithms (TALG) 7(4), 1–14 (2011)
Guo, X., Luo, K., Tang, Z.G., Zhang, Y.: The online food delivery problem on stars. Theoret. Comput. Sci. (2022). https://doi.org/10.1016/j.tcs.2022.06.007
Karlin, A.R., Klein, N., Oveis Gharan, S.: A (slightly) improved approximation algorithm for metric tsp. In: Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, pp. 32–45 (2021)
Blauth, J., Traub, V., Vygen, J.: Improving the approximation ratio for capacitated vehicle routing. In: International Conference on Integer Programming and Combinatorial Optimization, pp. 1–14 (2021). Springer
Das, A., Mathieu, C.: A quasi-polynomial time approximation scheme for euclidean capacitated vehicle routing. In: Proceedings of the Twenty-first Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 390–403 (2010). SIAM
Khachay, M., Dubinin, R.: Ptas for the euclidean capacitated vehicle routing problem in \(r^d\). In: International Conference on Discrete Optimization and Operations Research, pp. 193–205 (2016). Springer
Labbé, M., Laporte, G., Mercure, H.: Capacitated vehicle routing on trees. Oper. Res. 39(4), 616–622 (1991)
Wu, Y., Lu, X.: Capacitated vehicle routing problem on line with unsplittable demands. J. Comb. Optim., 1–11 (2020)
Mathieu, C., Zhou, H.: A ptas for capacitated vehicle routing on trees. arXiv preprint arXiv:2111.03735 (2021)
Cohen-Addad, V., Filtser, A., Klein, P.N., Le, H.: On light spanners, low-treewidth embeddings and efficient traversing in minor-free graphs. In: 2020 IEEE 61st Annual Symposium on Foundations of Computer Science (FOCS), pp. 589–600 (2020). IEEE
Jayaprakash, A., Salavatipour, M.R.: Approximation schemes for capacitated vehicle routing on graphs of bounded treewidth, bounded doubling, or highway dimension. In: Proceedings of the 2022 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 877–893 (2022). SIAM
Gørtz, I.L., Nagarajan, V., Ravi, R.: Minimum makespan multi-vehicle dial-a-ride. In: European Symposium on Algorithms, pp. 540–552 (2009). Springer
Krumke, S.O., De Paepe, W.E., Poensgen, D., Stougie, L.: News from the online traveling repairman. Theoret. Comput. Sci. 295(1–3), 279–294 (2003)
Gørtz, I.L.: Hardness of preemptive finite capacity dial-a-ride. In: Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pp. 200–211 (2006). Springer
Mastrolilli, M.: Scheduling to minimize max flow time: off-line and on-line algorithms. Int. J. Found. Comput. Sci. 15(02), 385–401 (2004)
Bansal, N., Cloostermans, B.: Minimizing maximum flow-time on related machines. Theory Comput. 12(1), 1–14 (2016)
Kellerer, H., Tautenhahn, T., Woeginger, G.J.: Approximability and nonapproximability results for minimizing total flow time on a single machine. In: Miller, G.L. (ed.) Proceedings of the Twenty-Eighth Annual ACM Symposium on the Theory of Computing, Philadelphia, Pennsylvania, USA, May 22-24, 1996, pp. 418–426 (1996). https://doi.org/10.1145/237814.237989. ACM
Batra, J., Garg, N., Kumar, A.: Constant factor approximation algorithm for weighted flow time on a single machine in pseudo-polynomial time. In: 2018 IEEE 59th Annual Symposium on Foundations of Computer Science (FOCS), pp. 778–789 (2018). IEEE Computer Society
Feige, U., Kulkarni, J., Li, S.: A polynomial time constant approximation for minimizing total weighted flow-time. In: Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1585–1595 (2019). SIAM
Rohwedder, L., Wiese, A.: A \((2+\varepsilon )\)-approximation algorithm for preemptive weighted flow time on a single machine. arXiv preprint arXiv:2011.05676 (2020)
Bansal, N., Chan, H.-L.: Weighted flow time does not admit o(1)-competitive algorithms. In: Proceedings of the Twentieth Annual ACM-SIAM Symposium on Discrete Algorithms. SODA’09, pp. 1238–1244. Society for Industrial and Applied Mathematics, USA (2009)
Bartal, Y., Muthukrishnan, S.: Minimizing maximum response time in scheduling broadcasts. In: Proceedings of the Eleventh Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 558–559 (2000)
Kalyanasundaram, B., Pruhs, K., Velauthapillai, M.: Scheduling broadcasts in wireless networks. In: European Symposium on Algorithms, pp. 290–301 (2000). Springer
Bansal, N., Charikar, M., Khanna, S., Naor, J.: Approximating the average response time in broadcast scheduling. In: SODA, vol. 5, pp. 215–221 (2005). Citeseer
Kalyanasundaram, B., Pruhs, K.: Speed is as powerful as clairvoyance. J. ACM (JACM) 47(4), 617–643 (2000)
Phillips, C.A., Stein, C., Torng, E., Wein, J.: Optimal time-critical scheduling via resource augmentation. In: Proceedings of the Twenty-ninth Annual ACM Symposium on Theory of Computing, pp. 140–149 (1997)
Epstein, L., van Stee, R.: Optimal on-line flow time with resource augmentation. Discret. Appl. Math. 154(4), 611–621 (2006)
Bansal, N., Chan, H.-L., Khandekar, R., Pruhs, K., Schieber, B., Stein, C.: Non-preemptive min-sum scheduling with resource augmentation. In: 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS’07), pp. 614–624 (2007). IEEE
Im, S., Li, S., Moseley, B., Torng, E.: A dynamic programming framework for non-preemptive scheduling problems on multiple machines. In: Proceedings of the Twenty-sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1070–1086 (2014). SIAM
Lucarelli, G., Thang, N.K., Srivastav, A., Trystram, D.: Online non-preemptive scheduling in a resource augmentation model based on duality. In: European Symposium on Algorithms (ESA 2016), 57, 1–17 (2016)
Choudhury, A.R., Das, S., Garg, N., Kumar, A.: Rejecting jobs to minimize load and maximum flow-time. In: Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1114–1133 (2014). SIAM
Lucarelli, G., Moseley, B., Thang, N.K., Srivastav, A., Trystram, D.: Online non-preemptive scheduling on unrelated machines with rejections. In: Proceedings of the 30th on Symposium on Parallelism in Algorithms and Architectures, pp. 291–300 (2018)
Lucarelli, G., Moseley, B., Thang, N.K., Srivastav, A., Trystram, D.: Online non-preemptive scheduling to minimize weighted flow-time on unrelated machines. arXiv preprint arXiv:1804.08317 (2018)
Acknowledgements
The extended abstract of this paper has been published in Proceedings of the 33rd International Symposium on Algorithms and Computation (ISAAC 2022). KL Luo is supported by the National Natural Science Foundation of China, Grant No. 72071157. YH Zhang is supported by the National Natural Science Foundation of China, Grant No. 62102251.
Author information
Authors and Affiliations
Corresponding authors
Ethics declarations
Conflict of interest
The authors declare no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Guo, X., Li, S., Luo, K. et al. Minimizing the Maximum Flow Time in the Online Food Delivery Problem. Algorithmica 86, 907–943 (2024). https://doi.org/10.1007/s00453-023-01177-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-023-01177-1