Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

networkx.algorithms.cuts.edge_expansion

edge_expansion(G, S, T=None, weight=None)[source]

Returns the edge expansion between two node sets.

The edge expansion is the quotient of the cut size and the smaller of the cardinalities of the two sets. [1]

Parameters:
  • G (NetworkX graph)
  • S (sequence) – A sequence of nodes in G.
  • T (sequence) – A sequence of nodes in G.
  • weight (object) – Edge attribute key to use as weight. If not specified, edges have weight one.
Returns:

The edge expansion between the two sets S and T.

Return type:

number

References

[1]Fan Chung. Spectral Graph Theory. (CBMS Regional Conference Series in Mathematics, No. 92), American Mathematical Society, 1997, ISBN 0-8218-0315-8 <http://www.math.ucsd.edu/~fan/research/revised.html>