Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions