Question: Procedure Rendezvous ( ) / / Initially, there are 2 robots on the x axis, each with a red ? ? ? colored light if

Procedure Rendezvous()
// Initially, there are 2 robots on the x axis, each with a red
??? colored light
if (your own light color is red) then
if (exactly one other robot with a red light is visible) then
Assuming the distance to the other robot is ,
move |??-1(2)??| units towards the other robot, and
change light color to blue, and terminate
end
Very often, the algorithm is expressed as a set of "condition-action" pairs. Typically the
condition is in terms of what a robot sees and the action results in the robot movement
and light setting. Thus evaluation of a condition involves the Look phase and part of the
Compute phase, and performance of the action involves the remainder of the computation
(to determine the new position and light setting) and the action of moving and the light
setting itself.
At each step, a robot that has not terminated, checks the conditions in order, picks the
first condition it satisfies and performs the action associated with that condition. If a robot
does not satisfy any of the conditions, then it performs no action. As an example the above
procedure can be written as the following condition action.
Condition 1: Your own light color is red and you can see exactly one other robot with a
red light.
Action:1 Assuming the other robot is at a distance of 1, move |??-1(2)??| units towards the
other robot, change light color to blue and terminate.
Prove that the above algorithm avoids robot collision and results in the robots finally
being at a distance of at most 2 units.
Procedure Rendezvous ( ) / / Initially, there are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!