Answered step by step
Verified Expert Solution
Question
1 Approved Answer
that is all the information that was given to me. 2. Tree Broadcast: The CEO of a large company has an urgent and important message,
that is all the information that was given to me.
2. Tree Broadcast: The CEO of a large company has an urgent and important message, and she needs to notify every employee by phone. The company hierarchy can be described by a tree T, rooted at the CEO, in which each other node v has a parent node u where u is the direct superior officer of v, and v is a direct subordinate of u. To notify everyone of the message, the CEO 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. The process continues this way until everyone has been notified. (Note that each person in this process can only call direct subordinates on the phone.) We can picture this process as being divided into rounds. In one round, each person who has already learned the message can call one of his or her direct subordinates on the phone. [Interpret T as a digraph (each edge directed from parent to child) given by its adjacency list structure. So, Adj[x] is the list of direct subordinates of employee x.] The number of rounds it takes for everyone to be notified depends on the order in which each person calls their direct subordinates. For example, in Fig (a) below, it will take only two rounds if A starts by calling B, but it will take three rounds if A starts by calling D. a) Consider the instance in Fig (b). Show an optimum solution by labeling each edge by its round number. What is the required minimum number of rounds? CEO Fig (a). Fig (b). b) Define MinRounds(x) to be the minimum number of rounds it takes, counted from the time employee x learns the message, to broadcast the message to all subordinates of x (i.e., all nodes in the subtree rooted at x). Develop a DP recurrence that expresses MinRounds(x) in terms of that of its direct subordinates MinRounds(y), for all yeAdj[x]. 2. Continued: c) Give an efficient algorithm that takes as input a broadcast tree T given by its adjacency list structure, and outputs the minimum number of rounds needed to broadcast a message in T. d) Analyze the worst-case time complexity of your algorithm in (c) as a function of n (# nodes in T). 2. Tree Broadcast: The CEO of a large company has an urgent and important message, and she needs to notify every employee by phone. The company hierarchy can be described by a tree T, rooted at the CEO, in which each other node v has a parent node u where u is the direct superior officer of v, and v is a direct subordinate of u. To notify everyone of the message, the CEO 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. The process continues this way until everyone has been notified. (Note that each person in this process can only call direct subordinates on the phone.) We can picture this process as being divided into rounds. In one round, each person who has already learned the message can call one of his or her direct subordinates on the phone. [Interpret T as a digraph (each edge directed from parent to child) given by its adjacency list structure. So, Adj[x] is the list of direct subordinates of employee x.] The number of rounds it takes for everyone to be notified depends on the order in which each person calls their direct subordinates. For example, in Fig (a) below, it will take only two rounds if A starts by calling B, but it will take three rounds if A starts by calling D. a) Consider the instance in Fig (b). Show an optimum solution by labeling each edge by its round number. What is the required minimum number of rounds? CEO Fig (a). Fig (b). b) Define MinRounds(x) to be the minimum number of rounds it takes, counted from the time employee x learns the message, to broadcast the message to all subordinates of x (i.e., all nodes in the subtree rooted at x). Develop a DP recurrence that expresses MinRounds(x) in terms of that of its direct subordinates MinRounds(y), for all yeAdj[x]. 2. Continued: c) Give an efficient algorithm that takes as input a broadcast tree T given by its adjacency list structure, and outputs the minimum number of rounds needed to broadcast a message in T. d) Analyze the worst-case time complexity of your algorithm in (c) as a function of n (# nodes in T)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started