 The closure problem takes as input a directed acyclic graph with weights on its vertices and seeks the minimum ( or maximum ) weight of a closure , a set of vertices with no outgoing edges . ( The problem may be formulated for directed graphs without the assumption of <unk> , but with no greater <unk> , because in this case it is equivalent to the same problem on the condensation of the graph . ) It may be solved in polynomial time using a reduction to the maximum flow problem . 
