Abstract
In the number of snacks problem (NSP), which was originally proposed by our team, an on-line player is given the task of deciding how many shares of snacks his noshery should prepare each day. The on-line player must make his decision and then finish the preparation before the customers come to his noshery for the snacks; in other words, he must make decision in an on-line fashion. His goal is to minimize the competitive ratio, defined as ∈σ: CA(σ)/COPT(σ), where σ denotes a sequence of numbers of customers, C OPT(σ) is the cost of satisfying σ by an optimal off-line algorithm, and C A(σ) is the cost of satisfying σ by an on-line algorithm. In this paper we give a competitive algorithm for on-line number of snacks problem P1, the Extreme Numbers Harmonic Algorithm(ENHA), with competitive ratio 1+pċ(M-m)/(M+m), where M and m are two extreme numbers of customers over the total period of the game, and p is a ratio concerning the cost of the two types of situations, and then prove that this competitive ratio is the best one if an on-line player chooses a fixed number of shares of snacks for any sequence of numbers of customers. We also discuss several variants of the NSP and give some results for it. Finally, we propose a conjecture for the on-line NSP.
Similar content being viewed by others
References
Sleator, D.D. and Tarjan, R.E. (1985), Amortized Efficiency of List Update and Paging Rules, Communication of the ACM 28, 202–208.
Karlin, M., Manasse, L.R. and Sleator, D.D. (1988), Competitive Snoopy Caching, Algorithmica 3, 79–119.
Manasse, M.S., McGeoch, L.A. and Sleator, D.D. (1988), Competitive Algorithms for On-line Problems. In Proc. 20th Annual ACM Symp. on Theory of Computing 322–333.
Borodin, A., Linial, N. and Sake, M. (1992), An Optimal On-line Algorithm for Metrical Task Systems. Journal of ACM 39, 745–763.
Manasse, M.S., McGeoch, L.A. and Sleator, D.D. (1990), Competitive Algorithms for Server Problems, Journal of Algorithms 11, 208–230.
Ben-david, S., Borodin, A., Karp, R.M., Tardos, G. and Wigderson, A. (1990), On the Power if Randomization in On-line Algorithms. In Proc. 22nd Annual ACM Symp. on Theory of Computing, 379–386.
Woodall, D.R. (1974), The Bay Restaurant: A Linear Storage Problem. American Mathematical Monthly 81, 240–246.
Kierstead, H.A. and Trotter, W.T. (1981), An Extremal Problem in Recursive Combinatorics, Congressus Numerantium 33, 143–153.
Yao, A.C.C. (1980), New Algorithm for Bin Packing, J. Assoc. Comput. Mach. 27, 207–227.
Albers, S. and Leonardi, S. (1999), Online Algorithms. ACM Computing Surveys.
El-Yaniv, R., Fiat, A., Karp, R. and Turpin, G. (1992), Competitive Analysis of Financial Games. Foundations of Computer Science, 1992. Proceedings 33rd Annual Symposium, pp. 327–333.
Ma, W. M., Xu, Y.F. and Wang, K.L. (2001), On-line k-Truck Problem and its Competitive Algorithm. Journal of Global Optimization 21(1), 15–25.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Ma, W., You, J., Xu, Y. et al. On the On-line Number of Snacks Problem. Journal of Global Optimization 24, 449–462 (2002). https://doi.org/10.1023/A:1021253103047
Issue Date:
DOI: https://doi.org/10.1023/A:1021253103047