HaarGraph - Maple Help

GraphTheory[SpecialGraphs]

 HaarGraph
 construct Haar graph

 Calling Sequence HaarGraph(n)

Parameters

 n - positive integer

Description

 • The HaarGraph(n) function creates the nth Haar graph.
 • The nth Haar graph is a bipartite graph on m = 2*ilog[2](i)+2 vertices in which the vertices u[i] and v[j] are adjacent if the kth digit in the binary expansion of n is nonzero, where k = irem(j-i,m).

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $\mathrm{with}\left(\mathrm{SpecialGraphs}\right):$
 > $W≔\mathrm{HaarGraph}\left(7\right)$
 ${W}{≔}{\mathrm{Graph 1: an undirected unweighted graph with 6 vertices and 9 edge\left(s\right)}}$ (1)
 > $\mathrm{Edges}\left(W\right)$
 $\left\{\left\{{0}{,}{1}\right\}{,}\left\{{0}{,}{3}\right\}{,}\left\{{0}{,}{5}\right\}{,}\left\{{1}{,}{2}\right\}{,}\left\{{1}{,}{4}\right\}{,}\left\{{2}{,}{3}\right\}{,}\left\{{2}{,}{5}\right\}{,}\left\{{3}{,}{4}\right\}{,}\left\{{4}{,}{5}\right\}\right\}$ (2)
 > $\mathrm{DrawGraph}\left(W\right)$

Compatibility

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