1. Home
  2. Explore
  3. Mathematics
  4. AI and Math Olympiads

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

AI and Math Olympiads

The Minimum-Tile Problem: Construction and Proof

Problem setup

Consider an N×NN \times NN×N grid of unit squares. A collection of non-overlapping rectangular tiles is placed on the grid, with every tile edge lying along grid lines. The uncovered unit squares must satisfy two conditions:

  • Each row contains exactly one uncovered square.

  • Each column contains exactly one uncovered square.

There are therefore exactly NNN uncovered squares. Their positions can be viewed as a permutation: reading the rows from left to right, the row positions of the uncovered squares list each value from 111 to NNN exactly once.

The task is to find the minimum possible number of tiles. A complete solution requires both:

  1. A construction using a certain number of tiles.

  2. A proof that no valid arrangement can use fewer.

For the 2025×20252025 \times 20252025×2025 grid, the minimum is 211221122112 tiles.


Why the proof is harder than the construction

A simple arrangement places the uncovered squares along a diagonal and fills the remaining regions with horizontal tiles. For an N×NN \times NN×N grid, this uses 2(N−1)2(N-1)2(N−1) tiles. It is easy to describe, but it is not optimal when NNN is a square number.

The main difficulty is not merely finding an efficient pattern. It is proving that the pattern is best among all possible arrangements of uncovered squares and all possible rectangular tilings. Since the uncovered squares can form any permutation, the space of arrangements is very large.

A useful problem-solving principle is that a proof often emerges from an idea that first helps discover the construction. Here, the key idea is to examine the edges around the uncovered squares. This converts a complicated tiling problem into a counting problem.


A motivating analogy: cutting a cube

Suppose a 3×3×33 \times 3 \times 33×3×3 cube must be divided into 272727 unit cubes. Without rearranging pieces, six planar cuts suffice: two cuts in each of the three coordinate directions.

If the pieces may be rearranged between cuts, it is tempting to look for a way to use fewer cuts. A counting argument rules this out. Focus on the central unit cube. Each of its six faces must be separated from the surrounding material, and each face requires a distinct planar cut. Thus at least six cuts are necessary, regardless of how the pieces are rearranged.

The important lesson is that the proof of optimality comes from assigning a necessary task to each element being counted: each face of the central cube requires a cut.

The tiling problem admits a similar strategy. Each uncovered square has edges that must be covered by neighboring tiles, and these edges can be used to establish lower bounds on the number of tiles.


An efficient construction when the grid side is a square

Let the grid side length be N=k2N=k^2N=k2. A highly efficient pattern uses square tiles of side length kkk in a staggered arrangement around the uncovered squares. The uncovered squares form a regular, slightly tilted pattern in which no two share a row or a column.

The construction has two groups of tiles:

  • An interior arrangement of (k−1)2(k-1)^2(k−1)2 tiles.

  • Additional boundary tiles, with k−1k-1k−1 along each of the four sides, for a total of 4(k−1)4(k-1)4(k−1).

Thus the construction uses

(k−1)2+4(k−1)=k2+2k−3(k-1)^2+4(k-1)=k^2+2k-3(k−1)2+4(k−1)=k2+2k−3

tiles.

This pattern explains why a square grid size is especially useful: the construction is built from square tiles whose side length is the square root of the grid side length.

For the original grid, N=2025=452N=2025=45^2N=2025=452, so k=45k=45k=45. The construction uses

452+2(45)−3=2025+90−3=211245^2+2(45)-3=2025+90-3=2112452+2(45)−3=2025+90−3=2112

tiles.

A construction alone does not establish that 211221122112 is the minimum. A lower bound must show that every valid tiling needs at least this many tiles.


Counting edges around uncovered squares

Each uncovered square has four edges. Since tiles must cover all grid squares other than the uncovered ones, most of these edges must touch tiles.

A first rough count gives a lower bound:

  • There are NNN uncovered squares, hence 4N4N4N edges around them.

  • A tile can touch at most four of these edges: at most one on each side, because no two uncovered squares share a row or column.

  • Four edges lie on the outer boundary of the whole grid and do not need to touch a tile.

This gives at least 4N−44N-44N−4 edges that must be covered by tiles. Since each tile can account for at most four such edges, at least

4N−44=N−1\frac{4N-4}{4}=N-144N−4​=N−1

tiles are required.

This is a valid lower bound, but it is too weak: for N=k2N=k^2N=k2, the construction uses k2+2k−3k^2+2k-3k2+2k−3 tiles, which includes an additional term proportional to kkk.

A one-to-one edge assignment

A more precise count highlights only the right edge of each uncovered square. Each such edge must touch a tile, and a tile can touch at most one highlighted right edge. The reason is that two uncovered squares cannot lie in the same column.

One right edge on the outer boundary of the grid does not need to meet a tile. Consequently, this method again gives a lower bound of N−1N-1N−1 tiles, but it makes the source of the weakness clearer: focusing on one direction leaves many tiles near the opposite side of the grid unaccounted for.

The improvement is to use all four directions, while carefully arranging the highlighted edges so that no tile is counted more than once.


Using increasing and decreasing paths to divide the grid

Represent each uncovered square by its row number, read in order across the columns. Since every row and column has exactly one uncovered square, these row numbers form a permutation of 1,2,…,N1,2,\ldots,N1,2,…,N.

Two kinds of subsequences in this permutation are important:

  • An increasing subsequence consists of entries that rise as one moves from left to right. In the grid, its uncovered squares form an upward-moving path.

  • A decreasing subsequence consists of entries that fall as one moves from left to right. Its uncovered squares form a downward-moving path.

Choose a longest increasing subsequence and a longest decreasing subsequence. Their paths divide the diagram into regions that favor different directions.

The edge-selection rule is then based on which region contains an uncovered square:

  • In the rightward region, highlight its right edge.

  • In the upper region, highlight its top edge.

  • In the leftward region, highlight its left edge.

  • In the lower region, highlight its bottom edge.

  • Squares on a path separating regions receive additional highlighted edges, according to the adjacent regions.

The exact choices ensure that the highlighted edges point toward the tiles in their respective regions.

Why this avoids double counting

The edge count gives a tile lower bound only if a tile cannot touch two highlighted edges. The regional arrangement is designed to ensure this.

For example, consider a tile in the leftward region. An uncovered square above it might have a highlighted left or top edge, but not a bottom edge pointing down into the tile. A square below it cannot have a highlighted top edge pointing up into the tile. A square to its left cannot have a highlighted right edge pointing toward the tile, because it is not in the rightward region.

The same directional reasoning applies in each region. Thus each highlighted edge can be assigned to a tile, and each tile is assigned at most one highlighted edge. The number of tiles is therefore at least the number of highlighted edges.

This is the central counting idea: choose edges so that each one requires a tile, while ensuring no tile is asked to account for two selected edges.


Counting the highlighted edges

Let:

  • LIS⁡\operatorname{LIS}LIS be the length of a longest increasing subsequence.

  • LDS⁡\operatorname{LDS}LDS be the length of a longest decreasing subsequence.

There are NNN uncovered squares. The edge-selection scheme gives each one a baseline highlighted edge, except for the four boundary exceptions, giving N−4N-4N−4 edges. The increasing path contributes LIS⁡\operatorname{LIS}LIS additional edges, and the decreasing path contributes LDS⁡\operatorname{LDS}LDS additional edges.

There is also one further contribution:

  • If the paths intersect at an uncovered square, that square receives an additional highlighted edge beyond those already counted.

  • If the paths do not intersect at an uncovered square, they cross through a tile; that central tile touches no highlighted edge. This supplies one extra tile beyond the number accounted for by the highlighted edges.

Either way, the total number of tiles must be at least

N−4+LIS⁡+LDS⁡+1=N+LIS⁡+LDS⁡−3.N-4+\operatorname{LIS}+\operatorname{LDS}+1 = N+\operatorname{LIS}+\operatorname{LDS}-3.N−4+LIS+LDS+1=N+LIS+LDS−3.

This reduces the tiling problem to a fact about permutations: how large must the sum of the longest increasing and decreasing subsequence lengths be?


The permutation inequality

For every permutation of NNN distinct numbers,

LIS⁡⋅LDS⁡≥N.\operatorname{LIS}\cdot \operatorname{LDS}\geq N.LIS⋅LDS≥N.

This result is known as the Erdős–Szekeres theorem. It implies a bound on the sum of the two lengths through the arithmetic mean–geometric mean inequality:

LIS⁡+LDS⁡2≥LIS⁡⋅LDS⁡≥N.\frac{\operatorname{LIS}+\operatorname{LDS}}{2} \geq \sqrt{\operatorname{LIS}\cdot\operatorname{LDS}} \geq \sqrt{N}.2LIS+LDS​≥LIS⋅LDS​≥N​.

Therefore,

LIS⁡+LDS⁡≥2N.\operatorname{LIS}+\operatorname{LDS}\geq 2\sqrt{N}.LIS+LDS≥2N​.

When N=k2N=k^2N=k2, this becomes

LIS⁡+LDS⁡≥2k.\operatorname{LIS}+\operatorname{LDS}\geq 2k.LIS+LDS≥2k.

Substituting this into the tile lower bound gives

number of tiles≥N+2k−3=k2+2k−3.\text{number of tiles} \geq N+2k-3 = k^2+2k-3.number of tiles≥N+2k−3=k2+2k−3.

The construction uses exactly k2+2k−3k^2+2k-3k2+2k−3 tiles, so the lower bound is attained. The construction is therefore optimal.


A proof of the Erdős–Szekeres inequality

The product inequality can be proved by labeling every entry of the permutation.

At each position, assign a pair (a,b)(a,b)(a,b), where:

  • aaa is the length of the longest increasing subsequence that ends at that entry.

  • bbb is the length of the longest decreasing subsequence that ends at that entry.

These pairs are all distinct. To see why, take two entries in their original order. Because the permutation contains distinct numbers, the later entry is either larger or smaller than the earlier one.

  • If the later entry is larger, an increasing subsequence ending at the earlier entry can be extended by the later entry. Its first label therefore increases.

  • If the later entry is smaller, a decreasing subsequence ending at the earlier entry can be extended by the later entry. Its second label therefore increases.

So for any two entries, at least one coordinate of their labels differs. No two entries receive the same pair.

The first coordinate of each pair is at most LIS⁡\operatorname{LIS}LIS, and the second is at most LDS⁡\operatorname{LDS}LDS. Thus all NNN distinct pairs lie within a rectangle containing at most

LIS⁡⋅LDS⁡\operatorname{LIS}\cdot\operatorname{LDS}LIS⋅LDS

possible pairs. Hence

N≤LIS⁡⋅LDS⁡.N\leq \operatorname{LIS}\cdot\operatorname{LDS}.N≤LIS⋅LDS.

This proves the permutation inequality and completes the lower-bound argument.


Why visual intuition and patience matter

The proof depends on several distinct stages of reasoning:

  1. Explore examples. Small tilings suggest that some arrangements are more efficient than others.

  2. Identify what efficiency means. Tiles are most useful when they cover edges around uncovered squares.

  3. Turn intuition into a count. A carefully selected set of edges can be matched to distinct tiles.

  4. Recognize hidden structure. The positions of the uncovered squares form a permutation, so increasing and decreasing subsequences become relevant.

  5. Use a general theorem. The Erdős–Szekeres inequality provides the quantitative bound needed to finish.

This illustrates why effective problem solving often requires understanding a problem before attempting a polished proof. The construction, the edge-counting strategy, and the permutation theorem are connected, but that connection is not obvious from the problem statement alone. Patience allows these structures to emerge.

A related idea is that mathematical symmetry can guide both construction and proof. The optimal arrangement treats directions in a balanced way, while a one-direction edge count is weaker because it systematically neglects tiles on one side.


AI, proofs, and mathematical understanding

The problem was discussed in the context of increasingly capable AI systems solving contest mathematics. Earlier systems could produce impressive results in formal proof environments such as Lean, where mathematical proofs are represented in a computer-checkable language. Later approaches also attempted to produce solutions directly in natural language. The central challenge in this problem was not only formal correctness: the solution benefits from visual experimentation, careful problem comprehension, and the ability to develop a useful strategy before writing the proof.

A proof establishes that a result follows logically. A motivated explanation goes further by showing why the key definitions and strategies are natural, so that the proof feels connected to the problem rather than appearing as a sequence of unexplained steps.

This distinction matters in mathematics. A proof can confirm a result, while the understanding developed in finding and explaining it can reveal new patterns, useful concepts, and connections to other problems. For human learning, the motivation behind a proof is therefore an important part of mathematical understanding, not merely an optional introduction.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent