The floor plan of an art museum is a rectangle with dimensions
\(m \times n\) (\(m \geq 2\), \(n \geq 2\)) squares, where each square
corresponds to a single museum room. The director of the museum wants
to create a visitor route that satisfies the following requirements:
- the route starts in one of the squares (rooms) at the edge of the rectangle;
- a visitor can move from one square (room) to another square (room)
if they have a common side;
- a visitor visits each square (room) exactly once during the route;
- the route ends in the square (room) next to the edge of the rectangle
and next to the square where the route starts.
For what values \(m\) and \(n\) can the director
create a route satisfying these requirements?
Mākslas muzeja plānojums ir taisnstūris ar izmēriem \(m \times n\)
(\(m \geq 2\), \(n \geq 2\)) rūtiņas,
kur viena rūtiņa atbilst vienai muzeja telpai.
Muzeja vadītājs vēlas izveidot apmeklētāju maršrutu, kuram izpildās šādas īpašības:
- maršruts sākas kādā no rūtiņām (telpām), kas atrodas pie taisnstūra malas;
- apmeklētājs no vienas rūtiņas (telpas) var pāriet uz citu rūtiņu (telpu), ja tām ir kopīga mala;
- apmeklētājs maršruta laikā apmeklē katru rūtiņu (telpu) tieši vienu reizi;
- maršruts beidzas rūtiņā (telpā), kas atrodas pie taisnstūra malas blakus
maršruta sākuma rūtiņai (telpai).
Kādām \(m\) un \(n\) vērtībām muzeja vadītājs var izveidot šādu maršrutu?