This is the original question:

There are many sunny days in Boston, MA; but this year, as it happens,
the sprint ROTC picnic at Macrosoft has fallen on a rainy day.  The
ranking officer decides to postpone the picnic and must notify everyone
by phone.  Here is the mechanism she uses to do this.

Each ROTC person on campus except the ranking officer reports to a
unique superior officer.  Thus the reporting hierarchy can be described
by a tree T, rooted  at the ranking officer, in which each other node v
has a parent node u equal to his or her superior officer.  Conversely,
we will call v a direct subordinate of u.

Suppose we have a hierarchy with 4 nodes.  The root node is A, node A's
left child is B, and node A's right child is D; node B has a single
child node C; and node C and D are the leaves.  So, A is the ranking
officer, B and D are the direct subordinates of A, and C is the direct
subordinate of B.

To notify everyone of the postponement, the ranking officer first calls
each of her direct subordinates, one at a time.  As soon as each
subordinate gets the phone call, he or she must notify each of his or
her direct subordinates, one at a time.  This process continues this
way until everyone has been notified.  Note that each person in this
process can only call direct subordinates on the phone; for example, in
the provided 4-node example, A would not be allowed to call C.

We can picture this process as being divided into rounds.  In one
round, each person who has already learned of the postponement can call
one of his or her direct subordinates on the phone.  The number of
rounds it takes for everyone to be notified depends on the sequence in
which each person calls their direct subordinates.  For example, in the
4-node example stated, it will take only two rounds if A starts by
calling B, but it will take three rounds if A starts by calling D.

Give an efficient algorithm that determines the minimum number of
rounds needed for everyone to be notified, and outputs a sequence of
phone calls that achieves this minimum number of rounds.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to