In this paper, we generalize the Ski-Rental Problem to the Bahncard Problem which is an online problem of practical relevance for all travelers. The Bahncard is a railway pass of the Deutsche Bundesbahn (the German railway company) which entitles its holder to a 50% price reduction on nearly all train tickets. It costs 240DM, and it is valid for 12 months. Similar bus or railway passes can be found in many other countries. For the common traveler, the decision at which time to buy a Bahncard is a typical online problem, because she usually does not know when and where she will travel next. We show that the greedy algorithm applied by most travelers and clerks at ticket offices is not better in the worst case than the trivial algorithm which never buys a Bahncard. We present two optimal deterministic online algorithms, an optimistic one and a pessimistic one. We further give a lower bound for randomized online algorithms and present an algorithm which we conjecture to be optimal; a proof of the conjecture is given for a special case of the problem. It turns out that the optimal competitive ratio only depends on the price reduction factor (50% for the German Bahncard Problem), but does not depend on the price or validity period of a Bahncard. Copyright 2001 Elsevier Science B.V.
[1]
David L. Black,et al.
Competitive algorithms for replication and migration problems
,
1989
.
[2]
Susanne Albers,et al.
New On-Line Algorithms for the Page Replication Problem
,
1994,
J. Algorithms.
[3]
Robert E. Tarjan,et al.
Amortized efficiency of list update and paging rules
,
1985,
CACM.
[4]
Anna R. Karlin,et al.
Competitive randomized algorithms for non-uniform problems
,
1990,
SODA '90.
[5]
Prabhakar Raghavan,et al.
Memory versus randomization in on-line algorithms
,
1994,
IBM J. Res. Dev..
[6]
Robert E. Tarjan,et al.
Data structures and network algorithms
,
1983,
CBMS-NSF regional conference series in applied mathematics.
[7]
Carsten Lund,et al.
On-Line Distributed Data Management
,
1994,
ESA.
[8]
Rudolf Fleischer.
On The Bahncard Problem
,
1998,
COCOON.
[9]
Jeffrey D. Ullman,et al.
Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms
,
1974,
SIAM J. Comput..
[10]
Prabhakar Raghavan,et al.
Memory Versus Randomization in On-line Algorithms (Extended Abstract)
,
1989,
ICALP.
[11]
Amos Fiat,et al.
On Capital Investment
,
1996,
ICALP.