Question: Recall the ideas explored in Homework Problems - I and its solution. In Problem 8 ( Homework Problems - I ) , we recognized the

Recall the ideas explored in Homework Problems-I and its solution.
In Problem 8(Homework Problems-I), we recognized the possible inefficient use of a w-unit wide doorway, where w>2. A key reason for this was the fact that the robots, that are placed in a straight line, could not tell how many robots there were or determine the part of the door to move to in a collision-free manner.
If robots were transparent, that is every robot can see all robots, then they can systematically take turns to move w robots at a time through distinct parts of the door.
We now recall some details of the problem doorway (n,w) defined in Homework Problems-I. The points robots operate on a ZZ plane (grid) starting and stopping only at grid points. The door of width w is parallel to one of the grid axes (say the horizontal axis, as in Figure 2 of Homework Problems-I). The robots are placed on distinct grid points in a straight line parallel to the door. The robots have lights and run in Look-Compute-Move (LCM) steps.
As outlined in Problems 9,10 of Homework Problems-I, one of the end robots can be identified quickly (on an average) as the leader with a special light color.
11. You are given a swarm of n transparent robots placed in a line with one of the end robots as the leader. Initially, the leader has a blue light and other robots have green lights.
Write a (set of) condition-action pairs that solve drway(n,w) optimally in |~nw~| steps. Explain why your algorithm works (including without collision), and in the above number of steps.
Recall the ideas explored in Homework Problems -

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 Programming Questions!