Problem:
Let G = (V, E) be a directed graph on n> = 3 vertices with m edges. The set of vertices V includes three special vertices a, v, and b. Find a simple path from a to b through v if it exists. (A simple path is a path without duplicate vertices.)
I believe that this problem should / can be solved using the Max Flow algorithm, but I'm not sure how to do it. This reminds me of the Max Flow algorithm with several sources, where the edges have a capacity of 1. Does anyone know how the problem can be reduced to the maximum flow algorithm?
If I set vertex b as a receiver, I cannot be sure that it will include v. If I set v as a receiver, how can I continue when v is reached?
algorithm graph
Mads andersen
source share