Question

At a hotel there are n rooms all located along a long corridor numbered consecutively from...

At a hotel there are n rooms all located along a long corridor numbered consecutively from 1 to n. After a family gathering n people likewise numbered from 1 to n arrived and proceed as follow: guest 1 opened all of the doors. Guest 2 closed every second door beginning with door 2 and guest 3 changed the position of every third door starting with the third door. This process continued until each person had walked the length of the corridor. Which doors were open and where are closed at the end of the process.

Homework Answers

Answer #1

Its a puzzle of door.

All door numbers which are perfect squares will remain open at the end and rest all will be closed.

Detailed explanation.

You can figure out that for any given door, say door #38, you will visit it for every divisor it has. so it has 1 & 38, 2 & 19. so on pass 1 i will open the door, pass 2 i will close it, pass 19 open, pass 38 close. For every pair of divisors the door will just end up back in its initial state. so you might think that every door will end up closed? well what about door #9. 9 has the divisors 1 & 9, 3 & 3. but 3 is repeated because 9 is a perfect square, so you will only visit door #9, on pass 1, 3, and 9… leaving it open at the end. only perfect square doors will be open at the end.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Kersten Brown, the CEO of Pleasanton Studios, is having a tough week – all three of...
Kersten Brown, the CEO of Pleasanton Studios, is having a tough week – all three of her top management level employees have dropped in with problems. One executive is making questionable decisions, another is threatening to quit, and the third is reporting losses (again). Kersten is hoping to find simple answers to all her difficulties. She is asking you (her accountant) for some advice on how to proceed. Pleasanton Studios owns and operates three decentralized divisions: Entertainment, Streaming, and Parks....
Kersten Brown, the CEO of Pleasanton Studios, is having a tough week – all three of...
Kersten Brown, the CEO of Pleasanton Studios, is having a tough week – all three of her top management level employees have dropped in with problems. One executive is making questionable decisions, another is threatening to quit, and the third is reporting losses (again). Kersten is hoping to find simple answers to all her difficulties. She is asking you (her accountant) for some advice on how to proceed. Pleasanton Studios owns and operates three decentralized divisions: Entertainment, Streaming, and Parks....
Kersten Brown, the CEO of Pleasanton Studios, is having a tough week – all three of...
Kersten Brown, the CEO of Pleasanton Studios, is having a tough week – all three of her top management level employees have dropped in with problems. One executive is making questionable decisions, another is threatening to quit, and the third is reporting losses (again). Kersten is hoping to find simple answers to all her difficulties. She is asking you (her accountant) for some advice on how to proceed. Pleasanton Studios owns and operates three decentralized divisions: Entertainment, Streaming, and Parks....
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
What role could the governance of ethics have played if it had been in existence in...
What role could the governance of ethics have played if it had been in existence in the organization? Assess the leadership of Enron from an ethical perspective. THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among the top Fortune 500 companies, collapsed in 2001 under a mountain of debt...
Discuss ethical issues that can be identified in this case and the mode of managing ethics...
Discuss ethical issues that can be identified in this case and the mode of managing ethics Enron finds itself in this case. How would you describe the ethical culture and levels of trust at Enron? Provide reasons for your assessment. THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among...