9,10

What is the maximum number of self-intersection points that a closed 14-segment broken line can have, passing along the lines of a grid paper so that no line contains more than one segment of the broken line?
Let's first show that any closed 14-segment broken line has 7 horizontal and 7 vertical segments. Indeed, from each vertex of the broken line, one vertical and one horizontal segment emerge. Counting along all 14 vertices, we will thus count 14 horizontal and 14 vertical segments. But in this counting, each segment is counted twice. Therefore, there are 7 horizontal and 7 vertical segments. Now let's number the horizontal segments of our broken line "from top to bottom" and determine how many intersection points can lie on each segment. There are no intersection points on the first and seventh segments, as there are no vertices of the broken line above the first and below the seventh segments. It is also clear that there can be no more than two intersection points on the second and sixth segments, and no more than four intersection points on the third and fifth segments - according to the number of vertices of the broken line lying above (respectively, below) these segments. On the fourth segment, there can be no more than six intersection points. We will show that in fact, only five intersection points can lie on the fourth segment. Indeed, if there were six, then in this case, each vertex of the broken line lying above the fourth segment would be connected to one of the vertices lying below this segment, and vice versa. Thus, the vertices belonging to the fourth segment would have nothing to connect to. We have shown that our broken line cannot have more than \(2+4+5+4+2=17\) intersection points. An example of a broken line with 17 intersection points is shown in Fig. 65.