Question: Exercise (Assigning Skis) Your task is to optimally distribute n skies of lengths L[1..n] to n recipients with body heights H[1n]. Assuming, as a rule

Exercise (Assigning Skis) Your task is to optimally distribute n skies of lengths L[1..n] to n recipients with body heights H[1n]. Assuming, as a rule of thumb, that the optimal ski length should be close to the body height of the skier, your goal is to minimize the total difference in lengths. In order words, compute the minimal value mini=1nL[i]H[(i)], where ranges over all bijections :[n][n]. You may assume that L,H contain positive integers. Your algorithm should run in time O(nlogn). Figure 1: Illustrates an example instance of the scheduling problem in Exercise 3. The input (on the left) consists of processing times P=[2,4,3] and deadlines D=[4,5,6]. The unique optimal schedule (on the right) is (1)=1,(2)=3,(3)=2. Under this schedule, we have managed to schedule two early jobs (namely 1 and 3 ), so the output of the problem is 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
