Bounded Overtaking Allocation Strategy

The groundsman now starts to get complaints from the better (and more aggressive) players. They are being kept waiting because some novice, who requires a large number of golfballs, is ahead of him in the queue. What is needed is some compromise between giving priority to expert players (requiring fewer golfballs) while preventing novices from waiting forever. One day, when being hit over the head by the golf club of an irate expert, the solution came to him. The policy he adopts is bounded overtaking. A player can be overtaken by not more than k players. In the example below, k = 3.

Unable to load applet

 

Allocator.java

BoundedOvertakingAllocator.java