Suppose we're currently in the middle of some unspecified sporting season and each of a set...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Suppose we're currently in the middle of some unspecified sporting season and each of a set of n teams have some number of wins and losses (w; and li) accumulated in their played games so far. Suppose you also know a(i, j), the remaining number of games to be played between every pair of teams i, and j (note a(i, j) = a(j, i)). Each team plays the same number of games in total in each season; that is, let a(i) = , a(i, j), then for every team i, we have wi + li + a(i) = T. Our goal is to identify all teams who have a possibility of winning the championship by winning the most games in the season. If multiple teams are tied for the same (maximum) number of wins, they are all winners! Give a polynomial time algorithm to determine the set of all teams that can still potentially win the championship. 2. Pruning Branches (15 points). While on a walk, you observe a tree where some branches are dead while others look healthy. You begin to wonder how should one prune away the dead parts of the tree to maximally preserve the live parts? To think about this more formally, you come up with the following question: Given a tree T on the vertices [1, n] rooted at vertex 1, assign each vertex an integer weight w; (note that the weight can be negative). Let the total weight of a subtree rooted at a vertex u be the sum of its vertex weights. We can modify the tree using the prune(u) operation, which removes the entire subtree rooted at a vertex u. Give an algorithm to compute the maximum weight you can achieve for the tree t by performing at most k prune operations. You can assume that the numbering of vertices in the tree ensures that all ancestors a of a node u satisfy a < u. 1. First, give an efficient algorithm for the version of the problem where our goal is to maximize the weight of the tree using an unlimited number of prune operations. (8 points) 2. Next, extend your ideas from the previous part to give an efficient algorithm for computing the maxi- mum weight of the tree obtainable using at most k prune operations. Please assume that the tree is binary for this part of the problem. (7 points) 4. Game Show (20 points). You receive an invitation to participate in a game show, where you encounter a playing field scattered with n balls. Each ball is labeled with a unique identifier i and has an associated value vi (note that vi can be negative). Your objective is to collect a subset of these balls, place them in your bag, and maximize your earnings by the end of the game. The earnings are calculated as max(0, ies vi) dollars, where S is the set of balls you've chosen. To add a twist to the game, there are m additional rules, each falling into one of the following categories: If you pick up ball i but not ball j, you will incur a penalty of x dollars. If you pick up ball i, you are required to also pick up ball j. Your task is to devise a polynomial time algorithm that determines the optimal set of balls to collect in order to maximize your prize money. Hint: Try to model the problem as minimum cut. You should create a flow network such that a cut of the graph represents the money you lose from (1) not picking a ball with positive value (2) picking a ball with negative value and (3) violating a rule, which results in a penalty. 1 Warmup. (20 points) (a) Consider the following flow network. The notation f/c on an edge means that there is f flow already passing through the edge, and that the edge has total capacity c. Is the flow maximum? If it is, state a partition of the vertices defining a minimum s, t cut. If not, list the vertices of an augmenting path and state its capacity. (5 points) S 3/3 a C 4/5 2/2 1/3 1/5 0/5 2/2 b 3/3 4/5 d (b) Consider the following flow network. The notation f/c on an edge means that there is flow already passing through the edge, and that the edge has total capacity c. Is the flow maximum? If it is, state a partition of the vertices defining a minimum s, t cut. If not, list the vertices of an augmenting path and state its capacity. (5 points) 2/3 a C 5/5 2/2 3/3 0/5 0/5 1/2 4/5 b d 4/4 (c) Given two flow networks G, G' such that the max-flow values of both networks is identical, suppose we add 1 to the capacity of every edge in both networks. Do they both still have the same max-flow value? (say Yes or No and briefly explain, i.e., give an example if No) (5 points) (d) Given two flow networks G, G' such that the max-flow values of both networks is identical, suppose we double the capacity of every edge in both networks. Do they both still have the same max-flow value? (say Yes or No and briefly explain, i.e., give an example if No) (5 points) Suppose we're currently in the middle of some unspecified sporting season and each of a set of n teams have some number of wins and losses (w; and li) accumulated in their played games so far. Suppose you also know a(i, j), the remaining number of games to be played between every pair of teams i, and j (note a(i, j) = a(j, i)). Each team plays the same number of games in total in each season; that is, let a(i) = , a(i, j), then for every team i, we have wi + li + a(i) = T. Our goal is to identify all teams who have a possibility of winning the championship by winning the most games in the season. If multiple teams are tied for the same (maximum) number of wins, they are all winners! Give a polynomial time algorithm to determine the set of all teams that can still potentially win the championship. 2. Pruning Branches (15 points). While on a walk, you observe a tree where some branches are dead while others look healthy. You begin to wonder how should one prune away the dead parts of the tree to maximally preserve the live parts? To think about this more formally, you come up with the following question: Given a tree T on the vertices [1, n] rooted at vertex 1, assign each vertex an integer weight w; (note that the weight can be negative). Let the total weight of a subtree rooted at a vertex u be the sum of its vertex weights. We can modify the tree using the prune(u) operation, which removes the entire subtree rooted at a vertex u. Give an algorithm to compute the maximum weight you can achieve for the tree t by performing at most k prune operations. You can assume that the numbering of vertices in the tree ensures that all ancestors a of a node u satisfy a < u. 1. First, give an efficient algorithm for the version of the problem where our goal is to maximize the weight of the tree using an unlimited number of prune operations. (8 points) 2. Next, extend your ideas from the previous part to give an efficient algorithm for computing the maxi- mum weight of the tree obtainable using at most k prune operations. Please assume that the tree is binary for this part of the problem. (7 points) 4. Game Show (20 points). You receive an invitation to participate in a game show, where you encounter a playing field scattered with n balls. Each ball is labeled with a unique identifier i and has an associated value vi (note that vi can be negative). Your objective is to collect a subset of these balls, place them in your bag, and maximize your earnings by the end of the game. The earnings are calculated as max(0, ies vi) dollars, where S is the set of balls you've chosen. To add a twist to the game, there are m additional rules, each falling into one of the following categories: If you pick up ball i but not ball j, you will incur a penalty of x dollars. If you pick up ball i, you are required to also pick up ball j. Your task is to devise a polynomial time algorithm that determines the optimal set of balls to collect in order to maximize your prize money. Hint: Try to model the problem as minimum cut. You should create a flow network such that a cut of the graph represents the money you lose from (1) not picking a ball with positive value (2) picking a ball with negative value and (3) violating a rule, which results in a penalty. 1 Warmup. (20 points) (a) Consider the following flow network. The notation f/c on an edge means that there is f flow already passing through the edge, and that the edge has total capacity c. Is the flow maximum? If it is, state a partition of the vertices defining a minimum s, t cut. If not, list the vertices of an augmenting path and state its capacity. (5 points) S 3/3 a C 4/5 2/2 1/3 1/5 0/5 2/2 b 3/3 4/5 d (b) Consider the following flow network. The notation f/c on an edge means that there is flow already passing through the edge, and that the edge has total capacity c. Is the flow maximum? If it is, state a partition of the vertices defining a minimum s, t cut. If not, list the vertices of an augmenting path and state its capacity. (5 points) 2/3 a C 5/5 2/2 3/3 0/5 0/5 1/2 4/5 b d 4/4 (c) Given two flow networks G, G' such that the max-flow values of both networks is identical, suppose we add 1 to the capacity of every edge in both networks. Do they both still have the same max-flow value? (say Yes or No and briefly explain, i.e., give an example if No) (5 points) (d) Given two flow networks G, G' such that the max-flow values of both networks is identical, suppose we double the capacity of every edge in both networks. Do they both still have the same max-flow value? (say Yes or No and briefly explain, i.e., give an example if No) (5 points)
Expert Answer:
Related Book For
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Posted Date:
Students also viewed these computer network questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
Sentry Transport, Inc., of Atlanta provides in-town parcel delivery services in addition to a full range of passenger services. Sentry engaged in the following activities during the current year: a....
-
Estimate the product of 4,308,229 and 44 to one significant figure (show your work and do not use a calculator), and express the result in standard scientific notation.
-
List the number of valence electrons for each family, and explain the relationship between the number of valence electrons and the resulting chemistry of the elements in the family. a. Alkali metals...
-
Which of the following is a sale of goods and therefore is covered by Article 2 of the Uniform Commercial Code? A. Development, implementation, hosting, and operation of sophisticated computing...
-
Cost centers, profit centers, decentralization, transfer prices. Fenster Corporation manufactures windows with wood and metal frames. Fenster has three departments: Glass, Wood, and Metal. The Glass...
-
1. 49 The value of n(n+n+1) is equal to (10a) [10a-3. The value of (a + ) is n=1 48 47 46 2 1 2. If + + + + + = (2)(3) (3)(4) (4)(5) (48)(49) (49)+(50) k is equal to 3. +++++ Then 4. 5. In a...
-
Blue Spruce Corporation, a public company, is a large silver producer. Selected condensed information (in millions) for Blue Spruce Corporation follows for the year ended September 30, 2021: Cost of...
-
Explain the difference between the coefficient of determination and the adjusted coefficient of determination. Which do you believe provides a better measure of the goodness of fit of a regression?
-
Charlotte Citron exchanged a business building with Darlene Darbey. Charlotte's building had an adjusted basis of $105,000 and a fair market value of $90,000. Darlene's building had an adjusted basis...
-
Peter Paterson transfers an apartment building with an adjusted basis of $160,000 and a fair market value of $235,000 for Charlie Claussen's apartment building (adjusted basis $120,000) with a fair...
-
Carl Cushman, a college professor, age 58, purchased and moved into a house on August 1, 2017. He used the house continuously until September 1, 2018, on which date he went abroad for a one-year...
-
Jim Junction purchased a building business on November 17, 2018, for $400,000. On July 21, 2019, he exchanged the building for another business building in a like-kind exchange. The new building had...
-
Using ketoconazole and haloperidol as examples, explain how drug interactions can occur. Which drugs and how are these drugs likely to be affected by the co-administration of either compound
-
Decades after the event, Johnson & Johnson (J&J), the 130-year-old American multinational, is still praised for swiftly The company indicated that its response was based on the expectations set forth...
-
How many structural isomers are there for hydrocarbons that have the molecular formula C 4 H 10 ? (a) none (b) one (c) two (d) three
-
Which contains more hydrogen atomsa five-carbon saturated hydrocarbon molecule or a five-carbon unsaturated hydrocarbon molecule? (a) The unsaturated hydrocarbon has more hydrogen atoms. (b) The...
-
One solution to the problem of our overflowing landfills is to burn plastic objects instead of burying them. What are some advantages and disadvantages of this practice? (a) disadvantage: toxic air...
Study smarter with the SolutionInn App