Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A tutor has three jobs this week. They take , and hours. Three clients offer pay rates of , and coins per hour, and each client takes exactly one job, at that client's rate. The tutor can choose which client gets which job.
Same order gives the largest sum of products and opposite order the smallest. Chebyshev, for lists sorted the same way:
Check an answer or open a hint to unlock the worked solution.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Given. Hours ; rates coins per hour.
Plan. Rearrangement: same order for the most, opposite order for the fewest.
Step 1. The most. Longest job at the highest rate: coins.
Step 2. The fewest. Longest job at the lowest rate: coins.
Step 3. Why no other matching wins. In any other matching some pair is out of order. Swapping it changes the total by , so the total never falls. Repeated swaps reach the same-order matching, which is therefore the largest.
Answer: coins at most, coins at least.
Log in to join the discussion.
Loading…