📜 ⬆️ ⬇️

Interesting vacation problem

There was another task at work: to distribute vacations. The boss explained the situation in a friendly way and asked for an opinion. I lost my temper - and I thought: the task of fair distribution of vacations is generally quite complicated, and in many enterprises, in each department, it is solved in its own way. But this is quite a mathematical problem. But how to formalize ...
Required: equity in the distribution of months of vacation. We believe that a fair system is one that takes into account the views of the majority, works objectively, and is able to take into account force majeure situations (well, a person needs to urgently prepare an unexpectedly purchased house for winter).
Since we live in Russia, we are very dependent on the change of seasons. And, as a rule, the most desirable months for holidays are from May to September. Consequently, the maximum competition develops precisely during these months, and the special intensity - for June-August.
True, now many have begun to travel to warm countries, and the previously unattractive November-marts have become quite interesting. In general, to make a table of weights of the months was very difficult. It would be nice to interview people ... But the sample needs a rather voluminous one. Using the example of 11 people at the site, it turned out that not everyone considers July as the best month, and not everyone considers December as the worst month for holidays.
Thinking again, I realized that not only the weight of the month is important, but the number of competing for each particular month. Roughly speaking, this particular year, for example, it so happened that in June, no one is going on vacation. Everyone has plans - to Egypt, to Turkey, to winter for the ski, to the relatives ... But, let's say, for September, a serious struggle broke out. And then a certain person’s rating is already taken into account: for example, last year you chose a completely non-competitive month (you didn’t have to compete with anyone) - your initial points did not change, now you have four of them. And now you are competing with three people who have points from 2 to 3. That is, you win the competition, but you do not get 4 points but 1.
It would be nice to take into account that in November they compete less often than in August, and you also need to withdraw points for a different amount - depending on the weight of the month and depending on the competitors screened out.
Since the kokurents were eliminated, they should also be distributed: one wants to be allowed in May, but only two people compete there, which means that we add one ball to a friend (left the position for three competitors for a position with two competitors). Ugh ... Is there a limit to this range? Something painfully complex construction turned out ...
Your suggestions?

')

Source: https://habr.com/ru/post/27413/


All Articles