Question: Help on this homework problem would be greatly appreciated! It is a bit urgent. Thank you Greedy Algorithms and Exchange Arguments Scenario : You play

Help on this homework problem would be greatly appreciated! It is a bit urgent. Thank you

Greedy Algorithms and Exchange Arguments

Scenario: You play on a local game show where you will complete n different challenges and try to make as much money as possible. The ith challenge takes ti minutes to complete. You start off with winnings of $1000 but will lose one dollar per minute for each challenge that is not yet completed. In other words, if you complete challenge i at time f(i), you lose f(i) dollars in total for that challenge. Your goal is to order the challenges to lose as little as possible. Assume the times ti are short enough so no matter what order you choose, your winnings will always be positive.

a) Suppose t1 = 2, t2 = 5, t3 = 1

What is the optimal ordering? (to minimize money lost)

How much do you lose from your initial $1000 in winnings?

b) One of the orderings below is guaranteed to be optimal. Select the correct one.

Sort Challenges by:

-Randomly

-Increasing ti

-Decreasing ti

c) Prove that the ordering you selected always finds an optimal solution. Use an exchange argument.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!