|
|
вернуться в форумWhy 7 in example Can somebody explain why 7 is the result of the given test? What is wrong with the following list of tuples: 1. 1 1 1 2. 1 1 2 3. 1 1 3 4. 1 2 1 5. 1 3 1 6. 2 1 1 7. 3 3 3 In this list of tuples, there is no tuple where all 3 elements have the same salary as before Edited by author 18.04.2011 09:13 Re: Why 7 in example I think you're missing a few, for example: 2 2 2 1 3 2 etc. The robot can't pay with rank1<rank2<rank3 & payment1>payment2>payment3 but he can do it if rank1<rank2<rank3 & payment1<payment2>payment3. Basically, for the 7 3 example you can do all permutations with repetition except for 3 2 1 so its 2 to the power of 3 minus 1. Re: Why 7 in example I can see why 3 2 1 is not allowed (constraint rank1<rank2<rank3 & payment1>payment2>payment3) and that is fine. But why 2^3? You have 3 options for salary for each of 3 robots, I would say it is 3^3 - 1? Re: Why 7 in example Yes, the count of allowed configurations of salaries is 26. So the accountant-robot will rust in 27th month, i.e. in 7th month of the year. That's why the answer is 7. Re: Why 7 in example thanks! Re: Why 7 in example Pardon, it was a typo, I meant 3^3-1. :) |
|
|