Question: Entering a Room: Consider a horizontal line ( infinite ) that cuts across Z Z . This represents a wall on the plane. There is

Entering a Room: Consider a horizontal line (infinite) that cuts across ZZ. This represents a wall on the plane. There is a small segment on this line that represents a door. There are several robots on one side of the door (say below the horizontal line with the wall and the door). The other side of the wall represents a room. One may assume that the door is tall enough so that all robots can see it.
The task is to get the robots to through the door as quickly as possible. More specifically, the task is to get the robots to the line segment representing the door (from where they disappear in the next step into the room on the other side).
If w1 robots can simultaneously go through the door (without colliding), then the door is said to be of width w. The above problem with n robots (initially in a line parallel to the door) trying to enter through the door of width w will be denoted by doorway (n,w).
Figure 2 illustrates these ideas.
5. Prove that drway(n,w) requires at least |~nw~| steps to solve, assuming that collisions even if only on the doorway, are not allowed.
6. Consider doorway (n,2), where n1, and the n robots are in a line parallel to the door (as in Figure 2). Use the condition of Problem 4 to write a condition-action pair that moves the two end robots (in the line of robots) through the door without any collision. Figure 2 shows these end robots circled in green.
SOLVE NUMBER #6 PLEASE.
Entering a Room: Consider a horizontal line (

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!