answered 5 years ago
https://ask.sagemath.org/question/45862/how-to-find-swich-presses-on-lamp-shutting-problem/
answers the duplicate.