TournamentΒΆ
Functions concerning tournament graphs.
A tournament graph is a complete oriented graph. In other words, it is a directed graph in which there is exactly one directed edge joining each pair of distinct nodes. For each function in this module that accepts a graph as input, you must provide a tournament graph. The responsibility is on the caller to ensure that the graph is a tournament graph.
To access the functions in this module, you must access them through the
networkx.algorithms.tournament
module:
>>> import networkx as nx
>>> from networkx.algorithms import tournament
>>> G = nx.DiGraph([(0, 1), (1, 2), (2, 0)])
>>> tournament.is_tournament(G)
True
hamiltonian_path (G) |
Returns a Hamiltonian path in the given tournament graph. |
is_reachable (G, s, t) |
Decides whether there is a path from s to t in the tournament. |
is_strongly_connected (G) |
Decides whether the given tournament is strongly connected. |
is_tournament (G) |
Returns True if and only if G is a tournament. |
random_tournament (n) |
Returns a random tournament graph on n nodes. |
score_sequence (G) |
Returns the score sequence for the given tournament graph. |