## Envelopes with Numbers

You are given 2 sealed envelopes with numbers inside. You are told that one of the numbers is twice as much as the other one. You grab one of the envelopes and right before you open it, you make the following calculation:

“If this envelope contains X inside, then the other envelope contains either X/2 or 2X inside. Since the chance that the other envelope contains a larger number is exactly 50%, the expected money I will get after switching is X/4 + X = 1.25X > X. Therefore, I should switch!”

Clearly, this reasoning is wrong, since you can’t possibly deduce which envelope of the two contains a larger number. Where is the mistake?

The trick is that conditionally on the fact that your envelope contains X, it is not true that the other envelope has 50% chance of containing either X/2 or 2X. The reason is that it is impossible that all amounts of dollars appear in the envelopes with the same probabilities (densities). Thus, for example, if it is very unlikely that an envelope contains more than 1000, and you open an envelope with 800 inside, you will not think that the other envelope has 50% chance of containing 1600.

## Trips in Bulmenia

In the country of Bulmenia there are 40 big cities. Each of them is connected with 4 other big cities via paths, and you can get from any city to any other via these paths.

1. Show that you can create a trip passing through every path exactly once that ends in the city it starts from.
2. Show that you can create one or multiple trips, such that every trip passes through different cities, ends in the city it starts from, and also every city is part of exactly one trip.

Remark: The paths can intersect each other, but you cannot switch from one path to another midway.

Source: IMO 2020

1. Let us call a trip that ends in the city it starts from a “loop”. Start from any city and keep traveling without using any path twice. If at some point you can’t continue, stop, creating a loop, and modify your trip as follows. Pick any city you have visited from which there are unused paths going out, and once again start traveling along the unused paths until you can’t continue further. Add the newly formed loop to the original trip and continue this procedure until there are no unused paths left, thus completing a loop passing through every path exactly once. This method works because there is an even number of paths going out from every city and you can get from any city to any other.
2. Use the loop from 1. and color every second path on it in black. Then, notice that there are 2 black paths going out from evey city. Therefore, these black paths create one or multiple disjoint loops passing through every city in Bulmenia exactly once.

## Beautiful Tapestry

A piece of a beautiful tapestry is missing. Can you figure out what its colors are?

The tapestry represents the factorizations of the numbers from 2 to 26.

Each 12×12 square on the tapestry represents a number between 2 and 26, such that all squares representing prime numbers are painted in single colors. The colors of the squares representing composite numbers are determined by the factors of these numbers.

The number 2 is represented by orange color (top left corner). The number 3 is represented by green color. The number 4 = 2×2 is represented once again by orange (2, 2) color. The number 5 is represented by red color. The number 6 = 2×3 is represented by orange (2) and green (3) colors. The number 7 is represented by blue color. The number 8 = 2×2×2 is represented once again by orange (2, 2, 2) color. The number 9 =3×3 is represented once again by green (3, 3) color. The number 10 = 2×5 is represented by orange (2) and red (5) colors, and so on.

## Does Not Divide Another

How many numbers between 1 and 100 can you pick at most, so that none of them divides another?

You can choose at most 50 numbers: 51, 52, 53, …, 100.

In order to see that you cannot choose more than 50, express each number in the form 2ⁿ×m, where m is an odd number. Since no 2 numbers can have the same m in their expressions, and there are only 50 odd numbers between 1 and 100, the statement of the problem follows.

## Self-Describing Number

Find all 10-digit numbers with the following property:

• the first digit shows the number of 0s in the number
• the second digit shows the number of 1s in the number
• the third digit shows the number of 2s in the number, and so on

Let the number be ABCDEFGHIJ. The number of all digits is 10:

A + B + C + D + E + F + G + H + I + J = 10

Therefore, the sum of all digits is 10. Then:

0×A + 1×B + 2×C + 3×D + 4×E + 5×F + 6×G + 7×H + 8×I + 9×J = 10

We see that F, G, H, I, J < 2. If H = 1, I = 1, or J = 1, then the number contains at least 7 identical digits, clearly 0s. We find A > 6 and E = F = G = 0. It is easy to see that this does not lead to solutions, and then H = I = J = 0.

If G = 1, we get E = F = 0. There is a 6 in the number, so it must be A. We get 6BCD001000, and easily find the solution 6210001000.

If G = 0, F can be 0 or 1. If F = 1, then there must be a 5 in the number, so it must be A. We get 5BCDE10000. We don’t find any solutions.

If F = 0, then the number has at least five 0s, and therefore A > 4. However, since F = G = H = I = J = 0, the number does not have any digits larger than 4, and we get a contradiction.

Thus, the only solution is 6210001000.