**From New Scientist #2290, 12th May 2001** [link]

I’ve asked Mystic Mog to advise me on my choice of lottery numbers. She has a way of assigning a measure of luck to each of the numbers from 01 to 49. She has given each of the digits a “luck factor”, with 0’s being less than 1’s, which is less than 2’s, etc. Then to calculate the luckiness of any of the lottery balls she simply adds together the luck factors of the two digits. For example, she regards 27 as luckier than 31 because the digit 2 has a higher luck factor than the 1 and the 7 has a higher luck factor than the 3.

She also tells me that if you consider all the balls excluding number 25, then precisely half of them are luckier than number 25 and half are less lucky than 25. Knowing all these facts, I can decide for most balls whether they are luckier than 25 or not. There are just three balls that I cannot decide about.

Which three?

[enigma1134]

### Like this:

Like Loading...

*Related*

This Python 3 program runs in 66ms

Solution:The three numbers that cannot be decided are: 07, 16, 33.We can eliminate numbers that are definitely less lucky than 25 (because one of the digits is less than (or equal to) 2 and one of them less than (or equal to) 5). This gives the following list of 22 numbers:

Similarly we get the following list of 14 numbers that are definitely more lucky that 25:

Which leaves us with 12 numbers to decided about:

We know that in total there are 24 numbers that are less lucky that 25 and 24 numbers that are more lucky than 25, so of these “undecided” numbers exactly two of them must be less lucky than 25 (and the remaining 10 are more lucky than 25).

There are certain chains of numbers in this list when compared by luck values:

So we need to decide which pairs of these numbers can consistently be assigned to be less lucky than 25.

So, for example, we cannot have 19 less lucky than 25, as then 06, 07, 08, 09, 16, 17, 18 would also be less lucky that 25, and we are only looking for two numbers to be less lucky. So 19 must be more lucky than 25. We can similarly see that 18, 17, 09, 08, 44, 43, 34 must all be more lucky than 25.

This leaves us with three scenarios where exactly two of our undecided numbers are less lucky than 25:

In each of these cases 06 is less lucky than 25, but we cannot say whether 07, 16, 33 are less lucky or more lucky than 25. For each number it is less lucky than 25 in one of the cases given above, and more lucky in the other two.

This table gives example luck values for the digits 0-9, to satisfy the above scenarios:

The luck values of the digits are given in the white cells.

The luck value of 25 is given in the green cells.

The remaining cells give the luck values of the 12 “undecided” numbers.

Numbers that are less lucky than 25 appear in blue cells.

Numbers that are more lucky than 25 appear in red cells.