7.79 Two painters are painting 100 sections of a fence surrounding a villa, alternating work every other day. Each person paints one section of the fence per working day, and can paint it either red or green. The first painter is colorblind and cannot distinguish between colors, but he can remember the places and colors he has painted, and can also see the places the second painter has painted, though not the colors. The first painter wants to maximize the number of red-green alternations on the fence, regardless of how the second painter works. How many red-green alternations can he achieve at most?
［Solution］The first person starts from the beginning, painting the 1st fence segment red. On the 3rd day, if the second person has already painted the 2nd segment, the first person will paint the 3rd segment green; if the second person has not painted the 2nd segment, he will paint the 2nd segment green. The first person's painting principle is to paint continuously from the beginning, skipping over segments painted by the second person and continuing to paint, and each time he paints a different color from the previous one. This way, the 50 segments painted by the first person change color 49 times, and the number of color alternations between any two segments painted by the first person will not decrease, regardless of how many segments and what colors the second person paints. Therefore, there are at least 49 color alternations.

If the second person always paints a segment of the same color right next to the segment painted by the first person, the number of color alternations will be exactly 49 times. Therefore, the first person can get at most 49 color alternations (here it is understood that the beginning and end of the fence are not connected, for example, there might be a door in between. Otherwise, the answer would be 50).