Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Lockers...

This is a discussion on Lockers... within the Aptitude Skills forums, part of the Brain Gym category; There are 1000 lockers in a high school with 1000 students. The problem begins with the first student opening all 1000 lockers; next the second student closes lockers 2,4,6,8,10 and ...

Go Back   Geeks Talk > Brain Gym > Aptitude Skills
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 08-04-2007
Expert Member
 
Join Date: Jun 2006
Location: India
Posts: 413
Thanks: 15
Thanked 43 Times in 31 Posts
jamesravid will become famous soon enough
Lockers...

There are 1000 lockers in a high school with 1000 students. The
problem begins with the first student opening all 1000 lockers; next
the second student closes lockers 2,4,6,8,10 and so on to locker 1000;
the third student changes the state (opens lockers closed, closes
lockers open) on lockers 3,6,9,12,15 and so on; the fourth student
changes the state of lockers 4,8,12,16 and so on. This goes on until
every student has had a turn.

How many lockers will be open at the end? What is the formula?
__________________
Cheers,
:) James:)
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-06-2007
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,016
Thanks: 0
Thanked 91 Times in 72 Posts
psuresh1982 will become famous soon enough
Re: Lockers...

For example the 18th locker will be visited by those students whose numbers are factors of 18. i.e. by numbers 1,2,3,6,9,18. This is 6 students (an even number) and this means the locker will in turn be
open/closed/open/closed/open/closed. Now all numbers with an even number of factors will end up closed. And all numbers EXCEPT PERFECT SQUARES have an even number of factors if we include 1 and the number itself. For a perfect square, say 16, we have factors 1,2,4,8,16, an odd number, and the lockers would be open/closed/open/closed/open.

So perfect squares always have an odd number of factors, and all other numbers have an even number of factors.

Lockers that are open are 1, 4, 9, 16, 25, 36, .....

So total number of lockers that are open is 31.

--------------------
suresh
Reply With Quote
The Following User Says Thank You to psuresh1982 For This Useful Post:
Reply

  Geeks Talk > Brain Gym > Aptitude Skills

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
How many lockers are then opened? debleena23 Brainteasers 2 05-09-2007 02:51 AM


All times are GMT -4. The time now is 05:03 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved