There are precisely eight buttons in a row. Each button shows an arrow pointing left (L) or right (R).
When you press a button, all buttons in the direction of its arrow (not including itself) rotate 180 degrees.
Determine the least number of button presses required to get from RRRRLLLL to LRLRLRLR.
(In reply to
computer solution by Charlie)
Still later I recognized that reversing the string before or after the l or r was not equivalent to physically flipping the buttons. After the flip it would still be necessary to change l's to r's and vice versa.
I made that change, and it still found no solutions, so the individual rotation still is the proper interpretation.
|
Posted by Charlie
on 2023-03-21 17:26:29 |