There are k people living in a city, whose n suburbs and m roads can be represented by an unweighted directed graph. Eve
Posted: Fri Jul 08, 2022 7:28 am
There are k people living in a city, whose n suburbsand m roads can be represented by anunweighted directed graph.Every person is either slow or fast. Every night,• Each slow person can stay in the same suburb, or move along aroad to an adjacent suburb.• Each fast person can stay in the same suburb, or move to anyother suburb in the entire city.Over the last d days, you know how many people were located in eachsuburb. That is, for eachday i and suburb j (where 1 ≤ i ≤ d and 1 ≤ j ≤n), you know pi,j, the number of peoplelocatedin suburb j on day i. You are guaranteed that = k for all i.
1) Using maximum flow algorithms such asFord-Fulkerson and Edmonds-Karp.
Design an algorithm which runs in O(d(n + m)) time anddetermines whether there could possibly be at least one slowperson.
1) Using maximum flow algorithms such asFord-Fulkerson and Edmonds-Karp.
Design an algorithm which runs in O(d(n + m)) time anddetermines whether there could possibly be at least one slowperson.