Editing
2016 Jan Platinum Problem 3 Lights Out
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Problem == In the "Lights Out" problem, Farmer John's cows are having a party and Bessie is tasked with turning off the barn lights once the party is over. Unfortunately, the cows have installed a complex network of switches. There are N (2 <= N <= 200) switches in the barn numbered from 1 to N and M (1 <= M <= 10,000) connections between them. Each connection is a one-way connection from one switch to another switch and if a connection from switch A to switch B is activated, it toggles the state of switch B (if it is off, it turns on and if it is on, it turns off). The cows have guaranteed that from any switch, there is a unique way to reach every other switch. Bessie begins at switch 1 and wants to turn off all the switches. She can only leave once all the switches are turned off. At the start, all switches are on. The goal of the problem is to figure out the minimum number of times Bessie needs to traverse each connection such that she ends at switch 1 and all the switches are off.
Summary:
Please note that all contributions to Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
My wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information