3 ms·
This is the right idea. At each iteration the ant has less and less actual band to traverse since it is also expanded behind him, where he's already walked. We
by tubbzor 13y ago
This is the right idea. At each iteration the ant has less and less actual band to traverse since it is also expanded behind him, where he's already walked.
We can represent this insight with a series: (1+1/2+...+1/n), as the wiki article states in one of it's approaches. Using Big-O logic, we know a series of this form is a Harmonic Series, and any Harmonic Series is O(log n). This is good news as there is no upper bound and will eventually reach 1 km (...someday).
Alternatively, say the rubber-band doubled every second? The distance the ant must travel is now growing exponentially and he will never get to the other end.
- subpixel 13y ago"At each iteration the ant has less and less actual band to traverse since it is also expanded behind him, where he's already walked." Awesome explanation.