alarm
Ask a question for free
Computer Science
respective

Suppose you are going on a ski trip with friends. Each day, your friends will either Please Countto stay and ski one more day or Please Countto leave, such that you do notknow ahead of time how long you will keep on skiing. The ski shop gives you twooptions: you can either rent skis for 1$/day, or you can buy skis for B$ after whichyou do not need to rent skis anymore. The OPTIMAL algorithm is omniscient andknows exactly how many days N you will ski. If N > 2xB, the OPTIMAL algorithmdecides to buy skis otherwise rent skis every day. Without knowing N ahead oftime, the ONLINE algorithm is to rent skis for 2xB days, then buy skis on the 2xB +1 day. What is the competitive ratio of the ONLINE algorithm?​

answers: 1
Register to add an answer
Answer:

Maybe a friend told you about the rush they get while gliding downhill, or you saw footage of professionals racing down the mountain. Whatever it was that has drawn you to skiing or snowboarding, you’re about to experience winter in a new and exciting way. But before you jump in the car and head for the hills, here’s what you need to do to plan your first time skiing or snowboarding:

Mark me as Brainleast

412
Baker
For answers need to register.