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?

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!