I had a similar experience while trying to devise an algorithm to fill up n spots having n-1 soldiers available in the military. So after losing few hours, not being able to come up with any combination that satisfied all conditions I run to the sergeant, explained the problem and he just erased a spot for 24h, changing spec. Suddenly everything fell in to place.
Alexander the Great did the same thing in order to solve the Gordian Knot[1], he changed the spec by removing the complexity (in one stroke).
I was not in a position to even think about proposing the removal of any spot that had to be guarded at all times. Doing so, might have resulted in someone (including myself) doing double-shifts for a few days. Only he who has the power can do it (e.g. Larry Wall for Perl, Alexander the Great for the Gordian Knot and the sergeant for the military camp).