Friday puzzle: monkeys

It’s Friday on Thursday this week since Friday is a holiday for many people.

Last week’s puzzle was to determine the largest order of McNuggets that McDonalds cannot make up using their portion sizes of 6, 9 and 20. It’s possible in principle that the answer is unbounded, there might always be larger and larger impossible totals (as it obviously would be if the boxes were 5,10 and 20; you can’t make 1001). The numbers are small enough that you can solve it by simply calculating every total number until you have 6 in a row (at which point you know you can do all higher numbers since you just need to add boxes of 6). You’ll find the answer is 43 but that’s not very satisfying.

One thing to note is that McDonalds never needs to deliver more than one box of 9 (since 2 boxes of 9 is 3 boxes of 6) nor two boxes of 20 (since 3 boxes of 20 is 10 boxes of 6). So all possible numbers consist of zero or one box of 9, plus zero, one or two boxes of 20 plus some number N of boxes of 6. So there are 6 cases corresponding to (0,1) boxes of 9 and (0,1,2) boxes of 20.

0 boxes of 9 and 0 boxes of 20: total is 6*N
1,0: total is 6*N + 9 = 6*(N+1) + 3
0,1: total is 6*N + 20 = 6*(N+3) + 2
1,1: total is 6*N + 20 + 9 = 6*(N+4) + 5
0,2: total is 6*N + 40 = 6*(N+6) + 4
1,2: total is 6*N + 9 + 40 = 6*(N+8) + 1

Since all numbers from 0-5 occur as the remainder (the non multiple of 6 part) then high enough numbers are always possible, so the solution is not unbounded. The smallest number each line can deliver is when N=0. So the largest impossible number is achieved for each line at N=-1 (since -1 is the ‘largest number of boxes of 6 that is impossible deliver"). The largest of all these is obviously the last line, and if we set N to -1 we get 43, which is the answer.

Today’s puzzle is another one that requires you to look at factors. There are 1000 doors, all closed, along a very long hallway. In a nearby zoo there are 1000 mathematical monkeys. The first monkey is let out and opens every door. The second monkey is let out and goes along closing every second door: the 2nd, 4th, 6th and so on. The third monkey is let out and goes to every third door, closing the doors that are open and opening the ones that are closed (so the 3rd, 6th, 9th and so on). This goes on until the 1000th monkey is let out who just goes to the 1000th door and closes it (because it was open!). Which doors remain open?

Answer next week

This entry was posted in puzzles. Bookmark the permalink.

Comments are closed.