JohnsonGraph - Maple Help

# Online Help

###### All Products    Maple    MapleSim

GraphTheory[SpecialGraphs]

 JohnsonGraph
 construct Johnson graph

 Calling Sequence JohnsonGraph(n,k)

Parameters

 n - positive integer k - nonnegative integer

Description

 • The JohnsonGraph(n, k) command constructs the (n,k) Johnson graph. This is an undirected graph in which the vertices correspond to k-element subsets of {1,…,k}, and an edge exists between two vertices when the intersection of their associated subsets has cardinality k-1.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $\mathrm{with}\left(\mathrm{SpecialGraphs}\right):$
 > $\mathrm{J52}≔\mathrm{JohnsonGraph}\left(5,2\right)$
 ${\mathrm{J52}}{≔}{\mathrm{Graph 1: an undirected unweighted graph with 10 vertices and 30 edge\left(s\right)}}$ (1)
 > $\mathrm{ChromaticNumber}\left(\mathrm{J52}\right)$
 ${5}$ (2)
 > $\mathrm{DrawGraph}\left(\mathrm{J52}\right)$

References

 "Johnson graph", Wikipedia. http://en.wikipedia.org/wiki/Johnson_graph

Compatibility

 • The GraphTheory[SpecialGraphs][JohnsonGraph] command was introduced in Maple 2019.
 • For more information on Maple 2019 changes, see Updates in Maple 2019.

 See Also