Olympiad Maths Prep

Track / Stage 7 / 74 of 300 #1474 of 2000

Problem 1474

National olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.1 Find the answer

Jesse has ten squares, which are labeled 1,2,,101, 2, \dots, 10. In how many ways can he color each square either red, green, yellow, or blue such that for all 1i<j101 \le i < j \le 10, if ii divides jj, then the ii-th and jj-th squares have different colors?

Official solution

To solve this problem, we need to ensure that for all 1i<j101 \le i < j \le 10, if ii divides jj, then the ii-th and jj-th squares have different colors. We will use a step-by-step approach to count the number of valid colorings.

1. Color the 1st square:
- There are 4 possible colors for the 1st square.

2. Color the 7th square:
- The 7th square is not influenced by any other square because 7 is a prime number and does not divide any other number in the set {1,2,,10}\{1, 2, \ldots, 10\}. Thus, there are 3 remaining colors for the 7th square.

3. Color the remaining squares:
- We need to consider the squares that are influenced by the divisibility condition. These squares are 2,3,4,5,6,8,9,102, 3, 4, 5, 6, 8, 9, 10.

4. **Casework on 2,3,52, 3, 5:**
- We will consider different cases based on the colors of squares 2,3,52, 3, 5.

**Case 1: 232 \neq 3 and 252 \neq 5:**
- There are 3 choices for the color of square 2.
- There are 2 choices for the color of square 3 (since it must be different from square 2).
- There are 2 choices for the color of square 5 (since it must be different from square 2).
- Thus, there are 3×2×2=123 \times 2 \times 2 = 12 ways to color squares 2,3,52, 3, 5.

**Case 2: 2=352 = 3 \neq 5:**
- There are 3 choices for the color of square 2 (which also determines the color of square 3).
- There are 2 choices for the color of square 5.
- Thus, there are 3×2=63 \times 2 = 6 ways to color squares 2,3,52, 3, 5.

**Case 3: 2=532 = 5 \neq 3:**
- There are 3 choices for the color of square 2 (which also determines the color of square 5).
- There are 2 choices for the color of square 3.
- Thus, there are 3×2=63 \times 2 = 6 ways to color squares 2,3,52, 3, 5.

**Case 4: 2=3=52 = 3 = 5:**
- There are 3 choices for the color of squares 2,3,52, 3, 5.
- Thus, there are 33 ways to color squares 2,3,52, 3, 5.

5. **Color the remaining squares 4,6,8,9,104, 6, 8, 9, 10:
- For each of the above cases, we need to ensure that the remaining squares are colored such that the divisibility condition is satisfied.
- For each case, we have:
- 1 choice for square 4 (since it must be different from square 2).
- 1 choice for square 6 (since it must be different from squares 2 and 3).
- 1 choice for square 8 (since it must be different from square 4).
- 1 choice for square 9 (since it must be different from square 3).
- 1 choice for square 10 (since it must be different from squares 2 and 5).

6. Total number of ways:**
- Summing up the number of ways for each case:
- Case 1: 1212 ways
- Case 2: 66 ways
- Case 3: 66 ways
- Case 4: 33 ways
- Total: 12+6+6+3=2712 + 6 + 6 + 3 = 27 ways

7. Multiplying with the factors we ignored:
- We initially ignored the factors for coloring the 1st and 7th squares.
- Thus, the total number of ways is 27×4×3=32427 \times 4 \times 3 = 324.

The final answer is 324\boxed{324}.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.