Baltic Way 2023 · Problem 7
Combinatorics
A robot moves in the plane in a straight line, but every one meter it turns to the right or to the left. At some point it reaches its starting point without having visited any other point more than once, and stops immediately. What are the possible path lengths of the robot?
When you’re ready
Review material becomes available with the next Daily.
Review
Topics
Colorings and configurations · Pigeonhole and extremal arguments · Invariants and monovariants
Solutions
Solution
Let us define the coordinates system with unit length of one meter, point of origin in the starting point and vertical-horizontal axes. W.l.o.g. assume that the first move was east and the path had length of . Then each odd move changed coordinate of the robot by 1 and each even move changed coordinate by 1 .
At the end of the day both coordinates were equal to zero again, so there had to be even number of odd and even number of even moves. That implies that only divisible by 4 can fulfill the conditions.
For we have a square path. For we had 4 changes of coordinate and 4 changes of , so the whole path was inside some square. Unfortunately that's not possible without reaching some point twice.
Now, we will prove that all divisible by 4 are good. For there is a path in shape of "+" with first 4 moves like . Now we can change the middle sequence by . Thanks to this change the robot explored new territory south-east from the one before explored. We got +4 of length of the path. There we can do it again and again, reaching any length of for all .
Contest context
Results from Baltic Way 2023
10 teams
- Mean score
- 4.7 / 5
- Scores of 4 or 5
- 9 / 10
- Estonia
- 5 / 5
Score distribution
All team scores
| Team | Score |
|---|---|
| Germany | 5 / 5 |
| Sweden | 5 / 5 |
| Lithuania | 5 / 5 |
| Poland | 2 / 5 |
| Estonia | 5 / 5 |
| Latvia | 5 / 5 |
| Norway | 5 / 5 |
| Denmark | 5 / 5 |
| Finland | 5 / 5 |
| Iceland | 5 / 5 |