In a kingdom far far away, the King decided that the time
has come to find a husband for his princess daughter. The
King wanted to find a worthy lad for his princess, so he
promised to give his daughter away to the first young (or
old) man who would solve the puzzle that has stumped the
best of his court mathematicians for years. The puzzle is
very simple: in a palace, there are 25 rooms arranged in a
square--5 rows of rooms with 5 rooms in each row. In every
room there is a light switch which not only switches on/off
the light in that room, but also switches the lights in the
adjacent rooms--the room to the right, to the left, the
room above and the room below. Initially, all of the
lights are turned off. The goal is to turn the lights on
in every room of the palace.

Answers were Sorted based on User's Feedback



In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / sajjad

10110
11111
11111
01101
11111

0 - room to switch on the light.

Now where is the princess. :)

Is This Answer Correct ?    0 Yes 1 No

In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / andy

01101
01110
00111
11011
11000

... and rotations of this.

The problem can be written as a system of 25 equations in 25
unknown over the field Z mod two, and then solved using
linear algebra (hopefully with the aid of a computer).

Is This Answer Correct ?    3 Yes 5 No

In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / guest

just switch on the 5 lights in the rooms to the right

Is This Answer Correct ?    3 Yes 5 No

In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / govind

SWitch ON light frm the 13 room, it will switches light frm
al other adjacen ROOMS .... Imagine it....
00000
00000
00000
00000
00000
0-> Indicates the ROOMS
go & switch on frm 3rd row n 3rd column light..

Is This Answer Correct ?    1 Yes 3 No

In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / mihir gupta

you have to switch on 9 lights....

Is This Answer Correct ?    0 Yes 2 No

In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / md

f6b2b
gfabc
7a1a3
geadc
e5d4d

1,2,3,4,5,6,7 indicate switch-rooms in order of switching
on their switches.
a corresponds to adjuscent rooms which lit due to step 1
b corresponds to adjuscent rooms which lit due to step 2
....
g corresponds to adjuscent rooms which lit due to step 7

Is This Answer Correct ?    4 Yes 7 No

In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / manish verma

Only 1 light needs to be switched ON, & it will switch on
the rest of the lighhts.

Is This Answer Correct ?    2 Yes 5 No

In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / pooja devraj

only 1 light need to switch on, gradually the remaining all
will become on.

1 0 0 0 0
0 0 0 0 0
0 0 0 0 0---->
0 0 0 0 0
0 0 0 0 0

1 1 0 0 0
1 0 0 0 0
0 0 0 0 0---->
0 0 0 0 0
0 0 0 0 0

1 1 1 0 0
1 1 0 0 0
1 0 0 0 0----> like this
0 0 0 0 0
0 0 0 0 0



this is the answer given by "ALPHY"

tz an excellent answer..

i agree....

bt litting frm room one takes a long tym to lite up all 25
rooms..

so to save time lets lit up the room at the center

y waste its advantage like it can lite its adjacent rooms..

quiet quick ryt.


SO.............


it can also be as...


0 0 0 0 0
0 0 0 0 0
0 0 1 0 0---->
0 0 0 0 0
0 0 0 0 0


0 0 0 0 0
0 0 1 0 0
0 1 1 1 0---->
0 0 1 0 0
0 0 0 0 0


0 0 1 0 0
0 1 1 1 0
1 1 1 1 1---->
0 1 1 1 0
0 0 1 0 0

0 1 1 1 0
1 1 1 1 1
1 1 1 1 1---->
1 1 1 1 1
0 1 1 1 0

1 1 1 1 1
1 1 1 1 1
1 1 1 1 1---->
1 1 1 1 1
1 1 1 1 1



ryt?? :)

Is This Answer Correct ?    3 Yes 6 No

In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / siva

in 4 rooms the lights are made on

Is This Answer Correct ?    2 Yes 9 No

In a kingdom far far away, the King decided that the time has come to find a husband for his princ..

Answer / superman

U have to on 4 light only.

The room of which light need to on is indicated by 0,

11111
10101
11111
10101
11111

Is This Answer Correct ?    2 Yes 13 No

Post New Answer

More Puzzles Interview Questions

A man got 30 aples in 1 Rs.Now he want 20% of profit on it. How many apples He should Sell in 1 Rs.??

20 Answers   TCS,


how can u make 5 one rupee coins to touch each other...every coin shud touch the other 4 coins...

12 Answers   Infosys,


do u know about sbi clerical interview pattern guyssss?

0 Answers   State Bank Of India SBI,


why should we hire the others waiting to be interviewed?

0 Answers   Qatar Airlines,


rich man keeps me in pocket, poor men throws me away, children eat me, am a tamil word _u_ _e_ _l

9 Answers   Adama Agricultural Solutions, Infosys, Mannar Company, Wipro,






There are 3 friends X,Y,Z having some chocolates each. X Gives Y and Z as many chocolates as they already have. After some days Y gives X and Z as many chocolates as they have. After some days Z gives X and Y as many chocolates as they have. Finally each has 24 chocolates. What is the original No. of chocolates each had in the beginning?

6 Answers   TCS,


Find the values of each of the alphabets. N O O N S O O N + M O O N ---------- J U N E

21 Answers   Bhel, CAT, IBM, Infosys, Mind Tree, Wipro,


1. There are six columns of coins and there are eight coins in each column. One of the columns is entirely of fake coins and other five columns contain real coins. Weight of one fake coin is 1 gm more than the real coin which is 50 gm. How you can tell which column contains fake coin by single weight? 2.You want to purchase a two wheeler. You got three options from the counter. 1) Pay Rs. 40,400 on single payment 2) Pay Rs. 20,000 now and remaining by two equal annual installment of Rs. 11,600 3) Pay Rs. 15,000 now and remaining by three equal annual installment of Rs. 10,000 Which option is most attractive? (Take annual interest rate 9%)

4 Answers  


Three men, including Gianni and three woman, including Sachi are in line at the BrentWood post office. Each has two different pieces of business to conduct. 1. The first person is a woman. 2. Carlos wants to send an overnight package. 3. Lau is just ahead of Pimentelli who is the same sex as Lau. 4. Gianni is two places ahead of the person who wants to buy stamps. 5. Knutson - who is the opposite sex than Rendler - isn't the person who wanted to complain about a mail carrier. 6. The six people, not necessarily in the same order are - Anthony, Donna, the person who wants to fill out a change-of-address form, the one who wants to buy a money order, the one who wants to send Airmail to Tibet and the second person in the line. 7. The four tasks of the last two people in line, not necessarily in the same order are - sending books fourth class, buying a money order, picking up a package and complaining about a mail carrier. 8. The person who wants to send books fourth class is just behind a person of the same sex. 9. Mary is just behind a person who wants to send an insured package. 10. The person who wants to send Airmail to Tibet is either two places ahead of or two places behind the one who wants to add postage to his or her meter. 11. Anthony isn't two places behind the who wants to pickup a registered letter. 12. Toriseza is two places ahead of the person who wants to pick up a package. 13. Knutson isn't just ahead of the person who wants to send an item parcel post. Can you figure out where each customer is in the line, his or her full name (one surname is Loti) and the two things he or she wants to accomplish? Provide your answer is POSITION - FIRST NAME - LAST NAME - BUSINESS format.

1 Answers  


You have 9 marbles. 8 marbles weigh 1 ounce each, & one marble weighs 1.5 ounces. You are unable to determine which is the heavier marble by looking at them. You have a weighing scale that consists of 2 pans, but the scale is only good for 2 total weighings. How can you determine which marble is the heaviest one using the scale & in 2 weighings?

5 Answers   Facebook,


I have two coins for 75 paise.1 coin is not 50 paise, how?

41 Answers   HCL, Infosys, KI, SNS International,


a frog starts climbing 20 feet wall. each day he climbs 3 feet , he slips back 2 feet. how many day does the frog take to reach the top?

5 Answers  


Categories