Logical reasoning  Vikas Saini

Q. There are 1000 people in a circle.Each and every person has sword.If no. 1 person kills person no. 2,then no. 3 person kills no. 4 and so on.Which no. person will be alive at the end.
Solution :
Direct formula : 2(N  2^k ) + 1 = 2(1000  2^9) + 1
= 2(1000  512) + 1= 977.
Concept :
no of people. alive
2. 1
4. 1
8. 1
16. 1
2^k. 1
If the circle is according of 2^k then person will be remain alive is person no 1.
but suppose there is 40 people,then 2^5 = 32 is nearest no of 40.It means for it 8 people needed to be killed.
so to kill 8 people we need 16 people.
Then 17th people will be alive always.
In our question there are 1000 people.So the nearest no in power of 2 is 2^9 = 512. It means 1000512 = 488 people needed to be killed.To kill 488 people we need 976 people.
Then 977th will be alive at the end.
Q. An elephant has to carry 3000 bananas from Bhilai to Pune.
The distance between Bhilai to Pune is 1000 km.
constraints
(a) Elephant can carry maximum 1000 bananas at a single time.
(b) Elephant eats 1 banana per km to survive.
How much maximum banana elephant can carry.
Solution :
The distance is given 1000 km.
This distance will be shifted in some distances. Suppose elephant stops any point P which is x km away from bhilai.
In a single time elephant will carry 1000 bananas.Then this point he will come back to take 1000 more bananas.So it will travel 5x distance,and it will eat per banana 1 km.
5x = 1000.
x = 200.
Now only 2000 banans are left.
Then again at any point q,which is y km away from P,elephant travels.Total 3y time it will cover.
3y = 1000.
y= 333.
Hence elephant will eat 1000 bananas during this.
now distance left = 1000(200+333) = 467.
Bananas left = 3000(1000+1000) = 1000.
The elephant now can carry 1000 bananas in 467 km,467 bananas will eat.
and Left bananas = 533.
Q.A family went for a vacation.unfortunately rained for 13 days.whenever rained at morning they had a clear afternoon.whenever it rained no rain at morning.Family enjoyed 11 mornings,12 afternoon.
How many days family did stay there ?
solution :
method 1
Let family had to stay for x days.
(x11)+(x12) = 13
2x  23 = 13
2x = 36
x = 18.
method 2
total stay = rain at morning + rain at afternoon + total rain / 2
= 11+12+13/2
= 18.
method 3
left days(rain) = (12+1113)/2 = 5.
total stay = total rain + left days
= 13 + 5
= 18.
Q. A theif is hidden in hotel.
There is 6 rooms in hotel.Police come there and entered every day a room only.The thief hides next day adjacent room.
How many minimum days will be required to catch thief ?
solution :
Direct formula for such problems = (n2) x 2
= (62)x2
= 8.
Integrity method
room 1 2 3 4 5 6
day
1 * ° * * * *
2.  * ° * * *
3. *  * ° * *
4.  *  * ° *
5. *  *  ° 
6.  *  °  
7. *  °   
8.  °
Here
'*' represents the possibility of thief to be there.
'' represents the thief can't be there
'°' represents that police will check that room.
1st day : police will go to room no 2.
The thief either may be room no 1,3,4,5,6.
2nd day : police will go to room no 3.The thief will go adjacent room.If he was at room no 1 before,now he will go at room no 2,if he was at room no 3 he will hide in room no 4,if he was at room no 4,then 5 now and if room no 5 before then room no 6 now.
3rd day : Now police will enter in room no 4.The thief will change his room.If he was at room no 2 before,he may hide at room no 1 or 3 and room no 5 or 6 too.
4th day : On 4th day police will visit room no 5.The thief will change his room like before.Now he may be in room no 1,2,4,6.
5th day : On 5th day police won't enter at room no 6,they will stay at room no 5.The thief may hide this time at room no 1,2,3.
6th day : Now police will visit in descending order,so this time they will go at room no 4.The thief now may hide room no 1,2,3.
7th day : Now police will enter no 3.
The thief may hide only room no 1 & 2 only.
8th day : On 8th day police will visit room no 2 and thief will be caught.
Q.There are 40 seats in a bus.Person no 1 has right to sit any no of seat no. among 40 seats.While other passenger have to sit only their seat no like person no 5 at seat no 5,person no 27 at seat no seat.From person no 2 to 39 can sit another seat if their respective seat is not vacant.
What is the probability of person no 40 that he will get seat no 40.
solution : When person no 1 enters enter into bus he has 40 options.He can sit any of seat no.
suppose he sat seat no 10.Now other passenger will sit till person no 9 their seat only.Now person no 10 can sit seat no 1 or any of seat no because seat no 10 has occupied by person no 1.So person no 10 has two option either seat no 10 or seat no 1.
Same situation will occur with person no 40,he can sit either seat no 1 or seat no 40.
Therefore probability of sitting at seat no 40 = 1/2.
Q. There are 10 bags,each bag has 100 balls in them.Each ball is either 100 gm or 99 gm.There is exactly one defective bag where each ball is 99 gm.
How many weighing required to know which bag is defective ?
solution :
There are 10 bags.we take balls as per no of bag.like 1 ball from bag no 1,2 balls from bag no 2 and so on.
total we have 1+2...10 = 55 balls.
Then weight of total 10 balls should be shown on reading meter 5500 gm.
Then the weight of balls will how much be less than from 5500,will show the bag no.
suppose meter shows 5492 it means bag no 8 the bag which is defective.
Hence 1 weighing is enough.
Q. A car has 4 tyres and an extra tyre.Per tyre can travel max 20 km.How much max distance the car can be travel.
solution :
The car has 5 tyres.Each tyre can travel max distance is 20 km.
So after every 20/4 = 5 km one tyre will be replaced.
tyre no 1 2 3 4 5
5(1st) x √ √ √ √
5(2nd) √ x √ √ √
5(3rd). √ √ x √ √
5(4th). √ √ √ x √
5(5th). √ √ √ √ x
Total= 5+5+5+5+5 = 25km.
Short approach :
Max distance = total tyre x per distance / min tyre = 5 x 20 / 4
= 25.

@vikas_saini how is the distance 5x in the elephant carrying banana problem, can u pls explain ?

@tanveermalhotra this might need some explanation. (this is commonly called as camel and banana puzzle and is a frequent visitor in interviews for programming roles!)
3000 km from Source to Destination. Elephant need 1 banana per km and it can carry at max 1000 banana at a time. If elephant try to go straight to destination it will eat all the 1000 bananas in 1 km itself). So we need to find an intermediate position where we can store the bananas on the way. So the elephant should shuttle between source and intermediate and this brings in one more constraint that the intermediate should never be more than 500 km away from the source. Else, elephant won't have any banana left to return to source.Source  Intermediate  Destination
With 3000 bananas in total, elephant can make 3 trips from source. So it would be like
take 1000 bananas from source > travel to intermediate > store all the bananas at intermediate after taking enough bananas for return travel > travel to source > repeat (3 times)
So we can see the path between source  intermediate is covered 5 times here. Now comes the key part. This stretch of Source  Intermediate cost us 5 banana per km. So we need to ensure the intermediate is located at a place where the elephant can store max of 2000 bananas. Why ? Because after that, 2000 bananas can be transported to destination (or another intermediate) at a cost of 3 bananas per km (explained below) which is better than spending 5 bananas per km.Source  Intermediate1  Intermediate 2  Destination
take 1000 bananas from intermediate 1 > travel to intermediate 2 > store all the bananas at intermediate 2 after taking enough bananas for return travel > travel to intermediate > repeat (2 times)
So here we can see the stretch intermediate 1  intermediate 2 is covered at a cost of 3 banana per km.
So we have to be left with 2000 bananas at intermediate 1. As we are spending 5 bananas per km in this stretch, we can say 5d = 1000 ==> d = 200. So Intermediate 1 is 200 km away from source.
similarly we should ensure we bring 1000 bananas to intermediate 2, (as then the elephant can just take them all to destination in one shot  spending 1 banana per km)
So 3d = 1000 => d = 333
So intermediate 2 is 333 km away from intermediate 1.
Distance left till destination from intermediate 2 = 1000  (200 + 333) = 467
If elephant takes 1000 bananas from intermediate 2, there will be 1000  467 = 533 bananas transported to destination.
Here if you see, what we did is to optimize the price per km (in banana units!) and ensure we place the intermediate points such that it would be a multiple of the maximum carrying capacity. Like source (3000 bananas), Intermediate 1 (2000 bananas) and intermediate 2 (1000 bananas)..
Got it ?
That was lot of typing... Phew!!!