Posts Tagged ‘Le Monde’

Now that the new school year has started, Christian Robert has picked up solving the Le Monde mathematical puzzles using R again, which leads me to solving them without R… Last week-end’s puzzle is:

Alice’s PIN number is made of four different non-zero digits. She remembers it by noting that when she sums all two-digit numbers that can be made out of those four digits, and multiplies this sum by 7, she gets her PIN number back.

If the PIN number is written , it is easy to check that the sum computed by Alice is equal to . Thus .

The sum can take values between 10 and 30. Since 231 is divisible by 3, so is . Hence (by the rule used to check for divisibility by 3), is divisible by 3. This makes divisible by 9, and so (by the rule used to check for divisibility by 9) is also divisible by 9.

The only possible values for are 18 and 27. It turns out that the only value which works is 18. Hence the PIN number is (and the sum of those four digits is indeed equal to 18).

Two kids are given three boxes of chocolates with a total of 32 pieces. Rather than sharing evenly, they play the following game: Each in turn, they pick one of the three boxes, empty its contents in a jar and pick some chocolates from one of the remaining boxes so that no box stays empty. The game ends with the current player’s loss when this is no longer possible. What is the optimal strategy?

Although we don’t know the number of chocolates in each box, the kids do. A kid loses when at his turn, he is faced with the configuration (1,1,1): he has to leave one empty, thus losing. Note that the total number of chocolates decreases at each turn.

Because the initial number of chocolates is a power of 2, the first kid (A) is guaranteed to win. Let us look at the parity of the number of chocolates in each box. The strategy of player A is to give to the other kid (B) a configuration of the form (odd, odd, odd). Then B will necessarily return (odd, odd, even) to A. Kid A can empty a box with an odd number of chocolates, split the even number into two odd numbers, and B is faced again with (odd,odd,odd). Eventually, B will end up with (1,1,1) and lose.

Note also that any (odd, even, even) configuration wins: empty one of the even boxes, and split the other even number into two odd numbers.

The only remaining question is what to do with a configuration (even, even, even). Per the above, the first player to introduce a box with an odd number of chocolates loses. Kid A’s strategy is now to give B a configuration of the form (4a+2, 4b+2, 4c+2). To avoid odd numbers, B must give A a configuration of the form (4a+2, 4d+2, 4e), where the number of chocolates in box 3 is a multiple of 4. Kid A can then empty one of the first two boxes, giving B (4a+2, 4f+2, 4g+2) again, and so on until B is faced with (2, 2, 2), at which point he has lost.

This can be easily generalized: let a configuration be of the form , with n as large as possible (so at least one of a, b, c is odd). If a, b and c are all odd, the configuration loses; otherwise, it can be transformed into a configuration where a, b and c are all odd, and the other player loses.

Because the initial total number of chocolates is a power of 2, the initial configuration is necessarily a winning configuration.

It seems that solving mathematical puzzles from Le Monde is becoming the main focus of this blog. This week’s problem is about a road with 100 trees: 50 elms and 50 plane trees, in a random order. We are asked to show that whatever the order of the trees, there exists a sequence of 50 consecutive trees with exactly 25 elms and 25 plane trees.

Let be the number of elms between positions and ; we are asked to prove that there exists a such that . Note that , since that includes all the trees exactly once. By symmetry, we can assume that and . Note also that the sets considered for and differ by only one tree, hence . Looking at the sequence we need to go from an integer below to an integer above by taking steps of size or . At some point, we will necessarily go through .

The exact same proof holds with only 98 trees (49 of each species). However, going down to 96 trees (48 of each), the following arrangement has no set of 50 consecutive trees with half of each: 24 elms, then 48 plane trees, then 24 elms.

The scene is set in 2010. Young , an integer looking for his soul-mate, consults a fortune-teller, who says: “Yes, you shall encounter the beloved number [call it ], a number strictly greater than you, but later! That year [call it ], you will be the only [my emphasis] two positive integers whose sum is equal to the year, and whose product is a multiple of the year.” When (at the earliest) will meet his soul -mate?

This is the kind of question which could be asked at the FFJM semi-finals in a couple of weeks (which my schedule doesn’t allow me to attend, unfortunately). The word only is key. (Christian solves the problem without that word.)

We have, for some integer ,

and we want to minimize .

Write , with and integers and as large as possible. Then it is clear that both and are multiples of . Write and . Suppose that we have a solution to the problem, with ; then the couple would give another solution. Hence , and , so .

The problem is now to find the smallest such that no perfect square divides (otherwise would not be as large as possible). and don’t work, so we move to , which does work.

The solution is then that in year , young will meet and they will live happily ever after.

Christian Robert is disappointed by last week-end’s Le Monde’s mathematical problem :

Take the integers 1 to 10. Group them together; the product of these numbers is 3,628,800. This is the first term of your sum. Now group these numbers in 9s. There are 10 different ways of doing this. For each group, take the product of the 9 numbers and substract the results of each of these 10 products from your sum. Repeat the process by grouping the numbers in 8s (add the product), in 7s (substract them), …, in pairs (add them) and in singletons (substract them). What is the final total? What happens if, instead of 1 to 10, you apply the same (even more interminable) procedure to the first 49 squares (1, 4, 9, 16, … 2401)?

Christian solves this the brutal way, which gives the answer but isn’t very satisfying. Here are a couple of alternative ways of getting the product (call it ).

1. Consider the following 11×11 matrix:

The determinant is obviously 0 (the first and last row are identical). On the other hand, using the Leibniz formula to calculate the determinant would yield all the terms in the product calculated above, plus one term given by the bottom-leftmost 1 and the 1s on the diagonal above the main diagonal. Hence .

2. This solution is more obvious, and I expect Le Monde will give a solution similar to this. Let be the product given when using the numbers 1 to . Then

whence .

3. I was hoping to find a counting argument to solve this problem, because the alternating signs reminded me of the formula for the cardinal of a union of sets. Here’s the best I have come up with, but I’m sure there’s a better way of seeing this.

Consider the set of all sequences of 10 integers where the th entry is an integer between 1 and ; this corresponds to the sequences which lie in the lexicographic order between and . There are clearly such sequences, but let’s count them in a more stupid way, noting that each sequence contains at least one ..

Let be the number of such sequences with the additional constraint that the th entry is equal to . Then, using to denote the cardinal function, we have

Each of these terms corresponds to a term in , with the exception of the last term , which is worth and comes with the sign of .

A very similar reasoning holds if we take numbers other than 1, 2, … 10, as long as the first number is a .