Function ADS::bisection

Function Documentation

inline std::optional<Nodes> ADS::bisection(const Adjacency &G, int k)

a partition of the nodes in two halves cut by at most k edges, or nothing; the half of node 0

Pre:

G is unoriented, i.e., square and symmetric

Post:

a half returned has n / 2 nodes and cuts at most k edges