Skip to main content
Home
plus.maths.org

Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Main navigation

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • For

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

      Popular topics and tags

      Shapes

      • Geometry
      • Vectors and matrices
      • Topology
      • Networks and graph theory
      • Fractals

      Numbers

      • Number theory
      • Arithmetic
      • Prime numbers
      • Fermat's last theorem
      • Cryptography

      Computing and information

      • Quantum computing
      • Complexity
      • Information theory
      • Artificial intelligence and machine learning
      • Algorithm

      Data and probability

      • Statistics
      • Probability and uncertainty
      • Randomness

      Abstract structures

      • Symmetry
      • Algebra and group theory
      • Vectors and matrices

      Physics

      • Fluid dynamics
      • Quantum physics
      • General relativity, gravity and black holes
      • Entropy and thermodynamics
      • String theory and quantum gravity

      Arts, humanities and sport

      • History and philosophy of mathematics
      • Art and Music
      • Language
      • Sport

      Logic, proof and strategy

      • Logic
      • Proof
      • Game theory

      Calculus and analysis

      • Differential equations
      • Calculus

      Towards applications

      • Mathematical modelling
      • Dynamical systems and Chaos

      Applications

      • Medicine and health
      • Epidemiology
      • Biology
      • Economics and finance
      • Engineering and architecture
      • Weather forecasting
      • Climate change

      Understanding of mathematics

      • Public understanding of mathematics
      • Education

      Get your maths quickly

      • Maths in a minute

      Main menu

    • Home
    • Articles
    • Collections
    • Podcasts
    • Maths in a minute
    • Puzzles
    • Videos
    • Topics and tags
    • Audiences

      • cat icon
        Curiosity
      • newspaper icon
        Media
      • graduation icon
        Education
      • briefcase icon
        Policy

      Secondary menu

    • My list
    • About Plus
    • Sponsors
    • Subscribe
    • Contact Us
    • Log in
    • Robot

      Mad robot

      22 October, 2012
      robot

      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?

      This problem comes from our sister site NRICH, which is packed with challenges, activities and articles for maths learners and teachers.

      We will publish a solution next month.

      Solution link
      Mad robot: Solution
      • Log in or register to post comments

      Anonymous

      22 October 2012

      Permalink
      Comment

      the bot should make logbase2 1000 moves, which is 10 when the ceiling function is used. the robot starts facing north and goes 1000 steps, it then proceeds to go 500 east, 250 south, 125 west, 62.5 north, 31.25 east, 15.625 south, 7.8125 west, 3.90625 north, 1.953125 east. this means that it has gone 1000 - 250+62.5-15.625+3.90625 = 800.78125 north and 500-125+31.25-7.8125+1.953125 = 400.390625 east. this means, via pythag, that the robot has traveled 895.301 to 3dp. he has also gone overall in a direction of 26.57 degrees true.

      • Log in or register to post comments

      Anonymous

      23 October 2012

      In reply to a possible solution by Anonymous

      Permalink
      Comment

      I'd rather prefer a more geometrical approach... For example: let F_1 be the figure formed by the first 4 segments of the robot's journey, F_2 be the figure formed by the segments 5th to 8th , and so on. It is easy to see that a certain (fixed) homothety of center, say, P transforms each F_i into F_{i+1} ; furthermore, P is the intersection of two perpendicular lines r and s which can be found by observing carefully F_1 and F_2 . At the end of each stage, the robot is either on r or on s , and closer and closer to P ... Completing this argument will give you an elegant solution to the problem!

      • Log in or register to post comments

      Anonymous

      23 October 2012

      Permalink
      Comment

      Let's rotate the walk of the mad robot 45 degrees to the left. So it walks up or down along the y-axis and to the right or left along the x-axis. Each time the robot turns 90 degrees it steps forward half the previous step. After the 21e step it stops, because that step is smaller than 0.001. But to calculate easily we let the robot go on forever, after all it doesn't go forward anymore (the steps are too small) and only turns around its axis (it really is a mad robot). Upwarts along the y-axis the robot walks 1000(1 + 1/2^4 + 1/2^8 + ....). An infinite geometric series between the parenthesis. The result is 1000 x 16/15. Downwarts along the y-axis:
      250(1 + 1/2^4 + 1/ 2^8 + ...) = 250 x 16/15. The total walk along the y-axis is also 750 x 16/15 = 800. Along the x-axis, the robot starts with 500, so the covered way along the x-axis is 400, half the covered way along the y-axis. Therefore, the robot reaches the point (400,800). But remember, initially we did rotate its walk, so we have to rotate back 45 degrees. The final destination of the mad robot is (600√2,200√2) or (849,283).

      Hub Boreas

      • Log in or register to post comments

      Anonymous

      9 November 2012

      In reply to The mad robot by Anonymous

      Permalink
      Comment

      Thanks for a solution that doesn't involve logs.

      • Log in or register to post comments

      Anonymous

      27 July 2015

      Permalink
      Comment

      I have solved this by using scratch programming however I had to set the distance to 100 otherwise it wouldn't work. I also divided the minimum distance by 10 and my answer was(84.9,28.3) which is equivalent to (849,283) after multiplying by 10.

      • Log in or register to post comments
      University of Cambridge logo

      Plus Magazine is part of the family of activities in the Millennium Mathematics Project.
      Copyright © 1997 - 2025. University of Cambridge. All rights reserved.

      Terms