Lights Out is a logic game wherein all lights need to be turned off to complete each board. See the first problem in the series for an introduction.
This problem contains boards that each require any number of moves to solve. The function you write has to determine if the initial state is a potential answer—i.e., if toggling only the starting lights are sufficient to solve the board.
Prev.: 5x5, any number of moves —
Next: 5x5, light-only solution? II
Find perfect placement of non-rotating dominoes (easier)
Replicate elements in vectors
Poker Card Deal!
Divisible by n, prime divisors - 11, 13, 17, & 19
Divisible by n, Composite Divisors
Divisible by n, prime divisors from 20 to 200
Lights Out 18 - 3x3, 3 moves
Lights Out 5 - 5x5, 10 moves
Lights Out 31 - 5x4x6, x moves
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office