subject

Your friend is working as a camp counselor, and is in charge of organizing activities for a set of junior-high-school-age campers. One of the plans is the following mini-triathlon exercise: each contestant must swim 20 laps of a pool, then bike 10 miles, then run 3 miles. The plan is to send the contestants out in a staggered fashion, via the following rule: the contestants must use the pool one at a time. (In other words, first one contestant swims the 20 laps, gets out, and starts biking. As soon as this person is out of the pool, a second contestant begins swimming the 20 laps; as soon as the second person is out and starts biking, a third contestant begins swimming, and so on.)
Each contestant i has a projected swimming time si (the expected time it will take the contestant to complete the 20 laps), a projected biking time bi (the expected time it will take the contestant to complete the 10 kilometers of biking) and a projected running time ri (the time it will take the contestant to complete the 5 kilometers running) with 1 ≤ i ≤ n.

Your friend wants to make a schedule for the triathlon: an order in which to sequence the starts of the contestants. Let us say that the completion time of a schedule is the earliest time at which all contestants will be finished with all three legs of the triathlon, assuming that they each spend exactly their projected swimming, biking, and running times on the three sports components. Notice that contestants can bike and run simultaneously, but at most one person can be in the pool at any time.

Your tasks in this question are as follows:

1. Devise a greedy algorithm for scheduling these n campers in the best order such that the completion time of the schedule is as small as possible.

2. Show the correctness of your proposed algorithm.

3. • Show that the time complexity of your proposed algorithm

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Which is a possible benefit of having a good credit history? having a checking account low interest rate on a car loan high interest rate on a credit card offer bankruptcy
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
Answers: 1
You know the right answer?
Your friend is working as a camp counselor, and is in charge of organizing activities for a set of j...
Questions
question
Mathematics, 11.09.2019 02:30
question
Mathematics, 11.09.2019 02:30
question
Mathematics, 11.09.2019 02:30
Questions on the website: 13722361