Professional Documents
Culture Documents
Tutorial 12
Tutorial 12
1 Flow decomposition
Given a network flow graph having a valid s-t flow F following the conservation and capacity constraints,
i.e., the flow value f (u, v) of each edge (u, v) is given. Design and analyze an O(mn) time algorithm to
compute a set of s-t paths with their corresponding flow values which results in the given flow F .
2 Hunter Survival.
A group of k hunters is sent to a forest to a common location with k copies of a map. The map contains a
directed acyclic route with their common location as the source and a unique target to reach. The vertices
(crossing points of the routes) indicate the food supplies. Each food supply can be used only once and is
sufficient for one hacker until reaching the next food supply. Design and analyze an algorithm to identify if
there exists a routing plan for all of them to reach the target, and report the routes of each hunter if the
plan exists.
4 Escape Plan
Given an undirected graph in the form of an n × n grid, where each vertex (except boundary) has exactly
four neighbours. Given m ≤ n2 starting points on the grid, the aim is to find an escape plan from the m
starting vertices to any m boundary vertices such that we have m such vertex disjoint paths. Design and
analyze an algorithm to compute the escape plan if it exists.
5 Programming
Solve and submit on codechef by end of the week.
• https://www.codechef.com/problems/DECODE12
• https://www.codechef.com/problems/DEM2019A
• https://www.codechef.com/problems/PESTS
• https://www.codechef.com/problems/RIN