Maths Olympiad Prep

Library / /308 of 520

Combinatorics Difficulty 6.6 National olympiad Prove it

A number of robots are placed on the squares of a finite, rectangular grid of squares. A square can hold any number of robots. Every edge of each square of the grid is classified as either passable or impassable. All edges on the boundary of the grid are impassable.

You can give any of the commands up, down, left, or right. All of the robots then simultaneously try to move in the specified direction. If the edge adjacent to a robot in that direction is passable, the robot moves across the edge and into the next square. Otherwise, the robot remains on its current square. You can then give another command of up, down, left, or right, then another, for as long as you want.

Suppose that for any individual robot, and any square on the grid, there is a finite sequence of commands that will move that robot to that square. Prove that you can also give a finite sequence of commands such that all of the robots end up on the same square at the same time.

Solutions — 2

Solution 1

We will prove any two robots can be moved to the same square. From that point on, they will always be on the same square. We can then similarly move

## Sun Life Financial Canadian Mathematical Olympiad

!

a third robot onto the same square as these two, and then a fourth, and so on, until all robots are on the same square.

Towards that end, consider two robots AA and BB. Let d(A,B)d(A, B) denote the minimum number of commands that need to be given in order to move AA to the square on which BB is currently standing. We will give a procedure that is guaranteed to decrease d(A,B)d(A, B). Since d(A,B)d(A, B) is a non-negative integer, this procedure will eventually decrease nn to 0, which finishes the proof.

Let n=d(A,B)n=d(A, B), and let S={s1,s2,,sn}S=\left\{s_{1}, s_{2}, \ldots, s_{n}\right\} be a minimum sequence of moves that takes AA to the square where BB is currently standing. Certainly AA will not run into an impassable edge during this sequence, or we could get a shorter sequence by removing that command. Now suppose BB runs into an impassable edge after some command sis_{i}. From that point, we can get AA to the square on which BB started with the commands si+1,si+2,,sns_{i+1}, s_{i+2}, \ldots, s_{n} and then to the square where BB is currently with the commands s1,s2,,si1s_{1}, s_{2}, \ldots, s_{i-1}. But this was only n1n-1 commands in total, and so we have decreased d(A,B)d(A, B) as required.

Otherwise, we have given a sequence of nn commands to AA and BB, and neither ran into an impassable edge during the execution of these commands. In particular, the vector vv connecting AA to BB on the grid must have never changed. We moved AA to the position B=A+vB=A+v, and therefore we must have also moved BB to B+vB+v. Repeating this process kk times, we will move AA to A+kvA+k v and BB to B+kvB+k v. But if v(0,0)v \neq(0,0), this will eventually force BB off the edge of the grid, giving a contradiction.

Solution 2

1. Induction Basis:
- We start by considering the case of two robots, A A and B B , on a grid of height m m and width n n .
- By the problem's assumption, there exists a finite sequence of commands that can move robot A A to the position of robot B B . Let the length of this path be \ell .

2. Relative Positioning:
- Without loss of generality (WLOG), assume that robot B B is above robot A A . This means that robot B B is either directly above or to the right of robot A A .

3. Movement Analysis:
- When robot A A moves one square along the path towards B B , two scenarios can occur:
- Scenario (i): Robot B B moves in the same direction as robot A A . In this case, the path length \ell remains constant because the distance decreased by one on A A 's side and increased by one on B B 's side.
- Scenario (ii): Robot B B cannot move in the same direction as A A . In this case, the path length \ell decreases because A A moves closer to B B .

4. Path Traversal:
- Move robot A A to the original position of robot B B along the path. If at any point A A coincides with B B , we have achieved our goal.
- If A A does not coincide with B B , continue moving A A to B B 's new position and repeat the process.

5. Contradiction Argument:
- Suppose, for the sake of contradiction (FTSOC), that scenario (ii) never occurs. This implies that both robots A A and B B are making the same moves, and B B is always above A A .
- Consequently, every time A A moves to B B 's previous location, both robots are moving upwards by at least one square.
- This leads to an absurd situation where B B would move upwards by m m squares, which is impossible since the grid has height m m and B B cannot start from the bottom row.

6. Conclusion:
- Therefore, scenario (ii) must occur at least once, causing the path length \ell to decrease.
- By repeating the process described in steps 3 and 4, the path length \ell will eventually reduce to zero, meaning that robots A A and B B will coincide.

7. Induction Step:
- By induction, if we can bring two robots to the same square, we can extend this argument to any number of robots by iteratively applying the same process to pairs of robots.

\blacksquare

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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