[For Fun] How to: solve a riddle using BYOND! in Off Topic
|
|
First of all, I believe that this riddle best fit into the "Developer How-To" forum instead of any other because, well, it fits the description/requirements of the forum!
If it's meant to be somewhere else, however, please do move it. (As if I had to ask for that, heh).
NASA is trying to launch two robots onto mars so they can construct a station. This is a two robot job, so both robots must work together to build the station. However, they do not have a spaceship big enough to fit both, so decide to launch them separately. Although both rockets will be following the same launch protocols, some error will be inevitable and the robots will land in different positions. Now assume that mars is an endless array of trillions and zillions of squares, stretched side-by-side. Basically, it is an infinite two-dimensional space. Your goal is to program the same algorithm on both robots so when they land, they will start looking for each other, and construct the station together. The robots CANNOT be programmed with different algorithms, and have no means of communication to earth or each other or any entity whatsoever. However, the robots will deploy a parachute when landing, and that parachute will remain in the square they land forever. The robot can detect whether they have found a parachute in the square it is in. Come up with an algorithm so that they will be guaranteed to find each other. (Normal restrictions in programming apply, such as integer overflow: any number larger than 2^32 will be undefined, so if you are keeping a counter and it reaches above that, it will render your algorithm useless.)
Can you solve it using DM?
|
Array is infinite 2D plane, or like a planet - round, so I can walk in circles without changing direction?