here is a problem on a arans 1:
in a big hostel,there r 1000 rooms. in that hostel only even no r used for room no'i.e. the room no r 2,4,6.........1998,2000.all the rooms have one resident each.one fine morning , the warden call all the resident & tell them 2 go back to their room as well as the multiples of their room no's. when a guy visit a room & finds the door open,he closes it& if the door is closed,he opens it.all 1,000 guys do this operation . all the doors were open initially.
1. the last room that is closed is room no???
2 tha 38th room that is open is room no???
3if only 500guys i.e. resident of room no 2 to 1000 do this task,then the last room that is closed is room no
4in the above(3) case, how many rooms will b closed in all
5 if u r a lazy person, u would like 2 stayin a room whose no is
a. more than 500
b more than 1000
plz solve it
initially all doors are open.
hence they will be closed at the end when they are manipulated odd no of times.
i.e odd no. persons should enter or leave it......and hence should have odd no. of even factors
here all nos can be xpressed as ....
2^a*p^b..... or 2^a*p1^b*p2^c where p,p1 p2 are prime.
here we will have odd no. of even factors when
and b....even ..... for first case
and b and c....even.......... for second case
the maximum value is 2*5^2*3^2=1800 ...[ this is also the minimum value for 2nd case]
the maximum value will be the last door to close. ans 2:
the first 38 doors are from 2 to 76
out of these doors of the form 2^a*p^b where
will be closed and all others will be open.
there are 6 such nos
2, 2*3^2, 2*5^2, 2^3, 2^3*3^2, 2^5
hence we have to add six more nos [and also verify whether any of these is closed]
hence the no. will 88.ans 3:
here the maximum no. is 512
here maximum no is 2^9*3^0ans 5:
guys in room no 1002 to 2000 will have to enter omly there rooms
because the nearest multiple of 1002 is 2004 and no such room exists
hence ans : b
the method here is really time consuming. any other short-cut methods are welcome
p.s: anubond6 ,can post the method from cl study material, atleast the logic.