Your friend is working as a camp counselor, and he is in charge of organizing activities
for a set of junior-high-school-age campers. One of his plans is the following minitriathalon
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 swim the 20 laps, gets out, and starts biking. As soon as this first
person is out of the pool, a second contestant begins swimming the 20 laps; as soon as
he or she is out and starts biking, a third contestant begins swimming ... and so on.
Each contestant has a projected swimming time (the expected time it will take him or
her to complete the 20 laps), a projected biking time (the expected time it will take
him or her to complete the 10 miles of bicycling), and a projected running time (the
time it will take him or her to complete the 3 miles of running). Your friend wants
to decide on a schedule for the triathalon: an order in which to sequence the starts of
the contestants. Let’s say that the completion time of a schedule is the earliest time at
which all contestants will be finished with all three legs of triathalon, assuming they
each spend exactly their projected swimming, biking, and running times on the three
parts. (Again, note that participants can bike and run simultaneously, but at most
one person can be in the pool at any time.) What’s the best order for sending people
out, if one wants the whole competition to be over as early as possible? More precisely,
give an efficient algorithm that produces a schedule whose completion time is as small
as possible. And proof the correctness of your algorithm.
Your friend is working as a camp counselor, and he is in charge of organizing activitiesfor a set of junior-high-school-age campers. One of his plans is the following minitriathalonexercise: 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, viathe following rule: the contestants must use the pool one at a time. In other words,first one contestant swim the 20 laps, gets out, and starts biking. As soon as this firstperson is out of the pool, a second contestant begins swimming the 20 laps; as soon ashe or she is out and starts biking, a third contestant begins swimming ... and so on.Each contestant has a projected swimming time (the expected time it will take him orher to complete the 20 laps), a projected biking time (the expected time it will takehim or her to complete the 10 miles of bicycling), and a projected running time (thetime it will take him or her to complete the 3 miles of running). Your friend wantsto decide on a schedule for the triathalon: an order in which to sequence the starts ofthe contestants. Let’s say that the completion time of a schedule is the earliest time atwhich all contestants will be finished with all three legs of triathalon, assuming theyeach spend exactly their projected swimming, biking, and running times on the threeparts. (Again, note that participants can bike and run simultaneously, but at mostคนหนึ่งได้ในสระว่ายน้ำตลอดเวลา) เพื่อส่งคนที่ดีที่สุดคืออะไรออก หากต้องการแข่งขันทั้งหมดมีกว่าเร็วที่สุด ได้แม่นยำมากขึ้นทำให้อัลกอริทึมมีประสิทธิภาพที่สร้างตารางเวลาเสร็จสมบูรณ์มีขนาดเล็กเป็นไปได้ และหลักฐานที่ถูกต้องของอัลกอริทึมของคุณ
การแปล กรุณารอสักครู่..
