logo

Crowdly

A ski rental agency has m pairs of skis, where the height of the ith pair of s...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

A ski rental agency has m pairs of skis, where the height of the ith pair of skis is si.

There are n skiers who wish to rent skis, where the height of the ith skier is hi

Ideally, each skier should obtain a pair of skis whose height matches her/his own height as closely as possible.

We would like to assign skis to skiers so that the sum of the absolute differences of the heights of each skier and her/his skis is minimized.

Assuming that m > n, design a dynamic programming approach for the problem with providing a recurrence relation that allows to compute the optimal value.

You need to justify informally your recurrence relation.

Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.concordia.ca?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!