The Rat Race

Now there is a wall 5 feet thick and two rats tunnel from opposite sides.  On the first day, the big rat tunnels 1 foot and the small rat also tunnels 1 foot.  The big rat then doubles its daily rate and the small rat halves its rate.  Tell the number of days until the rats meet.

Jiuzhang Suanshu (The Nine Chapters on the Mathematical Art), c. 100 BCE

Click here to reveal the answer