Exercise · Volume 1 · 2.2.5-5
Exercise 2.2.5-5
not stated yet in Lean solution written
| Rating | 20 |
|---|---|
| Kind | K1, prove: show that a stated fact is true from the written solution |
| Section | Section 2.2.5 of Volume 1 |
The task
In Table 1 user 10 arrives on floor 0 at time 1048. Show that if user 10 had arrived on floor 2, the elevator would have gone up after the passengers entered on floor 1, and not down, although user 8 wants to go to floor 0.
The exact wording is in your copy of the book.
Hints
Open one hint at a time. Try the exercise again after each.
Hint 1
Find the state when the doors open at time 1063, using step E2.
Hint 2
Then see what the first user who gets in does.
Solution
Show the solution
At time 1048 the elevator is on floor 1 with state . In the table user 10 sets , and this is a call below the elevator. Therefore at time 1063, in step E2, the state is kept, and the elevator goes down after the boarding.
Now let user 10 arrive on floor 2 instead. Then the new call is , and no call exists below floor 1. At time 1063, in step E2, the state is and there is no call for a floor below. The rule then asks whether some with above floor 1 is set. None is set, since users 7, 8, 9 have not yet entered. So the state becomes , and the call variables of floor 1 are cleared.
Next, at time 1183 user 7 gets in, with destination floor 2. Step U5 sets , and since the state is , it makes the state . Users 8 and 9 enter later. Step U5 changes the state only when it is neutral, so the call from user 8 does not change it. When the doors close, the elevator is in state , and it goes up.
Check
The only changes from the table are the call of user 10 and the state at time 1063, and the argument above uses only steps E2 and U5 of the text.
Remarks
The first person to enter a neutral elevator decides the direction. This is the feature that the exercise shows.
This solution is drafted, and a person has not reviewed it yet. The source.
In Lean
not stated yet The exercise is not stated in Lean yet.
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.