IsTournament - Maple Help

GraphTheory

 IsTournament

 Calling Sequence IsTournament(G)

Parameters

 G - graph

Description

 • IsTournament returns true if the input graph is a tournament. It returns false otherwise.
 • A tournament is a directed graph G that satisfies the following property: for every pair of vertices u and v in G exactly one of the directed edges $\left[u,v\right]$ or $\left[v,u\right]$ is in G.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $\mathrm{T1}≔\mathrm{Digraph}\left(\left\{\left[1,2\right],\left[2,3\right],\left[3,1\right]\right\}\right)$
 ${\mathrm{T1}}{≔}{\mathrm{Graph 1: a directed unweighted graph with 3 vertices and 3 arc\left(s\right)}}$ (1)
 > $\mathrm{IsTournament}\left(\mathrm{T1}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{T2}≔\mathrm{Digraph}\left(\left\{\left[1,2\right],\left[1,3\right],\left[2,3\right],\left[3,1\right]\right\}\right)$
 ${\mathrm{T2}}{≔}{\mathrm{Graph 2: a directed unweighted graph with 3 vertices and 4 arc\left(s\right)}}$ (3)
 > $\mathrm{IsTournament}\left(\mathrm{T2}\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{T3}≔\mathrm{Digraph}\left(\left\{\left[1,2\right],\left[2,3\right]\right\}\right)$
 ${\mathrm{T3}}{≔}{\mathrm{Graph 3: a directed unweighted graph with 3 vertices and 2 arc\left(s\right)}}$ (5)
 > $\mathrm{IsTournament}\left(\mathrm{T3}\right)$
 ${\mathrm{false}}$ (6)