SOLUTION AT Australian Expert Writers
1. Today was just a regular day for everyone in Krypton until a news flashed that a meteor is going to destroy Krypton in X days. Krypton has N cities, some of which are connected by bidirectional roads. You are given a road map of Krypton; for every two cities Ci and Cj which are connected by a (direct) road from Ci straight to Cj you are given the value t(i, j) which is the number of days to travel from city Ci to city Cj . (You can of course also go from a city Cm to city Ck without a direct road from Cm to Ck by going through a sequence of intermediate cities connected by direct roads.) In each city Ci the Krypton Government built qi pods to carry inhabitants in case of any calamity, which will transport them to Earth. City Ci has population pi . As soon as the people hear this news they try to save themselves by acquiring these pods either at their own city or in other city before the meteor destroys everything. Note that a pod can carry only one person. Find the largest number of invaders the Earth will have to deal with.Hint: this is a typical Max Flow problem. Each inhabitant of Krypton can access the pods which are either in their own city or in cities which are less than X day’s trip away from their city, so start by determining for each city Ci the set of cities you can reach within X days (what algorithm can you use for this task?). To make the representation compact, make a bipartite graph with vertices corresponding to all cities both on the left and on the right side but with different interpretation: on the left vertices represent populations of the corresponding cities; on the right the vertices represent the set of ponds in the corresponding cities. How do you turn this into a (precisely described) flow network?
- Assignment status: Already Solved By Our Experts
- (USA, AUS, UK & CA Ph. D. Writers)
- CLICK HERE TO GET A PROFESSIONAL WRITER TO WORK ON THIS PAPER AND OTHER SIMILAR PAPERS, GET A NON PLAGIARIZED PAPER FROM OUR EXPERTS
QUALITY: 100% ORIGINAL PAPER – NO PLAGIARISM – CUSTOM PAPER