Friday 9 December 2016

Toughest question ever asked in any interview

I- Interviewer, C- Candidate
I: There is a circular race-track of diameter 1 km. Two cars A and B are standing on the track diametrically opposite to each other. They are both facing in the clockwise direction. At t=0, both cars start moving at a constant acceleration of 0.1 m/s/s (initial velocity zero). Since both of them are moving at same speed and acceleration and clockwise direction, they will always remain diametrically opposite to each other throughout their motion.
At the center of the race-track there is a bug. At t=0, the bug starts to fly towards car A. When it reaches car A, it turn around and starts moving towards car B. When it reaches B, it again turns back and starts moving towards car A. It keeps repeating the entire cycle. The speed of the bug is 1 m/s throughout.
After 1 hour, all 3 bodies stop moving. What is the total distance traveled by the bug?
How would you, the reader, approach this problem?
First of all here is a graphic to help you visualize initial condition.
Now, let’s try to visualize the path of the bug. The question states that it will always be moving towards one of the cars. But the cars themselves are moving. So, bug’s path would not be a straight line. It would be a complicated spiral like path. Plus, the cars are not moving at constant velocity. They are accelerating, this will further complicate the spiral path.
So, the approach is clear. We need to find mathematical equation corresponding to bug’s path for one cycle. Then we can simply calculate the distance from this equation and a little integral calculus. Then multiply the answer with the number of cycles.
But how to calculate the equation of the complicated spiral path?
At this point my friend simply gave up.
The interviewer encouraged him to at least tell his approach. My friend explained above approach.
At this interviewer replied - “Are you ready to hear my solution?”
My friend was more than eager.
The interviewer said - “Bug is traveling at a constant speed of 1 m/s throughout it’s motion. At this constant speed, he travels for 1 hour. So distance = speed x time = 1 m/s x 3600s = 3.6 km.”

No comments:

Post a Comment