Tuesday, 2 July 2019

ECM BrainBuster August 2019

ECM BrainBuster
It's bonus time again at ACME Software!
In one small group, the six employees receive the following amounts: £3000, £3200, £3600, £3800, £4000, and one fortunate employee £6200.
The group comprises one engineer acting as manager, Team A with two employees and Team B with three.
One team receives a total bonus of exactly twice the amount as the other team.
Which bonuses are awarded to the manager, Team A and Team B? And can you demonstrate if/why your answer is the only possible solution
There are \(\frac{6!}{3!2!}=60\) possible ways of dividing the bonuses up between a team of two and a team of  three and a singleton. So all the solutions could be found by exhaustive search.

But first we observe that if the team of three bonus total is twice that of the team of two then that team's bonus must be greater than \( £18000\), which is not possible. So the team of 2 bonus is twice that of the team of 3.

Suppose the team of two's bonuses include the \(£6200\) then the team of threes bonus must exceed \(£18400\), which is not possible. A similar argument can be applied to show that the team of two's bonuses cannot include the \(£4000\) bonus, as this would imply that the team of threes bonus total would have to be \(£14000\) or more, but this can only be done if their bonuses include both \(£6200\) and \(£4000\). Which leaves 6 possibilities for Team A's bonuses, which are shown in this table:


We can also observe that we cannot make more than \(£12000\) with the sum of three of the bonusues unless we include the \(£6200\) among the three. Then we can by inspection find the only combination of bonuses for Team B that meet the specificationof the problem, shown in this table:



(The middle column is the third column minus \(£6200\), and the only way that Teanm B can satisfy the required conditions is shown in the last three columns.)

So the Managers bonus is \(£4000\), The Team A bonuses are \(£3000,\ £3600\) and Team B bonuses are \(£6200,\ £3800,\ £3200\) .

Gnu-Octave (very)crude exhaustive search code:


more off 
BB=[3000,3200,3600,3800,4000,6200];
rv1=[];rv2=[];
for idx=1:factorial(6)-1
    SumA=BB(1)+BB(2);
    SumB=BB(3)+BB(4)+BB(5);
 
    if SumA*2==SumB
       rv1=[rv1;BB];
    endif
    if SumA==2*SumB
       rv2=[rv2;BB];
    endif
 
    BB=Next(BB); 
endfor
rv1
rv2
Where the function Next() gives the next permutation (in lexicographic order) of the input permutation.

This gives the same result as above (though with every valid permutation)

No comments:

Post a Comment

Note: only a member of this blog may post a comment.