Jenny is the operator of a large garbage disposal machine. It is a fairly simple machine and constitutes of only three buttons: One button, one button and one button.
Given that initially items are put in the machine, it will only destroy garbage in the three following ways:
- The button, if pressed destroys of the items,leaving of the items, but it only works if the number of items is divisible by
- The button,if pressed destroys of the items,leaving items, but it only works if the number of items is divisible by
- The button always works and destroys only item leaving if pressed.
Since Jenny is a lazy operator she wants to minimize the number of times she presses the buttons? What is the minimum number of times Jenny has to press the buttons in order to completely destroy items?
As explicit examples for items Jenny would have to do button presses (,, ,) to minimize the number of presses as shown below.
For items the optimal solution is presses (, ,) or (,,)