Let $n$ denote the number of rooms in the apartment. Suppose that any two rooms are adjacent and there is a door between them, and there is a door from every room to the outside of the apartment. Then there are $\frac{n(n-1)}{2}$ internal doors, since from each room $n-1$ doors lead to the others and each door has been counted twice. In addition, there is a door leading outside. Therefore, the total number of doors in the apartment is $\frac{n(n-1)}{2} + n$. This number is 10 when $n=4$ and 15 when $n=5$. From this, it is clear that the apartment must have at least 5 rooms, since the maximum number of doors allowed by a) and b) is not reached with 4 rooms. However, it must be checked whether 12 doors can actually be achieved with 5 rooms, since the assumption cannot be realized with 4 rooms. The diagrams show two floor plans that meet the conditions, where the crossed lines indicate the doors.
![](https://cdn.mathpix.com/cropped/2024_05_02_cbf1d18bff1ec816cedag-1.jpg?height=724&width=620&top_left_y=562&top_left_x=752)

Thus, it is possible to arrange 5 rooms in such a way that all three conditions are met, or in other words, there are at least 5 rooms in the apartment.

Note. Solutions that provided a correct result and good reasoning received 2 points.

Incomplete solutions (1 point) were those that only provided one correct floor plan and either did not provide reasoning or, if they did, did not check whether fewer rooms could have 12 doors; or those that provided a correct solution but were satisfied with the fact that theoretically 15 doors can exist with 5 rooms, without checking whether this is possible in reality, and thus did not provide an example of a 5-room, 12-door arrangement.
For a single-story apartment, we know the following: a) there is at most 1 door between any two rooms; b) from any room, there is at most 1 door leading outside the apartment; c) there are 12 doors in the apartment. What is the minimum number of rooms in the apartment?