118. The highway, along which buses run 24/7, crosses a railway. Two trains pass along the road every hour, reaching the highway precisely at $n$ o'clock and at $n$ o'clock 38 minutes, where $n$ takes all values from 0 to 23; each time a train passes, the barrier, which blocks the highway, is lowered for 5 minutes. It is required to create a bus schedule such that the buses run with the same interval $T$ minutes between them and no bus is delayed at the crossing. For which intervals between buses, less than half an hour, is it possible to plan the movement in this way?
118. Let's assume that the barrier is closed from 0 min. to 5 min. and from 38 min. to 43 min. every hour. If the specified 5-minute intervals start, for example, 1 minute before the train approaches the barrier, we will simply "set the clock back by 1 minute" (and after solving the problem, to correct the bus movement schedule compiled using the incorrect time, we will again set the clock hands forward by 1 minute). Let's mark on the clock face all the positions of the minute hand corresponding to the moments when the bus passes the barrier - for this, we will mark the time \( t_0 \) min. of the first (from the beginning of the day) bus passing, and then, moving in the direction of the clock hands, we will mark the subsequent moments \( t_0 + T, t_0 + 2T \), and so on, each time marking an arc on the clock face corresponding to an interval of \( T \) minutes. We need to choose \( t_0 \) and \( T_0 \) in such a way that none of the obtained marks fall into the "prohibited" (shaded on Fig. 12) time intervals from 0 to 5 min. and from 38 to 43 min.

First of all, note that among the marks obtained in this way on the clock face, there can be no more than 12 different ones. Indeed, let \( R \) and \( R_1 \) be two adjacent marks on the clock face, corresponding to the angle \( ROR_1 = \alpha^\circ \) (where \( O \) is the center of the clock face), corresponding to a time interval of \( \tau \) minutes; the marks \( R \) and \( R_1 \) indicate the moments of time \( t_0 + iT \) and \( t_0 + jT \), where \( i \) and \( j \) are some integers. In this case, two buses - the \( i \)-th and \( j \)-th (where we assume \( j > i \)) - follow each other after an integer number \( k \) of hours \( \pm \tau \) minutes; for definiteness, let's assume that the time interval between the buses is \( k \) hours \( + \tau \) minutes, so that the arc \( \smile R R_1 \) has the direction of the clock hands (Fig. 12; the reasoning would change little if \( \cup R R_1 \) had the opposite direction). In this case, the \([j + (j - i)]\)-th (i.e., \((2j - i)\)-th) bus will follow the \( j \)-th after \( k \) hours \( \tau \) minutes, and the moment of its passage through the railway crossing corresponds to the mark \( R_2 \) on the clock face such that \( \cup R_1 R_2 = \cup R R_1 = \alpha^\circ \); the \([(2j - i) + 1 + (j - i)]\)-th (i.e., \((3j - 2i)\)-th) bus corresponds to the mark \( R_3 \) such that \( \cup R_2 R_3 = \alpha^\circ \), and so on. On the other hand, the \([i - (j - i)]\)-th (i.e., \((2i - j)\)-th) bus follows \( k \) hours and \( \tau \) minutes before the \( i \)-th, i.e., it corresponds to the mark \( R_{-1} \) such that \( R_{-1} \) and \( R_1 \) are on opposite sides of \( R \) and \( \cup R_{-1} R = \cup R R_1 = \alpha^\circ \), and so on. In this way, we will obtain a "grid" of marks on the clock face, located at an "arc" distance of \( \alpha^\circ \), or a "time" distance of \( \tau \) minutes; it is clear that if \( \tau \) is a divisor of 60, the number of marks will be finite and equal to \( \frac{60}{\tau} \).

1) It is clear that the total number of marks on the clock face, in principle, can be even infinitely large. [It can be proved that the number of marks will be infinitely large if the interval \( T \) is incommensurable with the interval of 1 hour, corresponding to a "full" rotation of the minute hand (a rotation by an angle of \( 360^\circ \)), and if this last condition is met, the marks on the clock face will be "dense," i.e., among them there will be marks located at a (arc) distance from any arbitrarily chosen point \( M \) on the clock face that is less than any predetermined (arbitrarily small!) number \( \varepsilon \).

On the other hand, it is obvious that the value \( k = 12 \) (i.e., \( \alpha^\circ = 30^\circ \) and \( \tau = 5 \) minutes) does not suit us: the arc \( AB \) can be free of marks only if its ends \( A \) and \( B \) coincide with some marks \( R \) and \( R_1 \); but in this case, the 9th mark corresponds to the moment of time \( 0 + 8 \cdot 5 \) minutes \( = 40 \) minutes - and it falls on the arc \( CD \). Similarly, the values \( k = 10, 9 \) and 7 (i.e., the values \( \tau = \frac{60}{10} = 6 \) minutes, \( \frac{60}{9} = 6 \frac{2}{3} \) minutes, and \( \frac{60}{7} = 8 \frac{4}{7} \) minutes) do not suit us either; for example, if \( \tau = 6 \) minutes, the nearest mark \( R \) after \( A \), if it does not fall on the arc \( AB \), must be located somewhere within the (time) interval [5 minutes, 6 minutes]; but then the 7th bus will correspond to a mark falling within the time interval \([5 + 6 \cdot 6 = 41 \) minutes, \( 6 + 6 \cdot 6 = 42 \) minutes\], which is entirely within the "prohibited" arc \( CD \). (Check yourself that if the mark \( R \) falls within the interval \([5 \) minutes, \( 6 \frac{2}{3} \) minutes\] or \([5 \) minutes, \( 8 \frac{4}{7} \) minutes\], the 6th or 5th bus will inevitably fall within the interval \( CD \).) On the contrary, the values \( k = 11, 8, 6, 5, 4 \) and 3, corresponding to the values \( \tau = \frac{60}{11} = 5 \frac{5}{11} \) minutes, \( \frac{60}{5} = 12 \) minutes, \( \frac{60}{4} = 15 \) minutes, and \( \frac{60}{3} = 20 \) minutes, are permissible: for example, if \( k = 11 \), the buses can pass the barrier, for example, at the moments of time 5 minutes, \( 10 \frac{5}{11} \) minutes, \( 15 \frac{10}{11} \) minutes, \( 21 \frac{4}{11} \) minutes, \( 26 \frac{9}{11} \) minutes, \( 32 \frac{3}{11} \) minutes, \( 37 \frac{8}{11} \) minutes, \( 43 \frac{2}{11} \) minutes, \( 48 \frac{7}{11} \) minutes, \( 54 \frac{1}{11} \) minutes, and \( 59 \frac{6}{11} \) minutes, and if \( k = 5 \), the following bus movement schedule is possible: the buses pass the barrier at 8 minutes, \( 8 + 12 = 20 \) minutes, 32 minutes, 44 minutes, and 56 minutes.

Thus, for \( T < 30 \) minutes, the required bus movement can be organized for \( T = 20 \) minutes, 15 minutes, 12 minutes, \( 7 \frac{1}{2} \) minutes, and \( 5 \frac{5}{11} \) minutes - and only for these values of \( T \).