Let the highest floor of a building be an integer L. There are 2 elevators A and B, where A starts at floor zero and B starts at floor L. If someone presses the elevator button on floor N, the closest lift to that floor N will move to that floor. Neither one of the elevators can move if the other one is moving. If A and B are both at the same distance to floor N, the lift on the lowest floor will move. If both elevators are on the same floor, lift A will move.
How can it be proven that A will never be on a floor higher than B and B will never be on a floor lower than A?
**
my train of thought right now is that this can be proven by showing that B will never be able to move by half or more of the distance between B and A. I don't really know how to prove that though. maybe I could include arithmetic?
I was working on a programming problem when I had this problem. At first, I miswrote something which resulted in some errors. I fixed it and tried experimenting with the code, then I realized that B will never be on a lower floor than A. I then made a sketch on paper to confirm it and thought about how a mathematical proof would be for something like this or what kinds of proofs can be used. Any kind of help or keywords to be searched on google will be appreciated! Thanks!! ///