![](/content/sites/plus.maths.org/files/styles/small_square/public/abstractpics/5/15_oct_2012_-_1122/robot_icon.jpg?itok=CyVzppm0)
![robot](/content/sites/plus.maths.org/files/puzzle/2012/robot.jpg)
A mad robot sets off towards the North East on a journey from the point (0,0) in a coordinate system. It travels in stages by moving forward and then rotating on the spot. It follows these pseudo-code instructions:
SUB JOURNEY
DISTANCE = 1000
WHILE (DISTANCE > 0.001) MOVE DISTANCE STOP ROTATE(90, DEGREES, CLOCKWISE) DISTANCE = DISTANCE / 2 END WHILE
EXPLODE
END SUB
Where does the robot explode?
Solution
First we find the number of forward turns, noting that the WHILE(DISTANCE > 0.001) condition is evaluated after each halving.
The forward motion, if it occurs, following the $n$th turn will be of distance $1000\times 2^{-n}$. This will occur for each $n$ for which $$1000\times 2^{-n} > 0.001.$$ Taking logs gives $$\log{1000}-n\log{2}>\log{0.001}$$ Rearranging gives $$nThis problem comes from our sister site NRICH, which is packed with challenges, activities and articles for maths learners and teachers.
i think this is a good site
i think this is a good site and great learning activity for young kids