Skip to content
Swift Weekly

Can You Figure Out Them? These Problems Revolving Around the Digit 11

Earlier today, we presented three challenges centered on the number 11. Below, presented once more complete with their solutions.

1. Funny Formation

Imagine you are the coach of a football team. Your squad wear shirt numbers from 1 to 11, with the goalkeeper wearing number 1. Your task is to divide the remaining field players into three groups: defenders, midfielders, and forwards.

The puzzle is: Can you set up the team so that the sum of the shirt numbers in each group is divisible by 11?

Give one arrangement, or demonstrate it isn’t possible.

Answer

This arrangement is impossible.

The total sum of all numbers from 1 to 11 is 66. So, the combined total for the ten field players is 66 - 1 = 65.

If the sums for the defenders, midfielders, and forwards were all multiples of 11, then their combined sum must also be a multiple of 11. But, we see this is not true, since 65 is not divisible by 11.

2. Pals or Not

As we learn our multiplication tables, the 11-times table feels wonderfully easy.

11 × 1 = 11
11 × 2 = 22
11 × 3 = 33
…
11 × 9 = 99

All these results are palindromes (numbers that read the same forwards and backwards).

If we continue up to 11 × 99, how many more products are palindromic?

Answer

We find nine more.

Consider how multiplying by 11 works. When a two-digit number has digits a and b, the product with 11 is created by writing the first digit, then their sum, then the second digit—provided no regrouping is needed.

For example, 11 × 52 = 572, because the central digit is simply 5 + 2 = 7.

i) Identical Digits (four solutions)

When the digits are identical, as in 11, 22, 33, or 44, then multiplying by 11 yields 121, 242, 363, and 484—all palindromes.

This holds true only as long as the sum in the middle remains under 10, which limits us to these four cases.

ii) “Staircase” Numbers (four solutions)

Look at numbers where the last digit is one larger than the first. Here, the first and last digits of the product are the same, producing palindromes.

  • 11 × 56 = 616
  • 11 × 67 = 737
  • 11 × 78 = 858
  • 11 × 89 = 979

iii) The Final Case (single case)

Go a little higher, the product is a four-digit number. The first digit will be a 1, so the sole chance for a palindrome is when the last digit is also 1. Let's test 91 reveals it works! 11 × 91 = 1001.

3. Big Divide

Less well known as other divisibility rules, there is a straightforward test to check for divisibility by 11.

Consider the digits of a number and add them alternately with plus and minus signs (starting with a plus). Should the total is a multiple of 11 (including 0), then the starting number is a multiple of 11.

As an example, for 132 we calculate +1 - 3 + 2 = 0, so 132 is divisible by 11.

Employing each of the digits 0–9 exactly once, construct the greatest 10-digit number that is divisible by 11.

Solution

The number is 9876524130.

The greatest 10-digit number with the digits 0–9 exactly once is 9876543210.

Using the divisibility test for 11, we compare the sum of digits in odd places with the sum in even positions. For this number:

  • Odd positions: 9, 7, 5, 3, 1 sum to 25.
  • Even positions: 8, 6, 4, 2, 0 total 20.

The difference is 5, which is not a multiple of 11.

Since the sum of all digits 0–9 is 45, the two sums must always add to 45, so their difference cannot be 0. The closest multiple of 11 we can aim for is therefore 11.

To keep the number as high as possible, we try to keep the descending prefix. Suppose the number began 987654…

The digits fixed so far contribute a difference of (9+7+5) - (8+6+4) = 3. The remaining digits 3,2,1,0 would need to contribute 8, but in the best arrangement they can only contribute (3+1) - (2+0) = 2. So no number starting 987654… will succeed.

Next, attempt keeping the prefix 98765…

This start give a difference of (9+7+5) - (8+6) = 7. The other digits 4,3,2,1,0 must contribute exactly 4.

To maximize the difference, put the biggest digits left, 4 and 3, into odd places, and 2,1,0 into even places. This yields (4+3) - (2+1+0) = 4, exactly what we need.

Ordered to keep the number as large as possible, this gives us 9876524130.

A quick check confirms: the sum in odd places is 28, the sum in even places is 17, and 28 - 17 = 11, so the number is truly divisible by 11.

We hope you had fun with these puzzles. Further problems are on the way in the future.

By

Dominic Hernandez

Senior iOS engineer with over a decade of experience, passionate about Swift evolution and developer education.

Swift Weekly

Type to search articles.