Problem 10. Disjoint Roads
A number k of trucking companies, c1 , . . . , ck , want to use a common road system, which
is mod eled as a directed graph, for delivering goods from source locations to a common
target location. Each trucking company ci has its own source location, modeled as a
vertex si in the graph, and the common target location is another vertex t. (All these k + 1
vertices are distinct.)
The trucking companies want to share the road system for delivering their goods, but they
want to avoid getting in each other’s way while driving. Thus, they want to find k edgedisjoint paths in the graph, one connecting each source si to the target t. We assume that
there is no problem if trucks of different companies pass through a common vertex.
Design an algorithm for the companies to use to determine k such paths, if possible, and
otherwise return “impossible”
感兴趣的同学可留言联系我