On the front panel of the "nuclear briefcase" there are $12$ buttons. Each button controls its own switch: pressing it toggles it from ON to OFF and back. The initial position of the switches is unknown. The nuclear case triggers an inaudible (ultrasonic) frequency alarm when at least eight switches are in the ON position.
Find the shortest way using as few keystrokes as possible to ensure that the suitcase will sound an alarm.
I tried to do this with examples, but actually I've not idea how can I determine which button to press.
UPDATE: A better answer with $47$ moves. (Credit: inspired by comment of @WW1 in main thread.)
Paint the buttons $2$ red, $1$ green, $9$ blue.
Using a gray code or similar, you can have the $2$ red buttons go through all $4$ states with $3$ moves.
Proof: After pressing green and all the blues, the $10$ bits will be negated. Either the initial state has $6+$ ON, or the final state has $6+$ ON, or both states have $5$ ON. So we only need to worry about this last case.
If green initial state is OFF, then among the initial blue there were already $5$ ON. When you press green the first time you already got $6$ ON simultaneously.
If green initial state is ON, then before pressing green the second time, green was OFF and there are $5$ blues ON. The second green press will be the $6$th ON. $~~~~~~~~\square$
So if you do the red buttons as an outer loop and the other buttons as an inner loop, you need only $4 \times (11 + 1) = 48$ moves.
As Ross Milikan pointed out, this can be slightly optimized by omitting the first gray-code move, for $11 + 1 + 11 + 1 + 11 + 1 + 11 = 47$ moves.
My original answer:
Not a provably optimal answer, but a method that takes only $80 \ll 2^8 = 256$ moves.
Paint the last $3$ buttons red. Using a gray code or similar, you can have them go through all $8$ possibilities in $8$ moves.
For the first $9$ buttons, if you press each once then either the initial state or the final (bitwise negated) state will have $5$ or more switches ON.
So if you do the red buttons as an outer loop and the other buttons as an inner loop, you need only $8 \times (9 + 1) = 80$ moves.