Problem

Source: St Petersburg Olympiad 2011, Grade 10, P6

Tags: combinatorics



We have garland with $n$ lights. Some lights are on, some are off. In one move we can take some turned on light (only turned on) and turn off it and also change state of neigbour lights. We want to turn off all lights after some moves.. For what $n$ is it always possible?