Graph Theory37 sections · 1633 units
Open in Course

Problem - Police Chase

(CSES 1695)

You are given a city map with nn intersections and mm roads. Each road is bidirectional. The police want to block some roads to prevent criminals from reaching intersection nn from intersection 11. What is the minimum number of roads they need to block?

Output that number and list the roads to block. This is a minimum ss-tt cut problem where s=1s = 1 and t=nt = n. Each road has capacity 11. You are finding the smallest set of roads whose removal disconnects the source from the destination.