Skip to main content
OlympiadHQ

Browse · MathNet

Print

12th Czech-Polish-Slovak Mathematics Competition

counting and probability

Problem

The city of Mar del Plata has a shape of the square . For a given even integer , it is divided by streets into blocks (the streets run also around the square). Each block has a size of 100 m x 100 m. All the streets in Mar del Plata are one-way. Each street has one direction along the entire length. Every two adjacent parallel streets have opposite directions. The street is directed from to and the street is directed from to . A street cleaning car starts at . Its aim is to arrive to and clean the roads it passes through. What is the length of the longest possible route it can pass if no 100 m segment can be passed more than once? (For , Fig. 1 shows the map of the city and one of the possible, but not the longest, routes of the car. See also http://goo.gl/maps/JAzD.)

problem
Fig. 1

problem


problem


problem


problem


problem
Solution
First we introduce some notation. Call each 100 m segment of a street an arrow, and each place where two streets meet a crossroad. If an arrow has the same direction as the street or (that is, it runs from the upper left to the bottom right or from the bottom left to the upper right), it is called a forward arrow, otherwise it is a back arrow.

In the solution we will use the following obvious lemma: Let the set of all crossroads be split into two sets and such that and . Then the number of times the car drives along an arrow from to is one more than the number of times the car drives along an arrow from to .

Let us split the set of all crossroads of Mar del Plata into two sets and by a vertical (i.e. north-south) line connecting two points located m from – one on the street and one on the street – for some . Fig. 5a and 5b show the splitting line for and respectively.

Fig. 5a

Fig. 5b

If is odd then the line intersects forward arrows (going from to ) and back arrows (going from to ). Even if the car would pass all the forward arrows, by the lemma, it can pass at most back arrows. Hence, at least one of the back arrows remains unpassed.

If is even then the line intersects forward arrows and back arrows. The two northernmost forward arrows intersected by the line begin in the crossroad which has only one incoming arrow. This crossroad can be passed only once, hence one of the two northernmost forward arrows remains unpassed. The same holds for the two southernmost forward arrows. So we have at most forward arrows passed by the car and by the lemma at most back arrows. Together, we have at least 3 unpassed arrows at this level.

For , we have only two forward arrows starting in intersected by the line. Clearly only one of them could be passed by the car and one remains unpassed.

In a similar way, we split the set of all crossroads by a vertical line connecting two points located m from – one on the street and one on the street – for some . The situation is sketched on Fig. 6a and 6b and respectively.

Fig. 6a

Fig. 6b

If is odd then the line intersects forward arrows and back arrows, and at least one of the back arrows remains unpassed.

If is even then the line intersects forward arrows and back arrows. The two northernmost forward arrows end in the crossroad with only one outgoing arrow, hence one of them remains unpassed. The same holds for the two southernmost forward arrows. Again, we have at most forward arrows and at most back arrows passed by the car, which results in 3 unpassed arrows at this level.

For , we have two forward arrows ending in , only one of them could be passed by the car and one remains unpassed.

There is one unpassed arrow for any odd , three for any even , and one for , and all this happens twice. As is even and , altogether, we have unpassed arrows. The total number of arrows is , hence, the car cannot pass more than arrows.

On the other hand, there are many possible routes of the car consisting of arrows. One is sketched on Fig. 7 for . When we use the same pattern in general case, the route can be subdivided into parts by the crossroads lying on the street located m from for .

Fig. 7

The first parts differ only by shifting. Each of them consist of arrows of the same direction as , arrows of the opposite direction as , and arrows perpendicular to . The last part consists of arrows of the same direction as and arrows perpendicular to . Therefore, the number of arrows on the entire route is

Answer. The length of the longest possible route of the car is km.
Final answer
(2n^2 - 2n + 4)/10 km

Techniques

Graph TheoryColoring schemes, extremal argumentsInvariants / monovariants