9.10.5. networkx.algorithms.tournament.random_tournament¶
-
networkx.algorithms.tournament.random_tournament(n)[source]¶ Returns a random tournament graph on n nodes.
Parameters: n : int
The number of nodes in the returned graph.
Returns: bool
Whether the given graph is a tournament graph.
Notes
This algorithm adds, for each pair of distinct nodes, an edge with uniformly random orientation. In other words, binom{n}{2} flips of an unbiased coin decide the orientations of the edges in the graph.