Presentation is loading. Please wait.

Presentation is loading. Please wait.

Rent, Lease or Buy: Randomized Algorithms for Multislope Ski Rental

Similar presentations


Presentation on theme: "Rent, Lease or Buy: Randomized Algorithms for Multislope Ski Rental"— Presentation transcript:

1 Rent, Lease or Buy: Randomized Algorithms for Multislope Ski Rental
Zvi Lotker Ben-Gurion University Boaz Patt-Shamir Dror Rawitz Tel Aviv University

2 Rent or Buy Dilemma the sleeping Baby Problem:
You finally managed to put baby to sleep Baby will wake up at some unknown time Should parent stay awake or go to sleep? – Going to sleep incurs some fixed effort – Staying awake incurs an effort per time unit

3 Rent or Buy Dilemma Question: Competitive Analysis:
How do we measure the quality of our solution Competitive Analysis: Worst case analysis: Baby will try to make parent’s life hard Compare our solution to best possible solution

4 Rent or Buy Classical Ski Rental: – Vacation at ski resort
– End of vacation is unknown – Cost of skis is €B, rent is €1/day – Should we rent or buy the skis? – When should we buy? Optimal offline cost:

5 Optimal Online Strategies:
2-competitive deterministic strategy [Karlin et al. 88] -competitive randomized strategy [Karlin et al. 94] What if the second option is not const?

6 General two slope 1+(1-r)-competitive deterministic strategy
Assume that we can chose: To rent or to buy hose But even when we by the hose we need to pay the property tax 1+(1-r)-competitive deterministic strategy -competitive randomized strategy

7 Deterministic strategy
If the end of the game is at t<1 Opt cost t If the end of the game is at t>1 Opt cost r·t+(1-r) Assume the game end at the time online move to the second option In this case online cost is t+1-r So the competitive is

8 Ski rental with two general options
rate due to investment in buying slope 2 third term is due to being at slope 2 Let pi(t) be the probability that the algorithm is using slope i=1,2 The expected rate in which the algorithm spends money is

9 How we find c At time t>1,optimal strategy spends money at rate a
Assume that the online stop buying

10 Interpretation of the algorithm
We pick an random time according to P2 If this number is bigger than 1 we do not move to the second option If this number is less then 1 we buy the second option at that time. Example assume that r=0.3, c=

11 Optimality of the algorithm
We use Yao’s Lemma We assume that the game end at time t with the prob The optimal expected cost is

12 Optimality of the algorithm
Assume that Ax is a deterministic algorithm that end x them the expected cost of Ax is 1, for 0<x<1 Therefore the competitive is

13 Rent, Lease or Buy Housing costs game: Extended Ski Rental:
Price of house/apartment increases closer to city center Transportation rates decrease closer to city center Extended Ski Rental: Mixed rent and buy options Pure buy or pure rent may not exist

14 Multislope Ski Rental Problem Definition: End time is unknown
Several states/slopes Slope i: bi+ri·t bi+1>bi for all i ri+1<ri for all i End time is unknown Which slope should we buy? When?

15 Multislope Ski Rental Online Buying Costs:
Say we are in slope i, how much do we pay for slope j Additive Model: bj−bi Non-Additive Model: bij “From scratch”: bj

16 Offline Strategy Competitive Analysis:
The online strategy is compared to the offline strategy Offline Strategy: Buy a slope at time 0 according to end time

17 Previous Results & Applications
Online Capital Investments: Deterministic 6.83-competitive strategy (slopes may arrive over time) [Azar et al. 99] Deterministic lower bound Randomized 2.88-competitive strategy [Damaschke 03] Rerouting in ATM networks: 4-competitive strategy (slopes may be concave) [BCN 00]

18 Previous Results & Energy Saving
Slopes are hibernation modes Deterministic 2-competitive strategy for additive model [IGS 02] Algorithm that computes best deterministic strategy for non-additive model [AIS 04]

19 Our Results Additive Model: Main Result:
Randomized e/(e−1) competitive strategy (e−rk/r0)/(e−1) when rk >0 Decomposition into k classical ski rental instances Strategy is combination of k strategies Main Result: Algorithm that computes best randomized strategy

20 Profiles Costs Expected rent at time t:
Expected total rental cost at time t: Expected buying cost at time t: Total: Expected cost at time t:

21 This can by approximate by lp
diff. equations This can by approximate by lp The problem we want to solve is

22 So we ran lp aproximation
And this is what we got

23 Strategies & Profiles Randomized Startegy: Randomized Profile: Plan:
Additive model: we go from slope i to slope i + 1 When do we move to the next slope? Probability distribution over deterministic strategies Randomized Profile: pi(t) – probability of being in slope i at time t Σipi(t) = 1 for all t≥0 Plan: Every strategy induces a profile Find best profile Construct strategy

24 Optimal Profiles Chain of Transformations: Optimal profile
Continuous optimal profile Continuous in t Prudent optimal profile Only one or two consecutive active slopes Tight optimal profile Moves to the next slope as soon as possible

25 Prudent Profiles Continuous to Prudent:
for all t two consecutive slopes are determined Buying cost is preserved ⇛ Rent may only decrease ⇛ Continuity is preserved

26 Prudent to Tight Tight: Buy next slope as soon as possible
⇛ Rent may only decrease Theorem: There exists a tight optimal profile

27 Computing Tight Profile
Computing tight profile for a given c: Solve diff. equations: For tight profiles: We assume that we know c and then we solve all those diff. equations If we solve all of them before time 1 we can make c small If not we have to make c bigger

28 Algorithm Computing a Strategy: Let p be a tight profile X~U(0, 1)
Move from slope i to slope i + 1 when Theorem: Randomized (c + ε)-competitive strategy can be found in O(k log 1/ε), where c is the best possible ratio

29 3-Slope Examples:

30 An 1.581 Competitive Algorithm
Assume rk=0 Let b’0=0; r’i0=ri-1-ri; b’i1=bi-bi-1; r’i1=0 Let Opti(t) be the offline alg for ski prob {(b0i, r0i), (b1i, r1i)} Lemma Opt(t)=Σ Opti(t) Proof:

31 An 1.581 Competitive Algorithm
We solve each problem separate Let P0i(t), P1i(t) be the solution. We define the profile for the multislope: Pi(t)= P1i(t)- P1i+1(t) for i=1,…,k-1 P0(t)= P01(t), Pk(t)= P1k(t)

32 An 1.581 Competitive Algorithm
We solve each problem separate Let P0i(t), P1i(t) be the solution. Lemma P1i-1(t)≥P1i(t) Proof P1i(t)=Exp[b1i/r0i] now b1i/r0i>b1i-1/r0i-1 It is clear that the sum of all prob is 1.

33 An 1.581 Competitive Algorithm
Given P one can obtain an online strategy whose profile is P. let U~U[0,1] we move from state i to state i + 1 when U=P1i(t) for every state i

34 An 1.581 Competitive Algorithm
Theorem The competitive ratio of P is: e/(e−1) Proof: expected cost to the combined strategy is the sum of the costs to the two-slope strategies buying cost is ΣBPi(t) Ranting cost is ΣrPi(t) By the fact that each of the strategies is e/(e-1) competitive the lemma follows.

35 Open Problems: Compute best randomized strategy for non-additive model
What is the get LP for homogeneous differential equation.

36 C:\Users\user\Documents\Zvi\old\2007\sky k


Download ppt "Rent, Lease or Buy: Randomized Algorithms for Multislope Ski Rental"

Similar presentations


Ads by Google