Computer class problem?

here is a problem I have to try to figure out for my computer class. I'm thinking that the binary code is involved in solving this problem somehow but I'm not really sure. I can't seem to figure it out, all my ideas lead to dead ends.

Nineteen students are given the opportunity to win a prize by playing a game. After some time to decide on a strategy, all the students will be placed into separate soundproof isolation chambers with absolutely no way to communicate.

The game is played as follows. There are two light switches in a room that will begin in the "off" position. I will bring students into this room one at a time. Each time a student enters the room then he or she must flip one of the switches. All the students will eventually be brought into the room, but some students may be brought in more than one time.

If one person correctly tells me that everyone has been in the room, then everyone wins the prize. However, if someone incorrectly tells me that everyone has been in the room then everyone will be fed to the alligators! Note that either all the students win the prize or else everyone loses.

Your task is to determine a strategy that will be sure to allow everyone to win the prize (and not be eaten by alligators).

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 EBIN.TIPS - All rights reserved.