GraphTheory[SpecialGraphs]
StarGraph
construct star graph
Calling Sequence
Parameters
Description
Examples
StarGraph(n)
n
-
non-negative integer
The StarGraph(n) command returns the star graph with n leaves. Namely it returns the complete bipartite graph CompleteGraph(1,n).
with⁡GraphTheory:
with⁡SpecialGraphs:
G≔StarGraph⁡5
G≔Graph 1: an undirected graph with 6 vertices and 5 edge(s)
IsTree⁡G
true
DrawGraph⁡G
See Also
SpecialGraphs
Download Help Document