A building has the plan of a $5 \times 5$ grid of rooms, each of which has a door in each of its four walls: thus there are 20 doors leading to the outside. The doors are to be opened and closed so that every room has exactly 3 open doors leading from it. Determine the minimum and maximum number of doors to the outside that may be left open.
If we consider the building as possessing 26 "spaces," namely the outside and the 25 rooms, then each door belongs to two spaces; hence the total of the numbers of open doors to each space must be even. Each room has three open doors, an odd number; hence the number of open doors to the outside must also be odd.

Also, each of the four corner rooms clearly demands an outside door to be opened. So there are at least 4 open outside doors; coupling this with the parity observation yields at least 5 and at most 19 open outside doors. The diagrams show that both of these extremes are achievable.
![](https://cdn.mathpix.com/cropped/2024_04_17_81e08d0dc622a81e9ed0g-1.jpg?height=380&width=872&top_left_y=1268&top_left_x=624)