Package com.jgalgo

Interface MinimumCutGlobal


  • public interface MinimumCutGlobal
    Global Minimum Cut algorithm without terminal vertices.

    Given a graph \(G=(V,E)\), a cut is a partition of \(V\) into two sets \(C, \bar{C} = V \setminus C\). Given a weight function, the weight of a cut \((C,\bar{C})\) is the weight sum of all edges \((u,v)\) such that \(u\) is in \(C\) and \(v\) is in \(\bar{C}\). There are two variants of the problem to find a minimum weight cut: (1) With terminal vertices, and (2) without terminal vertices. In the variant with terminal vertices, we are given two special vertices source (S) and sink (T) and we need to find the minimum cut \((C,\bar{C})\) such that the source is in \(C\) and the sink is in \(\bar{C}\). In the variant without terminal vertices we need to find the global cut, and \(C,\bar{C}\) simply must not be empty.

    Algorithms implementing this interface compute the global minimum cut without terminal vertices.

    Author:
    Barak Ugav
    See Also:
    Wikipedia
    • Method Detail

      • computeMinimumCut

        Cut computeMinimumCut​(Graph g,
                              WeightFunction w)
        Compute the global minimum cut in a graph.

        Given a graph \(G=(V,E)\), a cut is a partition of \(V\) into twos sets \(C, \bar{C} = V \setminus C\). The return value of this function is the set \(C\), and \(\bar{C}\) can be computed easily by the caller if needed.

        Parameters:
        g - a graph
        w - an edge weight function
        Returns:
        the cut that was computed
        Throws:
        IllegalArgumentException - if the graph has less than two vertices