The minimum number of operations needed to make sure all have the same number of items?

46 Views Asked by At

For every operation, we can choose one of the people and we can do one of the $3$ things :-

We can give $1$ item to every colleague other than chosen one.

We can give $2$ items to every colleague other than chosen one.

We can give $5$ items to every colleague other than chosen one.


There are 15 people having $249$, $666$, $500$, $101$, $227$, $85$, $963$, $681$, $331$, $119$, $448$, $587$, $668$, $398$ and $802$ items respectively.

The minimum number of operations needed to make sure all have the same number of items ?


Any suggestions/hints for such questions ?

3

There are 3 best solutions below

0
On

Hint: Since we don't really care about how many items each person has, but rather the difference between how many any of them have, there is no practical difference between

  • Give $n$ items to everyone except the chosen one

and

  • Take $n$ items away from the chosen one
0
On

Hint.

The following operations are equivalent.

We can take 1 chocolate from a chosen colleague.

We can take 2 chocolate from a chosen colleague.

We can take 5 chocolate from a chosen colleague.

This is because we only care about the relative number of chocolates and not the absolute number. These operations have the same effect on the relative number of chocolates between each colleague.

Can you proceed from here?

0
On

The following thoughts come to mind:

The lowest number is $85$ and the highest number is $963$. The only operations which reduce this difference are ones where you choose $963$ and add something to all the rest. You have to do these operations anyway, to make these two values equal, so equalise these two with the fewest number of operations.

Then you have two values of $963$ and everything else is higher. Choose the highest remaining value (which will be $802$+$963$-$85$) again the only way of bridging the gap is to choose this number.

Keep going until they are all equal.

If you can spot the pattern it will just be arithmetic, and you will see how it relates to the suggestions in the other answers.