An ant begins moving from one end of a 1 km rod towards the other end.
It travels at 1 cm per second.
However, the rod stretches by 1 km every second.
Will the ant be able to make it to the other end? If yes, in how many seconds?
When the rod "stretches", it stretches uniformly.
This way, the distance which has been already traveled by the ant also stretches and the distance which has yet to be traveled also stretches.
After the first second, the ant would have traveled 1 cm. At the end of first second, the rod would stretch by 1 km. So, the 1 cm traveled by the ant also stretches by the same degree and becomes 2 cm.
After one more second, ant travels yet one more second making its distance from the starting point as 2+1 = 3 cm. When the rod now stretches by 1km, this 3 cm becomes = (3/2)*3 = 9/2 cm
After 3 seconds, the situation is: Rod Length = 4 km Distance Travelled by ant = (4.5 + 1)*4/3 = 22/3 cm
Thus, after 'n' seconds, distance traveled by the ant is Dn = ((n+1)/n)*(1 + D(n-1))
The ant is able to reach the destination if after N seconds, DN = 1000*(N+1)
DN = ((N+1)/N) * (1 + (N/(N-1)) * (1 + ((N-1)/(N-2))* (1 + ...(3/2)*(1+2))) )
=> DN = (N+1)/N + (N+1)/(N-1) + (N+1)/(N-2) .... (N+1)/2 + (N+1)
=> 1000*(N+1) = (N+1)*(1 + 1/2 + 1/3 ... 1/N)
=> 1000 = 1 + 1/2 + 1/3 ... 1/N
The series can be thought of equivalent to ln(N)
thus N = e1000
|Tower of Hanoi T|
|Ant on Rod|