static int MinEdgeDegree(Choosability.Graph g) { var min = int.MaxValue; for (int v = 0; v < g.N; v++) { for (int w = v + 1; w < g.N; w++) { if (g[v, w]) { var cc = ListUtility.Union(g.Neighbors[v], g.Neighbors[w]).Count; min = Math.Min(min, cc); } } } return(min); }
public Hypergraph <T> Product(Hypergraph <T> other) { return(new Hypergraph <T>(E.SelectMany(e_i => other.E.Select(e_j => ListUtility.Union(e_i, e_j)).ToList()).ToList())); }