Return of Sajha Intellects PUZZLE - Sajha Mobile
SAJHA MOBILE
Return of Sajha Intellects PUZZLE
Posts 7 · Viewed 5487 · Go to Last Post
helpjava11
· Snapshot 0
Like · Likedby · 0
A school exam has 23 students in 23 different classrooms. The students have no way to communicate with each other in any way from their rooms. There is another room, the play room, that has two switches on the wall (X and Y). The switches have on and off positions but they start in an unknown position.

Students are randomly taken to and from the play room one at a time. They MUST change the position of only ONE of the two switches each time they go to the room. At any point a student can yell out, "Every students has been here!" If the student is correct that all of the students have visited the play room, then they all pass the exam. If they aren't correct then they will be expelled from school.

Before they start they are given one planning session during which they can discuss a method to win the game. What method can they use to ensure they all pass?
Kiddo
· Snapshot 133
Like · Liked by · 0
Helpjava11, I like the puzzle, one question before we proceed:
Students are chosen random one at a time, but can they be repeated? Say Ram gets chosen 1st, can he be chosen in 5th turn? My guess is no.

pirka
· Snapshot 177
Like · Liked by · 0
Strangely this seemed very easy for about 2 minutes then got my mind 'penetrated' !!
helpjava11
· Snapshot 252
Like · Liked by · 0
Kiddo bro, yes students can be repeated as many times in random fashion. So there is no limit how many times each student are taken to the the play room.
prankster
· Snapshot 255
Like · Liked by · 0
Select a leader, rest are followers.
Visit by a follower:
If switch A is on, toggle switch B.
If switch A is off and you have not previously toggled switch A, and you have previously seen switch A on, toggle it on, otherwise toggle switch B.
If switch A is off and you have previously toggled switch A, toggle switch B.

Visit by the leader:
If switch A is off, toggle it on.
If switch A is on, toggle it off. If you did not turn switch A on during your previous visit, increment the count of prisoners.

Switch A states are used by leader for counting, switch B is there so that follower can toggle it if they have already toggled Switch A.

Unknown initial state is solved because only leader would initially toggle the switch A.

Don't ask how I came up with the solution, you probably would find out soon. :P
KaliKoPoi
· Snapshot 297
Like · Liked by · 0
I find this problem as think out of the box problem and the hint is here:
The students have no way to communicate with each other in any way from their rooms.
ie; They can communicate with each other out of their room. 
How?? Each student can drop their pen or draw a line (only once) on wall. If there are 22 pens or 22 lines and if the student taken to the play room has not dropped the pen or drawn a line, s/he can scream.

"Switch" is the diversion of your mind from the main problem.
helpjava11
· Snapshot 356
Like · Liked by · 0
that was well thought of by KaliKoPoi. But they have to use only the switches and can't use anything else.
Please log in to reply to this post

You can also log in using your Facebook
View in Desktop
What people are reading
You might like these other discussions...
· Posts 18 · Viewed 4046 · Likes 3
· Posts 1 · Viewed 99
· Posts 1 · Viewed 91
· Posts 1 · Viewed 181
· Posts 1 · Viewed 392
· Posts 1 · Viewed 225
· Posts 1 · Viewed 133
· Posts 1 · Viewed 114
· Posts 77 · Viewed 18801 · Likes 16
· Posts 1 · Viewed 163



Your Banner Here
Travel Partners
Travel House Nepal