Funny Lift algorithm

on Tuesday, November 17, 2009
I was observing the lifts in our tower, at night they seem to follow a very funny and innovative algorithm.
So lets think about it and compare it with traditional algorithm. So first comes the "Nomenclature":
The new algorithm : Funny algorithm(FA)
The traditional one : Not so Funny algorithm(NFA).
Note : no rights reserved. You can use these names wherever you want.

The NFAs generally are zero logic algorithms, i.e whenever you press the button the nearest lift will come. So in worst case the distance traveled by the lift is twice the total number of floors.

Now how FA works is : say there are three lifts in a 6 floor building so in "idle" case the lifts will stay at particular floors only say 0, 2 and 4. Now that means when i want to go to 0th floor from 3rd floor, the lift at 2nd floor will come and drop me to 0th floor and then as an obedient servant will go again to 2nd floor.....Howzzat(I have seen it).
In this case also the worst case distance traveled is twice the total number of floors but what is best is the waiting time is saved for the person who uses it. :)

SO that is really cool...

1 comments:

Anuprit said...

observation man! Good! Very Good post! refreshing! Keep posting...

Post a Comment