Ski rental problem

Ski rental problem

The ski rental problem is the name given to a class of problems in which there is a choice between continuing to pay a repeating cost or paying a one-time cost which eliminates or reduces the repeating cost.

The problem

Many online problems have a sub-problem called the rent/buy problem. We need to decide whether to stay in the current state and pay a certain amount of cost per time unit, or switch to another state and pay some fixed large cost with no further paymentSteven S. Seiden. A guessing game and randomized online algorithms. Annual ACM Symposium on Theory of Computing, 2000. http://portal.acm.org/citation.cfm?id=335385] . Ski rental A. R. Karlin, M. S. Manasse, L. A. McGeoch, and S. Owicki. Competitive randomized algorithms for non-uniform problems. In Proceedings of the First Annual ACM-SIAM Symposium on Discrete Algorithms, San Francisco, CA, 22-24 January 1990, pp. 301-309. Also in Algorithmica, 11(6): 542-571, 1994. http://theory.lcs.mit.edu/classes/6.895/fall03/handouts/papers/karlin.pdf] [Claire Mathieu. Brown University. Lecture note: http://www.cs.brown.edu/people/claire/skirental.pdf] is one classical toy example, where the rent/buy is the entire problem. Its basic version is as follows:

You are going skiing for an unknown number of days (you do not know the exact number due to various reasons, e.g., loss of interest, accidents that break your legs, or extremely bad weather). Assume that renting skis costs $1 per day and buying skis costs $10. Every day you have to decide whether to continue renting skis for one more day or buy a pair of skis. If you know in advance how many days you will go skiing, you can decide your minimum cost. For example, if you will be skiing for more than 10 days it will be cheaper to buy skis, while if you will be skiing for fewer than 10 days it will be cheaper to rent. (If you will ski for exactly 10 days you are indifferent.) The question is what to do when you do not know in advance how many days you will ski.

Formally, the problem can be set up as follows. There is a number of days "d" (unknown to you) that you will ski. We are looking for an algorithm that minimizes the ratio between what you pay usingthe algorithm (that does not know "d") and what you would pay optimally if you knew "d" in advance. The problem is generally analyzed in the worst case, where the algorithm is fixed and then we look at the worst-case performance of the algorithm over all possible "d". In particular, no assumptions are made regarding the distribution of "d" (and it is easy to see that, with knowledge of the distribution of "d", a different analysis as well as different solutions would be preferred).

The break-even algorithm

The break-even algorithm instructs you to rent for 9 days and buy skis on the morning of day 10 if you are still up for skiing A. R. Karlin, M. Manasse, L. Rudolph and D. Sleator. Competitive snoopy caching. Algorithmica, 3(1): 79-119, 1988] . If you have to stop skiing during the first 9 days, it costs the same as what you would pay if you had known the number of days you would go skiing. If you have to stop skiing after day 10, your cost is $19 which is 90% more than what you would pay if you had known the number of days you would go skiing in advance. This is the worst case for the break-even algorithm.

The break-even algorithm is known to be the best deterministic algorithm for this problem.

Can you do better than break-even?

Yes. For example, you can throw a coin. If it comes up head, you buy skis on day 8; otherwise, you buy skis on day 10. This is an instance of a randomized algorithm. It is easy to see that the "expected" cost is at most 80% more than what you would pay if you had known the number of days you would go skiing, "regardless" of how many days you ski. In particular, if you ski for 10 days, then your expected cost is 1/2 [7 +10] + 1/2 [9+10] = 18 dollars, only 80% excess instead of 90%.

The best randomized algorithm against an oblivious adversary is to choose some day i at random according to the following distribution p, rent for i-1 days and buy skis on the morning of day i if you are still up for skiing. Karlin et al first presented this algorithm with distribution p_i = left {egin{array}{ll}(frac{b-1}{b})^{b-i} frac{e}{b(e-1)} & i < b \ 0 & i geq bend{array} ight . ,where buying skis costs $b and renting costs $1. Its expected cost is at most e/(e-1) approx 1.58 times what you would pay if you had known the number of days you would go skiing. No randomized algorithm can do better.

Applications

Snoopy caching A. R. Karlin, M. S. Manasse, L. A. McGeoch, and S. Owicki. Competitive randomized algorithms for non-uniform problems. In Proceedings of the First Annual ACM-SIAM Symposium on DiscreteAlgorithms, San Francisco, CA, 22-24 January 1990, pp. 301-309. Also in Algorithmica, 11(6): 542-571, 1994. http://theory.lcs.mit.edu/classes/6.895/fall03/handouts/papers/karlin.pdf] : several caches share the same memory space that is partitioned into blocks. When a cache writes to a block, caches that share the block spend 1 bus cycle to get updated. These caches can invalidate the block to avoid the cost of updating. But there is a penalty of p bus cycles for invalidating a block from a cache that shortly thereafter needs access to it. We can break the write request sequences for several caches into request sequences for two caches. One cache performs a sequence of write operations to the block. The other cache needs to decide whether to get updated by paying 1 bus cycle per operation or invalidate the block by paying p bus cycles for future read request of itself. The two cache, one block snoopy caching problem is just the ski rental problem.

TCP acknowledgment [D. R. Dooly, S. A. Goldman and S. D. Scott. TCP dynamic acknowledgment delay: theory and practice.In Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing (STOC), Dallas, TX,pp. 389-398, 1998.] : A stream of packets arrive at a destination and are required by the TCP protocol to be acknowledged upon arrival. However, we can use a single acknowledgment packet to simultaneously acknowledge multipleoutstanding packets, thereby reducing the overhead of the acknowledgments. On the other hand, delaying acknowledgments too much can interfere with the TCP's congestion control mechanisms, and thus we should not allow the latency between a packet'sarrival time and the time at which the acknowledgment is sent to increase too much. Karlin et al [Anna R. Karlin and Claire Kenyon and Dana Randall. Dynamic TCP acknowledgement and other stories about e/(e-1). Thirty-Third Annual ACM Symposium on Theory of Computing (STOC), 2001. Algorithmica. http://www.cs.brown.edu/people/claire/Publis/ACKpaper.ps] described a one-parameter family of inputs, called the basis inputs, and showed that when restricted to these basis inputs, the TCP acknowledgement problem behaves the same as the ski rental problem.

Total completion time scheduling :We wish to schedule jobs with fixed processing times on m identical machines. The processing time of job j is pj.Further, each job has a release time rj, before which the job is unknown to the scheduler. The goal is to minimize thesum of completion times over all jobs. A simplified problem is one single machine with the following input: at time 0, a job with processing time 1 arrives; k jobs with processing time 0 arrive at some unknown time. We need to decide the time to start the first job. Waiting incurs cost 1 per time unit, yet starting the first job before the later k jobs may incur an extra cost of k in the worst case. This simplified problem may be viewed as a continuous version of the ski rental problem.

See also

*Adversary
*Competitive analysis
*Online algorithm

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Vacation rental — is a term in the travel industry meaning renting out a furnished apartment or house on a temporary basis to tourists as an alternative to a hotel. Vacation rentals have long been a popular travel option in Europe (especially in the UK) as well as …   Wikipedia

  • Online algorithm — In computer science, an online algorithm is one that can process its input piece by piece in a serial fashion, i.e., in the order that the input is fed to the algorithm, without having the entire input available from the start. In contrast, an… …   Wikipedia

  • Online algorithm — En informatique, un algorithme online (algorithme en ligne) est un algorithme qui reçoit son entrée (son input) prédécoupée en petits morceaux, et qui commence à calculer dès le premier petit morceau reçu, puis continue à traiter, en série, les… …   Wikipédia en Français

  • Sean Cameron — Articleissues cleanup = February 2008 copyedit = February 2008 fansite = February 2008 fiction = February 2008 in universe = September 2007 in universe cat = OR = September 2007 plot = September 2007 trivia = February 2008 unreferenced = February …   Wikipedia

  • Vermont — This article is about the U.S. state of Vermont. For other uses, see Vermont (disambiguation). State of Vermont …   Wikipedia

  • Climate change in Washington — Main article: Climate change in the United States Digitally colored elevation map of Washington. Climate change in the American state of Washington is a subject of study and projection today. Contents …   Wikipedia

  • Laserdisc — Not to be confused with disk laser, a flat configuration solid state laser. Not to be confused with VCD, DVD, or Blu ray, optical disc formats employing digital video encoding. Not to be confused with CED, a coincident but incompatible analogue… …   Wikipedia

  • France — /frans, frahns/; Fr. /frddahonns/, n. 1. Anatole /ann nann tawl /, (Jacques Anatole Thibault), 1844 1924, French novelist and essayist: Nobel prize 1921. 2. a republic in W Europe. 58,470,421; 212,736 sq. mi. (550,985 sq. km). Cap.: Paris. 3.… …   Universalium

  • Jack Kemp — Infobox Officeholder name = Jack Kemp, Jr. imagesize = 200px small caption = order = 1996 Republican Vice Presidential nominee term start =August 16, 1996 term end =November 5, 1996 runningmate = Bob Dole opponent = Bill Clinton/Al Gore… …   Wikipedia

  • Conan the Barbarian (1982 film) — Conan the Barbarian …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”