[OT] Retreating from Iraq
BCS
ao at pathlink.com
Mon Oct 13 14:54:20 PDT 2008
Reply to Andrei,
> Suppose that a miracle happen and the decision is taken at the highest
> level to retreat all of US military presence from Iraq. That will take
> a while, but sending the orders quickly is a must.
>
> For utmost certainty, all orders are to be sent via phone and down the
> command chain, and only to direct subordinates. Each officer has a
> variable number of subordinates. Initially the president calls his
> immediate subordinates, who call their immediate subordinates, etc.
> Each call can be assumed to take the same amount of time.
>
> Devise an algorithm that ensures every foot soldier gets the news as
> quickly as possible, show it is correct, and show it is fast.
>
> Andrei
>
Sort everyone under you (directly or indirectly) by the number of subordinates
they have. Pick the subordinate with the most subordinates and call the next
man in line to them. remove every subordinate down that chain of command
and repeat.
This assumes that the depth of command is more or less the same across the
board.
More information about the Digitalmars-d
mailing list