To ask an engineering question please visit our forum site at Eng-Tips.



Browse our archive of questions and answers below or to access our old forum database of over 10000 questions and answers please visit the old Ask@ forum.


Door Toggling Puzzle or 100 Doors Puzzle ???
Last Post 12 Feb 2014 05:41 AM by alec. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
phil
Basic Member
Basic Member
Posts:133

--
23 Dec 2012 10:39 PM
    This is a very common interview puzzle. The problem is very simple if you understand it. So the point to note is, do not arrive at the solution so "fast”, if you are asked this puzzle in an interview and if you are not planning to show any acquaintance with this puzzle.

    Problem goes like this :
    There are N doors in a row numbered from 1 to N. Initially all are closed.
    Then you make N passes by the N doors. In pass 1 you toggle the all the doors (1,2,3,4....)starting from the first door. In the second pass you toggle every second door(2,4,6,8,...). In the third pass you toggle all third doors(3,6,9...). Similarly you make N passes.

    Question is what is the state of door k after N passes ???
    richie
    Basic Member
    Basic Member
    Posts:171

    --
    24 Dec 2012 12:40 AM
    open
    james
    Basic Member
    Basic Member
    Posts:125

    --
    06 Feb 2014 09:21 PM
    it will be open now
    alec
    Basic Member
    Basic Member
    Posts:167

    --
    12 Feb 2014 05:41 AM
    OPEN
    You are not authorized to post a reply.