The answer to the first math puzzle will be posted in the comments there in another 24 hours, so get cracking.
Here’s a short puzzle from the theory of computation. You have 5 objects and a balance scale which allows you to compare their weights. How many weight comparisons do you need to sort them from heaviest to lightest? You must both find a procedure and prove that no better procedure exists (the measure is worst-case meaning the most comparisons you need if you are unlucky, rather than the average number of comparisons you need).
Hint: since there are only 10 pairs of objects (ab, ac, ad, ae, bc, bd, be, cd, ce, de) your answer had better be at most 10.
When I interviewed job candidates for mathematician/programmer jobs, I would give them this problem. There was also an extra credit problem: “find the best lower and upper bounds you can for the maximum number of comparisons needed to sort 100 objects”. It was quite impressive how well the extra credit problem distinguished between various levels of mathematical ability or experience (it couldn’t distinguish between ability and experience so well, but either one was good and doing badly meant they had neither). The dumbest non-insane answers were 50 for the lower bound (because everything has to get weighed at some point) and 10,000 for the upper bound (100×100 since 2 numbers specify a comparison), but there were about 4 different levels of progressively smarter answers.
(Added 11/10: see comments for the solution to the first part of the problem)