Sunday, June 7, 2015

After how many stops will the train be full?

A train can hold 78 passengers. The train starts out empty and picks up 1 passenger at first stop, 2 passengers at the second stop, 3 passengers at the third stop, and so forth. After how many stops will the train be full?

MetroEye: Refer to Preogression02

The sequence in which passengers are picked up is 1,2,3.....
So when the sum of consecutive numbers reach 78, the train will be full.

i.e; 1+2+3+......+N = 78

Here S = 78

N = \(\dfrac{\sqrt{1+8S} -1}{2}\) = \(\dfrac{\sqrt{1+8*78} -1}{2}\) = \(\dfrac{\sqrt{1+624} -1}{2}\) = \(\dfrac{\sqrt{625} -1}{2}\) = \(\dfrac{25-1}{2}\) = 12

=> 1+2+3+4+5+6+7+8+9+10+11+12 = 78

So the train will be full after 12 stops.




No comments :

Post a Comment