k_factor(G, k, matching_weight='weight')¶
Compute a k-factor of G
A k-factor of a graph is a spanning k-regular subgraph. A spanning k-regular subgraph of G is a subgraph that contains each vertex of G and a subset of the edges of G such that each vertex has degree k.
- GNetworkX graph
- matching_weight: string, optional (default=’weight’)
Edge data key corresponding to the edge weight. Used for finding the max-weighted perfect matching. If key not found, uses 1 as weight.
- G2NetworkX graph
A k-factor of G
“An algorithm for computing simple k-factors.”, Meijer, Henk, Yurai Núñez-Rodríguez, and David Rappaport, Information processing letters, 2009.