5. The museum has 16 halls, arranged as shown in the diagram. In half of them, paintings are exhibited, and in the other half, sculptures. From any hall, you can go to any adjacent one (sharing a common wall). During any tour of the museum, the halls alternate: a hall with paintings - a hall with sculptures - a hall with paintings, and so on. The tour starts in hall A, where paintings are displayed, and ends in hall B.

a) Mark with crosses all the halls where paintings are exhibited. Solution. See the diagram.

b) A tourist wants to visit as many halls as possible (travel from hall A to hall B), but visit each hall no more than once. What is the maximum number of halls he can visit? Draw one of his longest routes and prove that he could not have visited more halls.
Answer: 15.

Solution: One of the possible routes is shown in the diagram. Let's prove that if a tourist wants to visit each hall no more than once, they will not be able to see more than 15 halls. Note that the route starts in a hall with paintings (A) and ends in a hall with paintings (B). Therefore, the number of halls with paintings that the tourist has passed is one more than the number of halls with sculptures. Since the number of halls with paintings that the tourist could pass is no more than 8, the number of halls with sculptures is no more than 7. Thus, the route cannot pass through more than
![](https://cdn.mathpix.com/cropped/2024_05_06_0b5079389ba7141ce391g-08.jpg?height=940&width=428&top_left_y=498&top_left_x=1488)
15 halls.

## 7th Grade. Recommendations for Checking.

Each problem is scored out of 7 points. Each score is an integer from 0 to 7. Below are some guidelines for checking. Naturally, the problem setters cannot foresee all cases. When evaluating a solution, it should be determined whether the provided solution is generally correct (although it may have flaws) - in which case the solution should be scored no less than 4 points. Or if it is incorrect (although it may have significant progress) - in which case the score should be no more than 3 points.