Solution:
We will call radii the 9 segments that have the center of the 9-gon as a vertex.
Note first of all that choosing the set of segments to trace over in pen is equivalent to choosing a subset of the 9 radii that does not contain two consecutive radii: naturally Giovanni cannot trace over two consecutive radii; on the other hand, once the radii to be traced over have been chosen, each side of the 9-gon will be traced over if and only if neither of the two radii sharing a vertex with that side has been traced over.
We count the possible configurations according to the number of radii traced over.
0 - a single configuration;
1 - 9 choices for the radius to be traced over;
2 - once a radius has been chosen, the second radius can be any of the remaining ones, except for the two neighbors of the initial radius; the number of configurations is thus half the number of ordered pairs obtained in this way (219⋅6), that is, 27;
3 - the total number of possible choices for a subset of three radii, ignoring the restriction, is 619⋅8⋅7, that is, 84; among these, exactly 9 are choices of three consecutive radii; it remains to decide how many configurations there are formed by two consecutive radii and a third radius not consecutive to either of the other two. The pair of consecutive radii can be chosen in 9 ways; at that point, there are 5 choices for the 'isolated' radius. It follows that there are 84−9−45=30 acceptable configurations;
4 - in this case there is exactly one pair of chosen radii separated by a pair of consecutive unchosen radii (outside of this interval, chosen and unchosen radii alternate); the configurations are as many as the pairs of consecutive radii, that is, 9.
In total, we count 1+9+27+30+9=76 possible configurations.
Let us consider a variant of the original problem: Giovanni draws a regular n-gon in pencil, then draws n segments joining the vertices to the center; n triangles are thus formed. Unlike the original problem, suppose that Giovanni chooses one of the segments having the center as a vertex and decides not to trace it over in pen: we will call this segment special. Let us call f(n) the number of ways Giovanni has available to choose a subset of the other 2n−1 segments to trace over, again in such a way that each of the n triangles ends up with exactly one segment traced over in pen.
Note that, if n>4,f(n)=f(n−1)+f(n−2). Consider the triangle lying to the right of the special segment; it must have a segment traced over in pen, which can be a side of the n-gon or a segment having the center as a vertex. If Giovanni traces over the side of the n-gon in pen, he has f(n−1) ways of choosing the other segments to trace over: he can remove the traced-over side and identify the other two sides of the triangle in question, making them the special segment of a new configuration with n−1 triangles. If Giovanni traces over the side of the triangle adjacent to the center of the n-gon, then he cannot trace over any other side of the triangle lying to its right; he can thus remove two triangles, as in the previous step, to obtain a configuration with n−2 triangles and a special segment.
We now show that the answer to the original problem is f(7)+f(9). Let us choose any one of the radii of the 9-gon. If this is not traced over, then we can consider it as the special segment: there are f(9) ways of choosing the segments to trace over; otherwise, we can remove the two triangles adjacent to it, identifying the two radii between which they are contained: the identified radii cannot be traced over, and are thus a special segment for the configuration with 7 triangles.
It is easy to verify that f(3)=3 and f(4)=5 by enumerating the configurations; consequently, f(5)=8;f(6)=13;f(7)=21;f(8)=34;f(9)=55. The answer is f(7)+f(9), that is, 76.