Competitive Online Stay-or-Switch Algorithms With Minimum Commitment and Switching Cost

In this paper, we consider an online decision problem, where a decision maker has an option to buy a discount plan for his/her regular expenses. The discount plan costs an immediate upfront charge plus a commitment charge per time slot. Upon expiration, the discount period can be extended if the decision maker continues paying the commitment charge, or be canceled if he or she decides not to pay the commitment charge anymore. We investigate online algorithms for the decision maker to decide when to buy the discount plan and when to cancel it without the knowledge of his/her future expenses, aiming at minimizing the overall cost. The problem is an extension of the classic Bahncard Problem, which is applicable for a wide range of online decision scenarios. We propose a novel deterministic online algorithm which can achieve a closed-form competitive ratio upper bounded by 4. We further propose a randomized online algorithm with a smaller competitive ratio and two variants tailored for average-case inputs and time-varying parameters, respectively. Lastly, we evaluate our algorithms against state-of-the-art online benchmark algorithms in two real-world scenarios.