New in Wolfram
Mathematica
8: Graph & Network Analysis
◄
previous
|
next
►
Application Areas
Symbolic Computation on Graphs
Explicit formulas for the number of vertices and edges of parameterized graph constructors.
In[1]:=
X
names = {ButterflyGraph[n, b], CompleteGraph[n], CompleteKaryTree[l, k], CycleGraph[n], DeBruijnGraph[m, n], GridGraph[{Subscript[n, 1], Subscript[n, 2]}], HararyGraph[k, n], HypercubeGraph[n], KaryTree[n], KnightTourGraph[m, n], StarGraph[n], WheelGraph[n] };
In[2]:=
X
FormulaGallery[forms_List] := Module[{vn = Map[VertexCount, forms], en = Map[EdgeCount, forms]}, TraditionalForm@ Grid[Table[{forms[[i]], vn[[i]], en[[i]]}, {i, Length[forms]}], Dividers -> All, Spacings -> {{1, 1, 1}, 2}, BaseStyle -> {FontFamily -> "Verdana"}, Background -> {None, {{Hue[.25, .15, .9], GrayLevel[.9]}}}, FrameStyle -> Directive[Thick, White]]];
In[3]:=
X
Pane[FormulaGallery[names], 500]
Out[3]=