({{, (RefLink[GraphData, paclet:ref/GraphData])[name]
gives a graph with the specified name.}, {, (RefLink[GraphData, paclet:ref/GraphData])[name,"property"]
gives the value for the specified property for a named graph.}, {, (RefLink[GraphData, paclet:ref/GraphData])["class"]
gives a list of available named graphs in the specified class.}, {, (RefLink[GraphData, paclet:ref/GraphData])[n]
gives a list of available named graphs with n vertices.}})

OpenersNotesSection(Spacer1)Details

Graphs can be specified by standard names such as "PetersenGraph" and "FosterCage".

(RefLink[GraphData, paclet:ref/GraphData])[patt] gives a list of all graph names that match the string pattern patt.

(RefLink[GraphData, paclet:ref/GraphData])[] gives a list of all standard named graphs. (RefLink[GraphData, paclet:ref/GraphData])[(RefLink[All, paclet:ref/All])] gives all available graphs.

(RefLink[GraphData, paclet:ref/GraphData])[name] gives a (RefLink[Graph, paclet:ref/Graph]) object.

(RefLink[GraphData, paclet:ref/GraphData])[{n,i},…] gives data for the i(^th) simple graph with n vertices.

(RefLink[GraphData, paclet:ref/GraphData])[{"type",id},…] gives data for the graph of the specified type with identifier id. The identifier is typically an integer or lists of integers.

(RefLink[GraphData, paclet:ref/GraphData])[;;n] gives a list of available standard named graphs with ≤n vertices.

(RefLink[GraphData, paclet:ref/GraphData])[m;;n] gives a list of available standard named graphs with m through n vertices.

(RefLink[GraphData, paclet:ref/GraphData])["class",n] etc. gives a list of available graphs with n vertices etc. in the specified class.

(RefLink[GraphData, paclet:ref/GraphData])["Classes"] gives a list of all supported classes.

(RefLink[GraphData, paclet:ref/GraphData])["Properties"] gives a list of properties available for graphs.

Basic graph properties include:

Properties related to graph connectivity include:

Properties related to graph display include:

Properties returning (RefLink[Graph, paclet:ref/Graph]) objects include:

Annotatable properties related to list-type output include:

Properties giving pure functions representing graph polynomials include:

Coloring-related graph properties include:

Graph index properties include:

Local graph properties include:

Global graph properties include:

Topological graph properties include:

Clique-related properties include:

Cover-related properties include:

Independent set-related properties include:

Irredundant set-related properties include:

Dominating set-related properties include:

Symmetry-related properties include:

Information-related properties include:

Path- and cycle-related properties include:

Graph centralities include:

Naming-related properties include:

Notation-related properties include:

(RefLink[GraphData, paclet:ref/GraphData])["class"] gives a list of named graphs in the specified class. (RefLink[GraphData, paclet:ref/GraphData])[name,"class"] gives (RefLink[True, paclet:ref/True]) or (RefLink[False, paclet:ref/False]), depending on whether the graph corresponding to name is in the specified class.

(RefLink[GraphData, paclet:ref/GraphData])[name,"Classes"] gives a list of the classes in which the graph corresponding to name appears.

Basic classes of graphs include:

Classes based on vertex degrees include:

Classes based on traversals include:

Classes based on chess boards include:

Classes based on symmetry and regularity include:

Classes based on forbidden graphs include:

Special classes include:

Classes associated with polyhedra include:

Special classes of trees and their generalization include:

Classes of graphs indexed by one or more integers include:

(RefLink[GraphData, paclet:ref/GraphData])[name,"property","type"] gives a set of specific graphs, images, or embeddings, where in 2D "type" may include "3D", "All", "Circulant", "Circular", "Degenerate",  "Gear", "GeneralizedPetersen", "Grid", "Halin", "IGraph", "IntegerCoordinates", "Integral", "LCF", "Linear", "Matchstick", "MinimalCrossing", "MinimalIntegral", "MinimalPlanarIntegral", "MinimalRectilinearCrossing", "Perspective", "Planar", "Polyiamond", "Polyomino", "Primary", "Torus", "TriangularGrid", "UnitDistance", and "XYZ"; and in 3D "type" may include "Grid", "IntegerCoordinates", "Integral", "Polyhedron", "Primary", "TetrahedralGrid", "UnitDistance", and "XYZ".

Type properties related to graph display include:

(RefLink[GraphData, paclet:ref/GraphData])[name,"property","outputtype"] gives graph properties in the format specified by "outputtype", which, depending on "property", may be "All", "Count", "Directed", "Edge", "Entity", "Graph", "Graphics", "Group", "Image", "Labeled", "List", "Name", "Pair", "Polyhedron", "Rule", or "Undirected".

Output type properties related to graph output include:

(RefLink[GraphData, paclet:ref/GraphData])[name,"property","ann"] or (RefLink[GraphData, paclet:ref/GraphData])["property","ann"] gives various annotations associated with a property. Typical annotations include:

Using (RefLink[GraphData, paclet:ref/GraphData]) may require internet connectivity.

OpenersPrimaryExamplesSection(Spacer1)Examples  (566)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Return the Pappus graph:

GraphData["PappusGraph"]

Show all available 3D embeddings of the graph:

Multicolumn[GraphData["PappusGraph","Graph","All"],4]

Show the spectrum of the icosahedral graph:

GraphData["IcosahedralGraph","Spectrum"]

Generate a list of named snark graphs:

DeleteCases[GraphData["Snark"],{"Snark",_}]

OpenersExampleSection1(Spacer1)Scope  (536)

OpenersExampleSubsection0(Spacer1)Names and Classes  (7)

Obtain a list of all standard implemented graphs:

GraphData[]//Short[#,4]&

Length[%]

Obtain a list of all implemented graphs:

GraphData[All]//Short[#,4]&

Length[%]

Find the English name of a graph:

GraphData["CubicalGraph","Name"]

A list of alternate names can also be found:

GraphData["CubicalGraph","AlternateNames"]

Additional names acceptable as input can be found:

GraphData["CubicalGraph","AlternateStandardNames"]

GraphData[{"Hypercube",3},"StandardName"]

Find the list of graph classes:

GraphData["Classes"]

Find the list of named graphs belonging to a class:

Cases[GraphData["Snark"],_String]

GraphData["Cage"]

Test whether a graph belongs to a class:

GraphData["CubicalGraph","Cage"]

OpenersExampleSubsection1(Spacer1)Properties and Annotations  (2)

Get a list of properties for a particular graph:

GraphData["HeawoodGraph","Properties"]//Short[#,4]&

Get a short textual description of a property:

GraphData["Snark","Description"]

Get a longer textual description:

GraphData["Snark","LongDescription"]

OpenersExampleSubsection2(Spacer1)Property Values  (4)

The values of properties may take a variety of forms as Wolfram Language expressions:

GraphData["OctahedralGraph","HamiltonianCycleCount"]

GraphData["OctahedralGraph","HamiltonianCycles"]

Length[%]

GraphData["OctahedralGraph","AdjacencyMatrix"]

Normal[%]//MatrixForm

GraphData["OctahedralGraph","Edges","Rule"]

GraphData["DodecahedralGraph","ChromaticPolynomial"][x]//TraditionalForm

A property that is not available for a graph has the value (RefLink[Missing, paclet:ref/Missing])["NotAvailable"]:

GraphData["SixHundredCellGraph","ChromaticPolynomial"]

Some graph properties may be (RefLink[Missing, paclet:ref/Missing]) but still include partial information:

GraphData[{"Apollonian",4},"CyclePolynomial"]

GraphData["SixHundredCellGraph","HamiltonianCycles"]

A property whose value is too large to include has the value (RefLink[Missing, paclet:ref/Missing])["TooLarge"]:

GraphData[{"Hypercube",5},"HamiltonianCycles"]

GraphData[{"Hypercube",5},"HamiltonianCycleCount"]

OpenersExampleSubsection3(Spacer1)Detailed Properties  (523)

OpenersExampleSubsubsection0(Spacer1)Basic Graph Properties  (12)

Give the adjacency matrix, returned as a (RefLink[SparseArray, paclet:ref/SparseArray]) object:

a=GraphData["CubicalGraph","AdjacencyMatrix"]

Convert to an explicit matrix:

Normal[a]

a//MatrixForm

Plot the matrix using (RefLink[ArrayPlot, paclet:ref/ArrayPlot]):

ArrayPlot[a]

Verify that the positions of 1s in the adjacency matrix correspond to graph edges:

UndirectedEdge@@@Union[Sort/@Position[Normal[GraphData["CubicalGraph","AdjacencyMatrix"]],1]]

GraphData["CubicalGraph","Edges"]

%==%%

List the number of distinct adjacency matrices possible for the cubical graph:

GraphData["DiamondGraph"]

GraphData["DiamondGraph","AdjacencyMatrixCount"]

Return the distance matrix of the octahedral graph:

d=GraphData["TetrahedralGraph","DistanceMatrix"]

Normal[d]//TraditionalForm

MatrixPlot[d]

Return the number of edges of the octahedral graph:

GraphData["OctahedralGraph","EdgeCount"]

Compare with taking the length of the edge list:

GraphData["OctahedralGraph","Edges"]//Length

Return the edges of the octahedral graph:

GraphData["OctahedralGraph","Graph","Labeled"]

GraphData["OctahedralGraph","Edges"]

Give the face count of the octahedral graph:

GraphData["OctahedralGraph","FaceCount"]

Give the faces of the octahedral graph:

GraphData["OctahedralGraph","Graph","Labeled"]

GraphData["OctahedralGraph","Faces"]

Give the incidence matrix of the octahedral graph:

i=GraphData["OctahedralGraph","IncidenceMatrix"]

Give it in expanded form:

Normal[i]//TraditionalForm

Plot the matrix:

MatrixPlot[i]

Give the Laplacian matrix of the octahedral graph:

l=GraphData["OctahedralGraph","LaplacianMatrix"]

Give it in expanded form:

Normal[l]//TraditionalForm

Plot the matrix:

MatrixPlot[l]

Give the normalized Laplacian matrix of the octahedral graph:

l=GraphData["OctahedralGraph","NormalizedLaplacianMatrix"]

Give the matrix in expanded form:

Normal[l]//TraditionalForm

Plot the matrix:

MatrixPlot[l]

Give the number of vertices of the octahedral graph:

GraphData["OctahedralGraph","VertexCount"]

Return the vertices of the octahedral graph:

GraphData["OctahedralGraph","Graph","Labeled"]

GraphData["OctahedralGraph","Vertices"]

OpenersExampleSubsubsection1(Spacer1)Properties Related to Graph Connectivity  (11)

Give the algebraic connectivity of the octahedral graph:

GraphData["OctahedralGraph","AlgebraicConnectivity"]

Algebraic connectivity is defined as the second smallest member of the Laplacian spectrum:

GraphData["OctahedralGraph","LaplacianSpectrum"]

%[[2]]

List all connected graphs:

GraphData["Connected"]//Short[#,5]&

List connected graphs on five vertices:

GraphData["Connected",5]

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@SortBy[GraphData["Connected",;;5],GraphData[#,"V"]&],10]]

Check if the graph (Subscript[C, 3]) is connected:

GraphData["TriangleGraph"]

GraphData["TriangleGraph","Connected"]

Check if the graph 2(Subscript[C, 3]) is connected:

GraphData["2C3"]

GraphData["2C3","Connected"]

Return the number of connected components in the 2(Subscript[C, 3]) graph:

GraphData["2C3","ConnectedComponentCount"]

Do the same using the "Count" annotation:

GraphData["2C3","ConnectedComponents","Count"]

Return the connected components of the 2(Subscript[C, 3]) graph:

GraphData["2C3","ConnectedComponents"]

List the names of the connected components:

GraphData["2C3","ConnectedComponents","Name"]

List the indices of connected components:

GraphData["2C3","Graph","Labeled"]

GraphData["2C3","ConnectedComponents","List"]

Give the number of connected induced subgraphs of the diamond graph:

GraphData["DiamondGraph","ConnectedInducedSubgraphCount"]

Compare with the value obtained from the connected induced subgraph polynomial:

GraphData["DiamondGraph","ConnectedInducedSubgraphPolynomial"]

%[1]

Display the diamond graph and compare the above counts with those computed from scratch:

GraphData["DiamondGraph","Graph","Labeled"]

With[{g=GraphData["DiamondGraph"]},Select[Subsets[VertexList[g],{1,∞}],ConnectedGraphQ[Subgraph[g,#]]&]]

Length[%]

Give the connected induced subgraph polynomial of the diamond graph:

GraphData["DiamondGraph","ConnectedInducedSubgraphPolynomial"]

CoefficientList[%[x],x]

Compare to the actual subgraphs:

GraphicsGrid[cis=SplitBy[Select[Subgraph[GraphData["DiamondGraph"],#]&/@Subsets[GraphData["DiamondGraph","Vertices"],{1,Infinity}],ConnectedGraphQ],VertexCount],Dividers->All]

Length/@cis

List disconnected graphs on five vertices:

GraphData["Disconnected",5]

Check if the graph (Subscript[C, 3]) is disconnected:

GraphData["TriangleGraph","Disconnected"]

Check if the graph 2(Subscript[C, 3]) is disconnected:

GraphData["2C3","Disconnected"]

Find the edge connectivity of a complete binary tree of order 4:

GraphData[{"CompleteTree",{2,4}},"EdgeConnectivity"]

GraphData[{"CompleteTree",{2,4}}]

Give spanning trees for the tetrahedral graph:

GraphicsGrid[Partition[GraphData["TetrahedralGraph","SpanningTrees"],UpTo[5]],Dividers->All]

List triangulated graphs known to (RefLink[GraphData, paclet:ref/GraphData]):

GraphData["Triangulated"]

Give the vertex connectivity of Tietze's graph:

GraphData["TietzesGraph","VertexConnectivity"]

OpenersExampleSubsubsection2(Spacer1)Properties Related to Graph Display  (11)

Show the default embedding of the octahedral graph:

GraphData["OctahedralGraph"]

Show classes of tabulated 2D embeddings of the cubical graph:

GraphData["CubicalGraph","EmbeddingClasses"]

GraphicsGrid[Partition[Show[#1,PlotLabel->TextCell[Column[#2/.{}->{"(none)"},Alignment->Center,BaseStyle->9]]]&@@@Transpose[{GraphData["CubicalGraph","Graph","All"],GraphData["CubicalGraph","EmbeddingClasses"]}],UpTo[5]],Dividers->All]

Show classes of known 3D embeddings of the cubical graph:

GraphData["CubicalGraph","EmbeddingClasses3D"]

GraphicsGrid[{GraphData["CubicalGraph","Graph",{"3D","All"}],GraphData["CubicalGraph","EmbeddingClasses","3D"]},Dividers->All,ImageSize->Large]

List the known 2D embeddings of the octahedral graph:

GraphData["OctahedralGraph","Embeddings"]

List the known 3D embeddings of the octahedral graph:

GraphData["OctahedralGraph","Embeddings","3D"]

Show the default embedding of the octahedral graph:

GraphData["OctahedralGraph","Graph"]

Show the default 3D embedding of the octahedral graph:

GraphData["OctahedralGraph","Graph","3D"]

Show a labeled version:

GraphData["OctahedralGraph","Graph",{"3D","Labeled"}]

Give all cataloged 3D embeddings of the cubical graph:

GraphicsGrid[Partition[GraphData["CubicalGraph","Graph",{"3D","All"}],UpTo[5]]]

Show a graphic of the octahedral graph:

GraphData["OctahedralGraph","Graphics"]

Show a labeled version:

GraphData["OctahedralGraph","Graphics","Labeled"]

Give all cataloged embeddings of the octahedral graph as graphics:

GraphicsGrid[Partition[GraphData["OctahedralGraph","Graphics","All"],UpTo[5]]]

Show a 3D graphic of the octahedral graph:

GraphData["OctahedralGraph","Graphics3D"]

Show a labeled version:

GraphData["OctahedralGraph","Graphics3D","Labeled"]

Give all cataloged embeddings of the cubical graph as 3D graphics:

GraphData["CubicalGraph","Graphics3D","All"]

Show an image of the default embedding of the octahedral graph:

GraphData["OctahedralGraph","Image"]

Show the three-dimensional embedding of the cubical graph as an image:

GraphData["CubicalGraph","Image","3D"]

Show the Nauru graph as a mesh region:

GraphData["NauruGraph","MeshRegion"]

Head[%]

Label the mesh:

GraphData["NauruGraph","MeshRegion","Labeled"]

Show all available embeddings as mesh regions:

GraphicsGrid[Partition[GraphData["NauruGraph","MeshRegion","All"],UpTo[5]]]

Show a mesh region embedded in 3D:

GraphData["NauruGraph","MeshRegion","3D"]

Head[%]

Return the vertex coordinates for the default embedding of the octahedral graph:

GraphData["OctahedralGraph","VertexCoordinates"]

Plot the vertices:

Graphics[{Blue,AbsolutePointSize[5],Point[%]},Frame->True,FrameTicks->None]

GraphData["OctahedralGraph"]

Show vertex coordinates for all cataloged embeddings:

GraphData["OctahedralGraph","VertexCoordinates","All"]

OpenersExampleSubsubsection3(Spacer1)Properties Returning Graph Objects  (11)

Return the bipartite double graph of the Clebsch graph:

GraphData["ClebschGraph","BipartiteDoubleGraph"]

Give the standard name of the bipartite double graph:

GraphData["ClebschGraph","BipartiteDoubleGraph","Name"]

Return the cubical graph in canonical form:

g1=GraphData["CubicalGraph","CanonicalGraph"]

g2=GraphData["CubicalGraph"]

The edge lists are not necessarily the same:

EdgeList/@{g1,g2}

Verify the graphs are isomorphic:

IsomorphicGraphQ[g1,g2]

Return the cochromatic graphs of the claw graph:

GraphData["ClawGraph","CochromaticGraphs"]

Return the graph complement of the icosahedral graph:

GraphData["IcosahedralGraph","ComplementGraph"]

Return the connected components graph of the (Subscript[C, 3])⋃(Subscript[C, 4]) graph:

GraphData["C4+C3","ConnectedComponents"]

Show coresistance graphs:

GraphData[{9,58},"CoresistanceGraphs"]

Return a graph object for the dual graph of the icosahedral graph:

GraphData["IcosahedralGraph","DualGraph"]

Return a graph object for the icosahedral graph:

GraphData["IcosahedralGraph","Graph"]

This is also the default property for graphs:

GraphData["IcosahedralGraph"]

Return a 3D graph object for the icosahedral graph:

GraphData["IcosahedralGraph","Graph","3D"]

Return the line graph of the icosahedral graph:

GraphData["IcosahedralGraph","LineGraph"]

Return the local graph of the Conway–Smith graph:

GraphData["ConwaySmithGraph","LocalGraph"]

OpenersExampleSubsubsection4(Spacer1)Annotatable Properties Related to Graph Output  (11)

Return groups whose Cayley graphs generate the cubical graph using the default output type:

GraphData["CubicalGraph","CayleyGraphGeneratingGroups"]

Return them explicitly as groups:

GraphData["CubicalGraph","CayleyGraphGeneratingGroups","Group"]

Return (RefLink[FiniteGroupData, paclet:ref/FiniteGroupData]) standard names whose Cayley graphs generate the cubical graph:

GraphData["CubicalGraph","CayleyGraphGeneratingGroups","Name"]

Return (RefLink[FiniteGroupData, paclet:ref/FiniteGroupData]) entities whose Cayley graphs generate the cubical graph:

GraphData["CubicalGraph","CayleyGraphGeneratingGroups","Entity"]

Give cochromatic graphs of the claw graph:

GraphData["ClawGraph","CochromaticGraphs"]

GraphData/@{"Claw",{"Path",4}}

Return the names of the cochromatic graphs:

GraphData["ClawGraph","CochromaticGraphs","Name"]

Verify these share the same chromatic polynomial:

GraphData[#,"ChromaticPolynomial"][x]&/@{"ClawGraph",{"Path",4}}

Equal@@%

Show graph names for graphs that are cochromatic with the 5-star graph:

GraphData[{"Star",5},"CochromaticGraphs","Name"]

Grid[{#,GraphData[#,"ChromaticPolynomial"][x]}&/@{{"Star",5},"ForkGraph",{"Path",5}},Alignment->Left,Dividers->All]

GraphicsGrid[{GraphData/@{{"Star",5},"ForkGraph",{"Path",5}}}]

Give the names of graphs cochromatic with the bull graph:

GraphData["BullGraph","CochromaticGraphs","Name"]

cp=GraphData["BullGraph","ChromaticPolynomial"]

Select[GraphData[All],GraphData[#,"ChromaticPolynomial"]===cp&]

GraphicsGrid[{GraphData/@%}]

Return the graph complement of the icosahedral graph:

GraphData["IcosahedralGraph","ComplementGraph"]

Do the same using the annotation "Graph":

GraphData["IcosahedralGraph","ComplementGraph","Graph"]

Return as an (RefLink[Image, paclet:ref/Image]):

GraphData["IcosahedralGraph","ComplementGraph","Image"]

Return as a (RefLink[Graphics, paclet:ref/Graphics]) object:

GraphData["IcosahedralGraph","ComplementGraph","Graphics"]

Give the name of the complement graph:

GraphData["IcosahedralGraph","ComplementGraph","Name"]

Return the entity corresponding to the complement graph:

GraphData["IcosahedralGraph","ComplementGraph","Entity"]

Show the graph names for the complement of graphs on four or fewer vertices:

TableForm[{#,GraphData[#,"ComplementGraph","Name"]}&/@GraphData[;;4],TableDepth->2]

The complement graph name of a self-complementary graph is identical to the StandardName:

(scc=GraphData["SelfComplementary",;;10])//Short

Show graph and complement names (should be the same) for "interesting" small self-complementary graphs:

Grid[{#,GraphData[#,"ComplementGraph","Name"]}&/@DeleteCases[scc,{"SelfComplementary",_}],Dividers->All]

Return the connected components graph of the (Subscript[C, 4])⋃(Subscript[C, 3]) graph:

GraphData["C4+C3","ConnectedComponents"]

Return the indices of the connected components:

GraphData["C4+C3","Graph","Labeled"]

GraphData["C4+C3","ConnectedComponents","List"]

Return the names of the connected components:

GraphData["C4+C3","ConnectedComponents","Name"]

Show coresistance graphs:

GraphData["2K1,3+K1","CoresistanceGraphs"]

Do the same using the "Graph" annotation:

GraphData["2K1,3+K1","CoresistanceGraphs","Graph"]

Get the names of the coresistance graphs:

GraphData["2K1,3+K1","CoresistanceGraphs","Name"]

Show the graph and its coresistance graph together:

With[{g="2K1,3+K1"},Prepend[GraphData[g,"CoresistanceGraphs"],GraphData[g]]]

Verify that the graphs in question have the same resistance sets:

Equal@@(Sort[Flatten[Normal[GraphData[#,"ResistanceMatrix"]]]]&/@{"2K1,3+K1","2P2+K1,4"})

Show graphs that share a resistance multiset with at least one other distinct graph:

GraphData["NotDeterminedByResistance"]//Short[#,10]&

List the names of graphs sharing the same multiset of resistances with a given graph:

GraphData[{"ResistanceEquivalent",{20,1}},"CoresistanceGraphs","Name"]

Display these graphs:

GraphData/@{{"ResistanceEquivalent",{20,1}},{"ResistanceEquivalent",{20,2}}}

Show graph names for graphs that are equivalent with a particular 20-vertex graph:

GraphData[{"ResistanceEquivalent",{20,1}}]

GraphData[{"ResistanceEquivalent",{20,1}},"CoresistanceGraphs","Name"]

GraphData/@%

Return the cospectral graphs of the tesseract graph using the default output type:

GraphData["TesseractGraph","CospectralGraphs"]

Return the cospectral graphs of the tesseract graph explicitly as a graph:

GraphData["TesseractGraph","CospectralGraphs","Graph"]

Return the standard names:

GraphData["TesseractGraph","CospectralGraphs","Name"]

Return graphics:

GraphData["TesseractGraph","CospectralGraphs","Graphics"]

Return entities:

GraphData["TesseractGraph","CospectralGraphs","Entity"]

Return images:

GraphData["TesseractGraph","CospectralGraphs","Image"]

Give the names of graphs cospectral with the Shrikhande graph:

GraphData["ShrikhandeGraph","CospectralGraphs","Name"]

Show graph names for graphs that are cospectral with the tesseract graph:

GraphData["TesseractGraph","CospectralGraphs","Name"]

GraphData[#,"Spectrum"]&/@{"TesseractGraph","HoffmanGraph"}

GraphData/@{"TesseractGraph","HoffmanGraph"}

Return a graph object for the dual graph of the icosahedral graph:

GraphData["IcosahedralGraph","DualGraph"]

Return the name:

GraphData["IcosahedralGraph","DualGraph","Name"]

GraphData[%]

Not all graphs have unique duals:

GraphData["FruchtGraph","DualGraph"]

Show the graph name for the graph that is dual to the icosahedral graph:

GraphData["IcosahedralGraph","DualGraph","Name"]

It is in turn dual to the icosahedral graph:

GraphData["DodecahedralGraph","DualGraph","Name"]

List graphs with a tabulated graph dual:

GraphData["DualGraphName","Defined"]//Short[#,10]&

Display the Johnson solid (Subscript[J, 8]) skeleton:

GraphData[{"JohnsonSkeleton",8}]

Verify that it is dual to itself:

GraphData[{"JohnsonSkeleton",8},"DualGraph","Name"]

Tabulate cataloged self-dual graphs:

Grid[{#,GraphData[#,"DualGraph","Name"]}&/@GraphData["SelfDual"],Dividers->All]

Return the line graph of the icosahedral graph:

GraphData["IcosahedralGraph","LineGraph"]

Return the name of the line graph:

GraphData["IcosahedralGraph","LineGraph","Name"]

GraphData[%]

Give the name of the line graph for the Petersen graph:

GraphData["PetersenGraph","LineGraphName"]

GraphData/@{"PetersenGraph","PetersenLineGraph"}

Give the names of the line graphs of the Platonic graphs:

lg=GraphData[#,"LineGraph","Name"]&/@GraphData["Platonic"]

Show the Platonic graphs and their line graphs:

GraphicsGrid[{GraphData/@GraphData["Platonic"],GraphData/@lg}]

Show the graph names for the line graphs of non-empty graphs on four or fewer vertices:

TableForm[{#,GraphData[#,"LineGraph","Name"]}&/@GraphData["Nonempty",;;4],TableDepth->2]

Taking the line graph twice does not in general give back the original graph:

GraphData["PawGraph","LineGraph","Name"]

GraphData["DiamondGraph","LineGraph","Name"]

The line graph of a graph is isomorphic to itself only for cycle graphs or unions of identical cycle graphs:

SortBy[Select[GraphData[All],GraphData[#,"LineGraph","Name"]===#&],GraphData[#,"V"]&]

Return the local graph of the Conway–Smith graph:

GraphData["ConwaySmithGraph","LocalGraph"]

Return the name of the local graph:

GraphData["ConwaySmithGraph","LocalGraph","Name"]

GraphData[%]

Return polyhedra whose skeletons are isomorphic to the cubical graph using the default output type:

GraphData["CubicalGraph","PolyhedralEmbeddings"]

Return explicitly as (RefLink[PolyhedronData, paclet:ref/PolyhedronData]) standard names:

GraphData["CubicalGraph","PolyhedralEmbeddings","Name"]

Return them as polyhedra:

GraphData["CubicalGraph","PolyhedralEmbeddings","Polyhedron"]

Return them as entities:

GraphData["CubicalGraph","PolyhedralEmbeddings","Entity"]

OpenersExampleSubsubsection5(Spacer1)Annotatiable Properties Related to List-Type Output  (10)

Give the adjacency matrix of the default embedding for the square graph:

GraphData["SquareGraph","Graph","Labeled"]

MatrixForm@GraphData["SquareGraph","AdjacencyMatrix"]

Give the number of possible adjacency matrices:

GraphData["SquareGraph","AdjacencyMatrixCount"]

Return the same using the "Count" annotation:

GraphData["SquareGraph","AdjacencyMatrix","Count"]

Give all possible adjacency matrices:

MatrixForm/@GraphData["SquareGraph","AdjacencyMatrix","All"]

Length[%]

Give (undirected) cycles of the house graph:

GraphData["HouseGraph","Graphics","Labeled"]

GraphData["HouseGraph","Cycles"]

Do the same using the explicit "Undirected" annotation:

GraphData["HouseGraph","Cycles","Undirected"]

Give directed cycles:

GraphData["HouseGraph","Cycles","Directed"]

Give count of undirected cycles:

GraphData["HouseGraph","Cycles","Count"]

Compare with the direct property:

GraphData["HouseGraph","CycleCount"]

Return the edges of the octahedral graph:

GraphData["OctahedralGraph","Graph","Labeled"]

GraphData["OctahedralGraph","Edges"]

Length[%]

Verify the above agrees with the "EdgeCount" property:

GraphData["OctahedralGraph","EdgeCount"]

Return the edges as a set of rules, suitable for plotting in (RefLink[GraphPlot, paclet:ref/GraphPlot]):

GraphData["OctahedralGraph","Edges","Rules"]

GraphPlot[%]

Return a graphic of the edges:

GraphData["OctahedralGraph","Edges","Graphics"]

Give (undirected) Eulerian cycles of the butterfly graph:

GraphData["ButterflyGraph","Graphics","Labeled"]

GraphData["ButterflyGraph","EulerianCycles"]

Compare with the output of (RefLink[FindEulerianCycle, paclet:ref/FindEulerianCycle]):

Sort@FindEulerianCycle[GraphData["ButterflyGraph"],All]

%[[All,All,1]]

Do the same using the explicit "Undirected" annotation:

GraphData["ButterflyGraph","EulerianCycles","Undirected"]

Give directed cycles:

GraphData["ButterflyGraph","EulerianCycles","Directed"]

Give count of undirected cycles:

GraphData["ButterflyGraph","EulerianCycles","Count"]

Compare with the direct property:

GraphData["ButterflyGraph","EulerianCycleCount"]

Give the faces of the octahedral graph:

GraphData["OctahedralGraph","Graph","Labeled"]

GraphData["OctahedralGraph","Faces"]

Length[%]

Verify the above agrees with the "FaceCount" property:

GraphData["OctahedralGraph","FaceCount"]

Show the faces of the octahedral graph:

Show[{GraphData["OctahedralGraph"],Graphics[{Opacity[.5],#}]}]&/@GraphData["OctahedralGraph","Faces","Polygon"]

Give (undirected) Hamiltonian cycles of the house X graph:

GraphData["HouseXGraph","Graphics","Labeled"]

GraphData["HouseXGraph","HamiltonianCycles"]

Do the same using the explicit "Undirected" annotation:

GraphData["HouseXGraph","HamiltonianCycles","Undirected"]

Give directed Hamiltonian cycles:

GraphData["HouseXGraph","HamiltonianCycles","Directed"]

Give count of undirected Hamiltonian cycles:

GraphData["HouseXGraph","HamiltonianCycles","Count"]

Compare with the direct property:

GraphData["HouseXGraph","HamiltonianCycleCount"]

Give (undirected) Hamiltonian paths of the butterfly graph:

GraphData["ButterflyGraph","Graphics","Labeled"]

GraphData["ButterflyGraph","HamiltonianPaths"]

Do the same using the explicit "Undirected" annotation:

GraphData["ButterflyGraph","HamiltonianPaths","Undirected"]

Give directed Hamiltonian paths:

GraphData["ButterflyGraph","HamiltonianPaths","Directed"]

Give count of undirected Hamiltonian paths:

GraphData["ButterflyGraph","HamiltonianPaths","Count"]

Compare with the direct property:

GraphData["ButterflyGraph","HamiltonianPathCount"]

Give (undirected) Hamiltonian walks of the butterfly graph:

GraphData["ButterflyGraph","Graphics","Labeled"]

GraphData["ButterflyGraph","HamiltonianWalks"]

Do the same using the explicit "Undirected" annotation:

GraphData["ButterflyGraph","HamiltonianWalks","Undirected"]

Give directed Hamiltonian paths:

GraphData["ButterflyGraph","HamiltonianWalks","Directed"]

Give count of undirected Hamiltonian paths:

GraphData["ButterflyGraph","HamiltonianWalks","Count"]

Compare with the direct property:

GraphData["ButterflyGraph","HamiltonianWalkCount"]

Give the vertex coordinates of the default embedding of the octahedral graph:

GraphData["OctahedralGraph","VertexCoordinates"]

Specify the "All" annotation:

GraphData["OctahedralGraph","VertexCoordinates","All"]

This is equivalent to the "Embeddings" property:

GraphData["OctahedralGraph","Embeddings"]==%

Plot the vertex positions:

Graphics[{Blue,AbsolutePointSize[5],Point[#]},Frame->True,FrameTicks->None]&/@%%

Return the vertices of the octahedral graph:

GraphData["OctahedralGraph","Graph","Labeled"]

GraphData["OctahedralGraph","Vertices"]

Verify the above agrees with the "VertexCount" property:

GraphData["OctahedralGraph","VertexCount"]

OpenersExampleSubsubsection6(Spacer1)Annotatable Properties Related to Graph Display  (7)

Give all tabulated embeddings of the cubical graph:

GraphData["CubicalGraph","Embeddings"]

Show classes for each embedding:

GraphData["CubicalGraph","EmbeddingClasses"]

Display all embeddings:

GraphicsGrid[Partition[GraphData["CubicalGraph","Graph","All"],UpTo[5]]]

Return the primary embedding of a graph:

GraphData["CubicalGraph","VertexCoordinates"]

GraphData["CubicalGraph","Graph"]

Return all tabulated planar embeddings of the graph:

GraphData["CubicalGraph","Embeddings","Planar"]

GraphData["CubicalGraph","Graph","Planar"]

Return all tabulated LCF embeddings of the graph:

GraphData["CubicalGraph","Embeddings","LCF"]

GraphData["CubicalGraph","Graph","LCF"]

Give all tabulated 3D embeddings of the cubical graph:

GraphData["CubicalGraph","Embeddings3D"]//Column

Show classes for each 3D embedding:

GraphData["CubicalGraph","EmbeddingClasses3D"]

Return all tabulated Polyhedron embeddings of the graph:

GraphData["CubicalGraph","Embeddings3D","Polyhedron"]//Column

GraphicsRow[GraphData["CubicalGraph","Graph",{"3D","Polyhedron"}]]

Return the cubical graph as a graph object:

GraphData["CubicalGraph","Graph"]

Show a labeled version:

GraphData["CubicalGraph","Graph","Labeled"]

Return tabulated planar embeddings:

GraphData["CubicalGraph","Graph","Planar"]

Return the cubical graph as a 3D graph object:

GraphData["CubicalGraph","Graph","3D"]

Show a labeled version:

GraphData["CubicalGraph","Graph",{"3D","Labeled"}]

Return tabulated polyhedron embeddings:

GraphicsRow[GraphData["CubicalGraph","Graph",{"3D","Polyhedron"}]]

Return the cubical graph as a graphics object:

GraphData["CubicalGraph","Graphics"]

Show a labeled version:

GraphData["CubicalGraph","Graphics","Labeled"]

Return tabulated planar embeddings:

GraphData["CubicalGraph","Graphics","Planar"]

Return the cubical graph as a 3D graph object:

GraphData["CubicalGraph","Graphics","3D"]

Show a labeled version:

GraphData["CubicalGraph","Graphics",{"3D","Labeled"}]

Return tabulated polyhedron embeddings as graphics objects:

GraphicsRow[GraphData["CubicalGraph","Graphics",{"3D","Polyhedron"}]]

Return an image of the primary embedding of a graph:

GraphData["CubicalGraph","Image"]

Show a labeled version:

GraphData["CubicalGraph","Image","Labeled"]

Give all cataloged embeddings of the octahedral graph:

GraphicsGrid[Partition[GraphData["CubicalGraph","Graph","All"],UpTo[5]]]

Show the three-dimensional embedding of the cubical graph as an image:

GraphData["CubicalGraph","Image","3D"]

Show a labeled version:

GraphData["CubicalGraph","Image",{"3D","Labeled"}]

Give all cataloged 3D embeddings of the cubical graph as images:

GraphicsRow[GraphData["CubicalGraph","Image",{"3D","All"}]]

OpenersExampleSubsubsection7(Spacer1)Properties Representing Graph Polynomials  (37)

Display the characteristic polynomial of the Coxeter graph as a pure function:

GraphData["CoxeterGraph","CharacteristicPolynomial"]

As a function of a variable x:

(p1=GraphData["CoxeterGraph","CharacteristicPolynomial"][x])//TraditionalForm

Compare with the directly computed value:

(p2=Factor[CharacteristicPolynomial[GraphData["CoxeterGraph","AdjacencyMatrix"],x]])//TraditionalForm

p1==p2

Give the chordless cycle polynomial of the cubical graph as a pure function:

poly=GraphData["CubicalGraph","ChordlessCyclePolynomial"]

Extract tallies by cycle length:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by cycle length a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[poly[x],x]],{_,0}]

Compare with the tallies of chordless cycle lengths:

Tally[Length/@GraphData["CubicalGraph","ChordlessCycles"]]

Give the chromatic polynomial of the cubical graph as a pure function:

GraphData["CubicalGraph","ChromaticPolynomial"]

As a function of a variable x:

GraphData["CubicalGraph","ChromaticPolynomial"][x]//TraditionalForm

The chromatic polynomial is a special case of the rank polynomial:

Factor[x^GraphData["CubicalGraph","VertexCount"] GraphData["CubicalGraph","RankPolynomial"][-1/x,-1]]

Give the chromatic polynomial of the icosahedral graph in terms of a variable x:

GraphData["IcosahedralGraph","ChromaticPolynomial"][x]//TraditionalForm

Give the clique polynomial of the utility graph as a pure function:

GraphData["UtilityGraph","CliquePolynomial"]

Compare to the explicit cliques:

GraphData["UtilityGraph","CliquePolynomial"][x]//Expand

Total[#2x^#&@@@Tally[Length/@GraphData["UtilityGraph","Cliques"]]]

Give the complement odd chordless cycle polynomial of the (Subscript[Ci, 1,2,3])(10) circulant graph as a pure function:

poly=GraphData[{"Circulant",{10,{1,2,3}}},"ComplementOddChordlessCyclePolynomial"]

Extract tallies by cycle length:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by cycle length a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData[{"Circulant",{10,{1,2,3}}},"ComplementOddChordlessCyclePolynomial"][x],x]],{_,0}]

Compare with the tallies of complement odd chordless cycle lengths:

Tally[Length/@GraphData[{"Circulant",{10,{1,2,3}}},"ComplementOddChordlessCycles"]]

Give the coboundary polynomial of the complete graph (Subscript[K, 5]) as a pure function:

GraphData[{"Complete",5},"CoboundaryPolynomial"]

As a function of a variables q and t:

GraphData[{"Complete",5},"CoboundaryPolynomial"][q,t]//TraditionalForm

The coboundary polynomial is a special case of the Tutte polynomial:

With[{g={"Complete",5}},
With[{
n=GraphData[g,"VertexCount"],
c=GraphData[g,"ConnectedComponentCount"]
},
Factor[(((t-1))^(n-c))GraphData[g,"TuttePolynomial"][((q+t-1)/(t-1)),t]]
]
]//TraditionalForm

Give the connected domination polynomial of the fish graph:

GraphData["FishGraph","ConnectedDominationPolynomial"]

Compare with the connected dominating set count:

%[1]

GraphData["FishGraph","ConnectedDominatingSetCount"]

Compare with connected dominating set tallies:

GraphData["FishGraph","ConnectedDominationPolynomial"][x]

Total[#2x^#&@@@Tally[Length/@GraphData["FishGraph","ConnectedDominatingSets"]]]

Give the connected induced subgraph polynomial of the Eiffel Tower graph:

GraphData["EiffelTowerGraph","ConnectedInducedSubgraphPolynomial"]

Compare with the count of connected induced subgraphs:

%[1]

GraphData["EiffelTowerGraph","ConnectedInducedSubgraphCount"]

Give the cycle polynomial of the cubical graph as a pure function:

GraphData["CubicalGraph","CyclePolynomial"]

Compare to cycle tallies:

GraphData["CubicalGraph","CyclePolynomial"][x]

Total[#2x^#&@@@Tally[Length/@GraphData["CubicalGraph","Cycles"]]]

Give the detour polynomial of the cubical graph as a pure function:

GraphData["CubicalGraph","DetourPolynomial"]

As a function of a variable x:

GraphData["CubicalGraph","DetourPolynomial"][x]//TraditionalForm

Give the distance polynomial of the cubical graph as a pure function:

GraphData["CubicalGraph","DistancePolynomial"]

As a function of a variable x:

GraphData["CubicalGraph","DistancePolynomial"][x]//TraditionalForm

Compute from distance matrix:

CharacteristicPolynomial[GraphData["CubicalGraph","DistanceMatrix"],x]//Factor

Give the domination polynomial of the Coxeter graph as a pure function:

GraphData["CoxeterGraph","DominationPolynomial"]

As a function of a variable x:

GraphData["CoxeterGraph","DominationPolynomial"][x]//TraditionalForm

Give the edge cover polynomial of the utility graph as a pure function:

GraphData["UtilityGraph","EdgeCoverPolynomial"]

Compare to the explicit covers:

GraphData["UtilityGraph","EdgeCoverPolynomial"][x]//Expand

Total[#2x^#&@@@Tally[Length/@GraphData["UtilityGraph","EdgeCovers"]]]

Give the flow polynomial of the cubical graph as a function of a variable u:

GraphData["CubicalGraph","FlowPolynomial"][u]//TraditionalForm

The flow polynomial is a special case of the rank polynomial:

Factor[(-1)^GraphData["CubicalGraph","EdgeCount"] GraphData["CubicalGraph","RankPolynomial"][-1,-u]]//TraditionalForm

Give the idiosyncratic polynomial of the cubical graph:

GraphData["CubicalGraph","IdiosyncraticPolynomial"][x,y]//TraditionalForm

Compare with a direct computation:

With[{n=GraphData["CubicalGraph","VertexCount"],a=GraphData["CubicalGraph","AdjacencyMatrix"]},
Factor[CharacteristicPolynomial[a+y(ConstantArray[1,n{1,1}]-IdentityMatrix[n]-a),x]]//TraditionalForm
]

Give the independence polynomial of the cubical graph:

GraphData["CubicalGraph","IndependencePolynomial"][x]//TraditionalForm

Give the irredundance polynomial of the cubical graph:

GraphData["CubicalGraph","IrredundancePolynomial"][x]//TraditionalForm

Compute from the irredundant sets:

Total[#2x^#1&@@@Tally[Length/@GraphData["CubicalGraph","IrredundantSets"]]]//TraditionalForm

Give the Laplacian polynomial of the cubical graph as a pure function:

GraphData["CubicalGraph","LaplacianPolynomial"]

As a function of a variable x:

GraphData["CubicalGraph","LaplacianPolynomial"][x]//TraditionalForm

Compute from Laplacian polynomial:

CharacteristicPolynomial[GraphData["CubicalGraph","LaplacianMatrix"],x]//Factor

Give the matching generating polynomial of the cubical graph:

GraphData["CubicalGraph","MatchingGeneratingPolynomial"][x]//TraditionalForm

Give the matching polynomial of the cubical graph:

GraphData["CubicalGraph","MatchingPolynomial"][x]//TraditionalForm

Give the maximal clique polynomial of the house graph as a pure function:

poly=GraphData["HouseGraph","MaximalCliquePolynomial"]

Extract tallies by maximal clique size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by maximal clique size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData["HouseGraph","MaximalCliquePolynomial"][x],x]],{_,0}]

Compare with the tallies of maximal clique sizes:

Tally[Length/@GraphData["HouseGraph","MaximalCliques"]]

Give the maximal independence polynomial of the cricket graph as a pure function:

poly=GraphData["CricketGraph","MaximalIndependencePolynomial"]

Extract tallies by maximal independent vertex set size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by maximal independent vertex set size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData["CricketGraph","MaximalIndependencePolynomial"][x],x]],{_,0}]

Compare with the tallies of maximal independent edge sets:

Tally[Length/@GraphData["CricketGraph","MaximalIndependentVertexSets"]]

Give the maximal irredundance polynomial of the cricket graph as a pure function:

poly=GraphData["CricketGraph","MaximalIrredundancePolynomial"]

Extract tallies by maximal irredundant set size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by maximal irredundant set size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData["CricketGraph","MaximalIrredundancePolynomial"][x],x]],{_,0}]

Compare with the tallies of maximal irredundant sets:

Tally[Length/@GraphData["CricketGraph","MaximalIrredundantSets"]]

Give the maximal matching generating polynomial of the cricket graph as a pure function:

poly=GraphData["CricketGraph","MaximalMatchingGeneratingPolynomial"]

Extract tallies by maximal independent edge set size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by maximal independent edge set size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData["CricketGraph","MaximalMatchingGeneratingPolynomial"][x],x]],{_,0}]

Compare with the tallies of maximal independent edge sets:

Tally[Length/@GraphData["CricketGraph","MaximalIndependentEdgeSets"]]

Give the minimal connected domination polynomial of the 5-wheel graph as a pure function:

poly=GraphData[{"Wheel",5},"MinimalConnectedDominationPolynomial"]

Extract tallies by minimal connected dominating set size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by minimal connected dominating set size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData[{"Wheel",5},"MinimalConnectedDominationPolynomial"][x],x]],{_,0}]

Compare with the tallies of minimal connected dominating sets:

Tally[Length/@GraphData[{"Wheel",5},"MinimalConnectedDominatingSets"]]

Give the minimal domination polynomial of the cricket graph as a pure function:

poly=GraphData["CricketGraph","MinimalDominationPolynomial"]

Extract tallies by minimal dominating set size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by minimal dominating set size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData["CricketGraph","MinimalDominationPolynomial"][x],x]],{_,0}]

Compare with the tallies of minimal dominating sets:

Tally[Length/@GraphData["CricketGraph","MinimalDominatingSets"]]

Give the minimal edge cover polynomial of the cricket graph as a pure function:

poly=GraphData["CricketGraph","MinimalEdgeCoverPolynomial"]

Extract tallies by minimal edge cover size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by minimal edge cover size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData["CricketGraph","MinimalEdgeCoverPolynomial"][x],x]],{_,0}]

Compare with the tallies of minimal edge covers:

Tally[Length/@GraphData["CricketGraph","MinimalEdgeCovers"]]

Give the minimal total domination polynomial of the butterfly graph as a pure function:

poly=GraphData["ButterflyGraph","MinimalTotalDominationPolynomial"]

Extract tallies by total dominating set size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by total dominating set size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData["ButterflyGraph","MinimalTotalDominationPolynomial"][x],x]],{_,0}]

Compare with the tallies of total dominating sets:

Tally[Length/@GraphData["ButterflyGraph","MinimalTotalDominatingSets"]]

Give the minimal vertex cover polynomial of the cricket graph as a pure function:

poly=GraphData["CricketGraph","MinimalVertexCoverPolynomial"]

Extract tallies by minimal vertex cover size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by minimal vertex cover size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData["CricketGraph","MinimalVertexCoverPolynomial"][x],x]],{_,0}]

Compare with the tallies of minimal vertex covers:

Tally[Length/@GraphData["CricketGraph","MinimalVertexCovers"]]

Give the odd chordless cycle polynomial of the Golomb graph as a pure function:

poly=GraphData["GolombGraph","OddChordlessCyclePolynomial"]

Extract tallies by odd chordless cycle lengths:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by odd chordless cycle lengths in a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData["GolombGraph","OddChordlessCyclePolynomial"][x],x]],{_,0}]

Compare with the tallies of odd chordless cycle lengths:

Tally[Length/@GraphData["GolombGraph","OddChordlessCycles"]]

Give the path polynomial of the cubical graph as a pure function:

GraphData["CubicalGraph","PathPolynomial"]

Compare to cycle tallies:

GraphData["CubicalGraph","PathPolynomial"][x]

Total[#2x^#&@@@Tally[Length/@GraphData["CubicalGraph","Paths"]]]

Give the rank polynomial of the cubical graph:

GraphData["CubicalGraph","RankPolynomial"][x,y]//TraditionalForm

Give the reliability polynomial of the cubical graph:

GraphData["CubicalGraph","ReliabilityPolynomial"][p]//TraditionalForm

The reliability polynomial is a special case of the Tutte polynomial:

With[{g="CubicalGraph"},
With[{
n=GraphData[g,"VertexCount"],
m=GraphData[g,"EdgeCount"],
c=GraphData[g,"ConnectedComponentCount"]
},
Factor[(((1-p))^(n-c))(p^(m-n+c))GraphData[g,"TuttePolynomial"][1,(1/p)]]
]
]//TraditionalForm

Give the sigma polynomial of the cubical graph:

GraphData["CubicalGraph","SigmaPolynomial"][x]//TraditionalForm

Give the total domination polynomial of the 5-wheel graph as a pure function:

poly=GraphData[{"Wheel",5},"TotalDominationPolynomial"]

Extract tallies by total dominating set size:

{#[[1]],#2}&@@@CoefficientRules[poly[x],x]//Sort

Extract tallies by total dominating set size a different way:

DeleteCases[MapIndexed[{#2[[1]]-1,#}&,CoefficientList[GraphData[{"Wheel",5},"TotalDominationPolynomial"][x],x]],{_,0}]

Compare with the tallies of total dominating sets:

Tally[Length/@GraphData[{"Wheel",5},"TotalDominatingSets"]]

Give the Tutte polynomial of the cubical graph:

GraphData["CubicalGraph","TuttePolynomial"][x,y]//TraditionalForm

The Tutte polynomial is a special case of the rank polynomial:

With[{g="CubicalGraph"},
With[{n=GraphData[g,"VertexCount"]},
Factor[(((x-1))^(n-1)) GraphData[g,"RankPolynomial"][(1/(x-1)),y-1]]
]
]//TraditionalForm

Give the vertex cover polynomial of the utility graph as a pure function:

GraphData["UtilityGraph","VertexCoverPolynomial"]

Compare to the explicit covers:

GraphData["UtilityGraph","VertexCoverPolynomial"][x]//Expand

Total[#2x^#&@@@Tally[Length/@GraphData["UtilityGraph","VertexCovers"]]]

OpenersExampleSubsubsection8(Spacer1)Coloring-Related Graph Properties  (8)

Give the chromatic invariant cubical graph:

GraphData["CubicalGraph","ChromaticInvariant"]

Give the chromatic number of the cubical graph:

GraphData["CubicalGraph","ChromaticNumber"]

Visualize the chromatic number:

cols=GraphData["CubicalGraph","MinimumVertexColoring"]

HighlightGraph[GraphData["CubicalGraph"],MapIndexed[Style[#2[[1]],{Red,Green}[[#]]]&,cols],VertexSize->Medium]

Give the edge chromatic number of the cubical graph:

GraphData["CubicalGraph","EdgeChromaticNumber"]

Visualize the edge chromatic number:

cols=GraphData["CubicalGraph","MinimumEdgeColoring"]

With[{g="CubicalGraph"},With[{edges=GraphData[g,"EdgeSet"]},HighlightGraph[GraphData[g],MapIndexed[Style[edges[[#2[[1]]]],{Red,Green,Blue}[[#]]]&,cols]]]]

Give the fractional chromatic numbers of the Mycielski graphs:

Grid[Sort[{"Mycielski"/.GraphData[#,"NotationRules"],GraphData[#,"FractionalChromaticNumber"]}&/@GraphData["Mycielski"]],Dividers->All,Alignment->Left]

Compare with the closed form known for this fractional chromatic number:

RecurrenceTable[{a[1]==1,a[n]==a[n-1]+1/a[n-1]},a,{n,1,10}]

Give the fractional edge chromatic numbers of the flower snark (Subscript[J, 5]):

GraphData["FlowerSnarkJ5","FractionalEdgeChromaticNumber"]

Give a minimum edge coloring of the octahedral graph:

cols=GraphData["OctahedralGraph","MinimumEdgeColoring"]

Max[cols]==GraphData["OctahedralGraph","EdgeChromaticNumber"]

Visualize the coloring:

With[{g="OctahedralGraph"},With[{edges=GraphData[g,"EdgeSet"]},HighlightGraph[GraphData[g],MapIndexed[Style[edges[[#2[[1]]]],{Red,Green,Blue,Yellow}[[#]]]&,cols]]]]

Give a minimum vertex coloring of the octahedral graph:

cols=GraphData["OctahedralGraph","MinimumVertexColoring"]

Visualize the coloring:

Max[cols]==GraphData["OctahedralGraph","ChromaticNumber"]

HighlightGraph[GraphData["OctahedralGraph"],MapIndexed[Style[#2[[1]],{Red,Green,Blue}[[#]]]&,cols]]

Show a minimum weight fractional coloring of the Petersen graph:

GraphData["PetersenGraph","MinimumWeightFractionalColoring"]

Compute the fractional chromatic number:

Total[%[[All,2]]]

Compare with the direct property:

GraphData["PetersenGraph","FractionalChromaticNumber"]

OpenersExampleSubsubsection9(Spacer1)Graph Index Properties  (12)

Display the Balaban index of the Coxeter graph:

GraphData["CoxeterGraph","BalabanIndex"]

Give the Balaban index of the isobutane graph:

GraphData["Isobutane","BalabanIndex"]

Give the cyclomatic number (i.e. circuit rank) of the Coxeter graph:

GraphData["CoxeterGraph","CyclomaticNumber"]

Display the cyclomatic number of the icosahedral graph:

GraphData["IcosahedralGraph","CyclomaticNumber"]

Compare with the value obtained from other properties:

GraphData["IcosahedralGraph","EdgeCount"]-GraphData["IcosahedralGraph","VertexCount"]+1

Give the detour index of the cubical graph:

GraphData["CubicalGraph","DetourIndex"]

Give the Harary index of the cubical graph:

GraphData["CubicalGraph","HararyIndex"]

Give the Hosoya index of the cubical graph:

GraphData["CubicalGraph","HosoyaIndex"]

The Hosoya index is identical to the independent edge set count:

GraphData["CubicalGraph","IndependentEdgeSetCount"]

Give the Kirchhoff index of the cubical graph:

GraphData["CubicalGraph","KirchhoffIndex"]

Give the Kirchhoff index of the isobutane graph:

GraphData["Isobutane","KirchhoffIndex"]

Give the Kirchhoff sum index of the cubical graph:

GraphData["CubicalGraph","KirchhoffSumIndex"]

Give the Kirchhoff sum index of the isobutane graph:

GraphData["Isobutane","KirchhoffSumIndex"]

Give the molecular topological index of the cubical graph:

GraphData["CubicalGraph","MolecularTopologicalIndex"]

Give the stability index of the cubical graph:

GraphData["CubicalGraph","StabilityIndex"]

Give the topological index of the cubical graph:

GraphData["CubicalGraph","TopologicalIndex"]

Give the Wiener index of the cubical graph:

GraphData["CubicalGraph","WienerIndex"]

Give the Wiener index of the isobutane graph:

GraphData["Isobutane","WienerIndex"]

Give the Wiener sum index of the cubical graph:

GraphData["CubicalGraph","WienerSumIndex"]

Give the Wiener sum index of the isobutane graph:

GraphData["Isobutane","WienerSumIndex"]

OpenersExampleSubsubsection10(Spacer1)Local Graph Properties  (5)

Find graphs having bridges:

Cases[GraphData["Bridged"],_String]//Short[#,4]&

List the bridges of the Walther graph:

GraphData["WaltherGraph","Bridges"]

With[{g="WaltherGraph"},
SetProperty[HighlightGraph[GraphData[g],Style[GraphData[g,"Bridges"],Directive[Red,Thick]]],VertexLabels->"Name"]]

Number of bridges:

GraphData["WaltherGraph","BridgeCount"]

Do the same using the "Count" annotation:

GraphData["WaltherGraph","Bridges","Count"]

Give the number of chords in the house graph:

GraphData["HouseGraph","ChordCount"]

Give the chord:

GraphData["HouseGraph","Chords"]

List the chords of the house graph:

GraphData["HouseGraph","Chords"]

With[{g="HouseGraph"},
SetProperty[HighlightGraph[GraphData[g],Style[GraphData[g,"Chords"],Directive[Red,Thick]]],VertexLabels->"Name"]]

Number of chords:

GraphData["HouseGraph","ChordCount"]

Do the same using the "Count" annotation:

GraphData["HouseGraph","Chords","Count"]

Show isolated points:

GraphData["P3+4K1","IsolatedPoints"]

With[{g="P3+4K1"},With[{iso=GraphData[g,"IsolatedPoints"]},
Show[SetProperty[HighlightGraph[GraphData[g],iso],VertexLabels->Table[i->Placed[i,If[MemberQ[iso,i],Below,Above]],{i,VertexList[GraphData[g]]}]],PlotRange->All]]]

Find leaves:

GraphData["Ethane","Leaves"]

Length[%]

Show number of leaves directly:

GraphData["Ethane","LeafCount"]

Do the same using the "Count" annotation:

GraphData["Ethane","Leaves","Count"]

Visualize:

With[{g="Ethane"},
Show[SetProperty[HighlightGraph[GraphData[g],GraphData[g,"Leaves"]],VertexLabels->"Name"],PlotRange->All]]

OpenersExampleSubsubsection11(Spacer1)Global Graph Properties  (26)

List named connected (nonplanar) apex graphs:

Cases[Complement[GraphData[{"Apex","Connected"}],GraphData["Planar"]],_String]

Find all apices of the Wagner graph:

GraphData["WagnerGraph"]

PlanarGraphQ[GraphData["WagnerGraph"]]

GraphData["WagnerGraph","Apices"]

Delete apices and verify planarity of the resulting graphs:

GraphicsGrid[Partition[gs=With[{g="WagnerGraph"},Table[VertexDelete[GraphData[g],v],{v,GraphData[g,"Apices"]}]],4]]

PlanarGraphQ/@gs

Show the arboricity of the complete graphs:

Table[GraphData[{"Complete",n},"Arboricity"],{n,20}]

Compare with the value form theory:

Table[Floor[n/2],{n,20}]

Find graphs having articulation vertices:

Cases[Select[GraphData[],GraphData[#,"ArticulationVertices"]=!={}&],_String?(StringFreeQ[DigitCharacter])]

Give the indices of the articulation vertices of the Walther graph:

GraphData["WaltherGraph","ArticulationVertices"]

Visualize the articulation vertices:

With[{g="WaltherGraph"},
SetProperty[HighlightGraph[GraphData[g],Style[GraphData[g,"ArticulationVertices"],Red]],VertexLabels->"Name"]]

Display the center of a tree:

GraphData[{"Tree",{7,1}},"Center"]

Visualize the center:

With[{g={"Tree",{7,1}}},
SetProperty[HighlightGraph[GraphData[g],Style[GraphData[g,"Center"],Red]],VertexLabels->"Name"]]

Display the circumference of the icosahedral graph:

GraphData["CoxeterGraph","Circumference"]

Verify that this corresponds to the length of the longest cycle:

GraphData["CoxeterGraph","CyclePolynomial"][x]

Exponent[%,x]

Display the corank of the icosahedral graph:

GraphData["IcosahedralGraph","Corank"]

Compute the corank from other graph properties:

{1,-1,1}.GraphData["IcosahedralGraph",{"EdgeCount","VertexCount","ConnectedComponentCount"}]

Give the graphs on four or fewer vertices that are determined by resistance:

GraphData["DeterminedByResistance",;;4]

Check if the cubical graph is determined by spectrum:

GraphData["CubicalGraph","DeterminedBySpectrum"]

Check if the tesseract graph is determined by spectrum:

GraphData["TesseractGraph","DeterminedBySpectrum"]

Give the names of the graphs with the same spectrum as the tesseract graph:

GraphData["TesseractGraph","CospectralGraphs","Name"]

Give the detour matrix of the cubical graph:

GraphData["CubicalGraph","DetourMatrix"]//TraditionalForm

Give the diameter of the Pappus graph:

GraphData["PappusGraph","Diameter"]

Give the eccentricities of the Pappus graph:

GraphData["PappusGraph","Eccentricities"]

Display the Laplacian spectrum of the 600-cell graph:

spec=GraphData["SixHundredCellGraph","LaplacianSpectrum"]

Display a nicely formatted version:

SpectrumForm[s_]:=Module[{l={First[#],Length[#]}&/@Split[Sort[s,Less]]},HoldForm[Evaluate[Apply[Power,HoldForm/@l,{2}]]]/.List:>Times]

spec//SpectrumForm//TraditionalForm

Display the maximum leaf number of the A graph:

GraphData["AGraph","MaximumLeafNumber"]

Give the maximum vertex degree of the E graph:

GraphData["EGraph"]

GraphData["EGraph","MaximumVertexDegree"]

GraphData["EGraph","Degrees"]

Max[%]

VertexDegree[GraphData["EGraph"]]

Max[%]

Display the mean distance of the Petersen graph:

GraphData["PetersenGraph","MeanDistance"]

Give the minimum vertex degree of the E graph:

GraphData["EGraph"]

GraphData["EGraph","MinimumVertexDegree"]

GraphData["EGraph","Degrees"]

Min[%]

VertexDegree[GraphData["EGraph"]]

Min[%]

Display the periphery of a tree:

GraphData[{"Tree",{7,1}},"Periphery"]

Visualize the periphery:

With[{g={"Tree",{7,1}}},
SetProperty[HighlightGraph[GraphData[g],Style[GraphData[g,"Periphery"],Red]],VertexLabels->"Name"]]

Display the rank of the icosahedral graph:

GraphData["IcosahedralGraph","Rank"]

Compute the rank from other graph properties:

{1,-1}.GraphData["IcosahedralGraph",{"VertexCount","ConnectedComponentCount"}]

Give the resistance matrix of the cubical graph:

r=GraphData["CubicalGraph","ResistanceMatrix"]

Normal[r]//TraditionalForm

MatrixPlot[r,ColorFunction->Hue]

Display the skewness of the tesseract graph:

GraphData["TesseractGraph","Skewness"]

Compare with the result from theory:

(2^n)(n-2)-n (2^(n-1))+4/.n->4

Display the number of spanning trees in the 120-cell graph:

GraphData["HundredTwentyCellGraph","SpanningTreeCount"]

Give the spectral radius of the 600-cell graph:

spec=GraphData["SixHundredCellGraph","SpectralRadius"]

Compare with the graph spectrum:

Max[Abs[GraphData["SixHundredCellGraph","Spectrum"]]]

Display the spectrum of the 600-cell graph:

spec=GraphData["SixHundredCellGraph","Spectrum"]

Display a nicely formatted version:

SpectrumForm[s_]:=Module[{l={First[#],Length[#]}&/@Split[Sort[s,Less]]},HoldForm[Evaluate[Apply[Power,HoldForm/@l,{2}]]]/.List:>Times]

spec//SpectrumForm//TraditionalForm

Show the triameter of the Coxeter graph:

GraphData["CoxeterGraph","Triameter"]

Compare with the directly computed value:

With[{g=GraphData["CoxeterGraph"]},Max[Total[Extract[GraphDistanceMatrix[g],Partition[#,2,1,1]]]&/@Subsets[VertexList[g],{3}]]]

Show the vertex degrees of the claw graph:

GraphData["Claw","Graph","Labeled"]

GraphData["Claw","VertexDegrees"]

Give the toroidal crossing numbers for complete graphs:

GraphData["Complete","ToroidalCrossingNumber"]

OpenersExampleSubsubsection12(Spacer1)Topological Graph Properties  (6)

Display the crossing number of the icosahedral graph:

GraphData["IcosahedralGraph","CrossingNumber"]

The crossing number is 0 since the graph is planar:

GraphData["IcosahedralGraph","Planar"]

Give the genus of the cubical graph:

GraphData["CubicalGraph","Genus"]

Give the genus of the unique graph that triangulates the torus and Klein bottle:

GraphData["UniqueTorusAndKleinBottleTriangulationGraph","Genus"]

Give the Klein bottle crossing number of the unique graph that triangulates the torus and Klein bottle:

GraphData["UniqueTorusAndKleinBottleTriangulationGraph","KleinBottleCrossingNumber"]

Give the projective plane crossing numbers of the complete bipartite graphs (Subscript[K, 4,n]):

Table[GraphData[{"CompleteBipartite",Sort[{4,n}]},"ProjectivePlaneCrossingNumber"],{n,20}]

Compare with the known closed form values:

Table[Ceiling[n^2/3]-n,{n,20}]

Give the rectilinear crossing numbers for complete graphs:

GraphData[#,"RectilinearCrossingNumber"]&/@SortBy[GraphData["Complete"],GraphData[#,"V"]&]

Give the toroidal crossing number of the unique graph that triangulates the torus and Klein bottle:

GraphData["UniqueTorusAndKleinBottleTriangulationGraph","ToroidalCrossingNumber"]

OpenersExampleSubsubsection13(Spacer1)Clique-Related Graph Properties  (11)

Return the clique count of the octahedral graph:

GraphData["OctahedralGraph","CliqueCount"]

Compare with the explicit listing of cliques:

GraphData["OctahedralGraph","Cliques"]//Length

Return the clique number of the icosahedral graph:

GraphData["IcosahedralGraph","CliqueNumber"]

Compare with the lengths of the maximum cliques:

cliques=GraphData["IcosahedralGraph","MaximumCliques"]

Union[Length/@cliques]

Give the clique polynomial of the utility graph:

GraphData["UtilityGraph","CliquePolynomial"]

Compare to the explicit cliques:

GraphData["UtilityGraph","CliquePolynomial"][x]//Expand

Total[#2x^#&@@@Tally[Length/@GraphData["UtilityGraph","Cliques"]]]

Return the cliques of the octahedral graph:

GraphData["OctahedralGraph","Cliques"]

Return the fractional clique number of the Heawood graph:

GraphData["HeawoodGraph","FractionalCliqueNumber"]

Return the number of maximal cliques of the cubical graph:

GraphData["CubicalGraph","MaximalCliqueCount"]

Compare with the number of maximal cliques:

GraphData["CubicalGraph","MaximalCliques"]

Length[%]

Return the maximal clique polynomial of the cubical graph:

GraphData["CubicalGraph","MaximalCliquePolynomial"][x]

Return the maximal cliques of the bull graph:

GraphData["BullGraph","MaximalCliques"]

Return the maximum cliques of the bull graph:

GraphData["BullGraph","MaximumCliques"]

Give the smallest covers of the cubical graph by maximal cliques:

GraphData["CubicalGraph","MinimumCoveringsByMaximalCliques"]

Length[%]

Give the number of smallest covers of the cubical graph by maximal cliques:

GraphData["CubicalGraph","MinimumCoveringsByMaximalCliquesCount"]

OpenersExampleSubsubsection14(Spacer1)Cover-Related Graph Properties  (17)

Give the biclique cover of the cubical graph:

GraphData["CubicalGraph","BicliqueCover"]

Return the clique covering number of the icosahedral graph:

GraphData["IcosahedralGraph","CliqueCoveringNumber"]

Verify it is the chromatic number of the graph complement:

GraphData["IcosahedralGraph","ComplementGraphName"]

GraphData[%,"ChromaticNumber"]

Give the number of edge covers of the cubical graph:

GraphData["CubicalGraph","EdgeCoverCount"]

Compare to the length of the list of edge covers:

GraphData["CubicalGraph","EdgeCovers"]//Length

Return the edge cover number of the icosahedral graph:

GraphData["IcosahedralGraph","EdgeCoverNumber"]

Compare with the length of a minimum edge cover:

ec=GraphData["IcosahedralGraph","MinimumEdgeCovers"]

Union[Length/@ec]

Give the edge cover polynomial of the utility graph:

GraphData["UtilityGraph","EdgeCoverPolynomial"]

Compare to the explicit covers:

GraphData["UtilityGraph","EdgeCoverPolynomial"][x]//Expand

Total[#2x^#&@@@Tally[Length/@GraphData["UtilityGraph","EdgeCovers"]]]

Give the edge covers of the utility graph:

GraphData["UtilityGraph","EdgeCovers"]

Return the number of minimal edge covers for the cubical graph:

GraphData["CubicalGraph","MinimalEdgeCoverCount"]

Compare to the length of the list:

GraphData["CubicalGraph","MinimalEdgeCovers"]//Length

Use the "Count" annotation:

GraphData["CubicalGraph","MinimalEdgeCovers","Count"]

Return the minimal edge cover polynomial of the tetrahedral graph:

GraphData["TetrahedralGraph","MinimalEdgeCoverPolynomial"][x]

Compute from the minimal edge covers:

Total[#2 x^#&@@@Tally[Length/@GraphData["TetrahedralGraph","MinimalEdgeCovers"]]]

Return the minimal edge covers of the tetrahedral graph:

GraphData["TetrahedralGraph","MinimalEdgeCovers"]

Return the number of minimal vertex covers for the cubical graph:

GraphData["CubicalGraph","MinimalVertexCoverCount"]

Compare to the length of the list:

GraphData["CubicalGraph","MinimalVertexCovers"]//Length

Use the "Count" annotation:

GraphData["CubicalGraph","MinimalVertexCovers","Count"]

Return the minimal vertex cover polynomial of the tetrahedral graph:

GraphData["TetrahedralGraph","MinimalVertexCoverPolynomial"][x]

Compute from the minimal vertex covers:

Total[#2 x^#&@@@Tally[Length/@GraphData["TetrahedralGraph","MinimalVertexCovers"]]]

Return the minimal vertex covers of the tetrahedral graph:

GraphData["TetrahedralGraph","MinimalVertexCovers"]

Return the number of minimum clique coverings for the cubical graph:

GraphData["CubicalGraph","MinimumCliqueCoveringCount"]

Compare to the length of the list:

GraphData["CubicalGraph","MinimumCliqueCoverings"]//Length

Give the number of vertex covers of the cubical graph:

GraphData["CubicalGraph","VertexCoverCount"]

Compare to the length of the list of edge covers:

GraphData["CubicalGraph","VertexCovers"]//Length

Return the vertex cover number:

GraphData["CubicalGraph","VertexCoverNumber"]

Compare with the size of a minimum vertex cover:

GraphData["CubicalGraph","MinimumVertexCovers"]

Length[%[[2]]]

Give the vertex cover polynomial of the utility graph:

GraphData["UtilityGraph","VertexCoverPolynomial"]

Compare to the explicit covers:

GraphData["UtilityGraph","VertexCoverPolynomial"][x]//Expand

Total[#2x^#&@@@Tally[Length/@GraphData["UtilityGraph","VertexCovers"]]]

Give the vertex covers of the cubical graph:

GraphData["CubicalGraph","VertexCovers"]

OpenersExampleSubsubsection15(Spacer1)Independent Set-Related Graph Properties  (23)

Give the biclique cover of the cubical graph:

GraphData["CubicalGraph","BicliqueCover"]

Give the bipartite dimension of the cubical graph:

GraphData["CubicalGraph","BipartiteDimension"]

Return the independence number of the Heawood graph:

GraphData["HeawoodGraph","IndependenceNumber"]

Compare with the size of a maximum independent vertex set:

ies=GraphData["HeawoodGraph","MaximumIndependentVertexSets"]

Length/@ies[[2]]

Return the independence polynomial of the utility graph:

GraphData["UtilityGraph","IndependencePolynomial"]

Compare to the explicit independent sets:

GraphData["UtilityGraph","IndependencePolynomial"][x]//Expand

Total[#2 x^#&@@@Tally[Length/@GraphData["UtilityGraph","IndependentVertexSets"]]]

Return the independence ratio of the Petersen graph:

GraphData["PetersenGraph","IndependenceRatio"]

Compare to the direct ratio of properties:

Divide@@GraphData["PetersenGraph",{"IndependenceNumber","VertexCount"}]

Return the number of independent edge sets of the Heawood graph:

GraphData["HeawoodGraph","IndependentEdgeSetCount"]

Compare to the explicit independent sets:

GraphData["HeawoodGraph","IndependentEdgeSets"]//Length

Return the independent edge sets of the utility graph:

GraphData["UtilityGraph","IndependentEdgeSets"]

Return the number of independent vertex sets of the cubical graph:

GraphData["CubicalGraph","IndependentVertexSetCount"]

Compare to the explicit independent sets:

GraphData["CubicalGraph","IndependentVertexSets"]//Length

Return the independent vertex sets of the Heawood graph:

GraphData["CubicalGraph","IndependentVertexSets"]

Return the matching-generating polynomial of the utility graph:

GraphData["UtilityGraph","MatchingGeneratingPolynomial"]

Compare to the explicit independent edge sets:

GraphData["UtilityGraph","MatchingGeneratingPolynomial"][x]//Expand

Total[#2 x^#&@@@Tally[Length/@GraphData["UtilityGraph","IndependentEdgeSets"]]]

Return the matching number of the cubical graph:

GraphData["CubicalGraph","MatchingNumber"]

Compare with the matching-generating polynomial:

GraphData["CubicalGraph","MatchingGeneratingPolynomial"][x]

Exponent[%,x]

Return the maximal independence polynomial for the Heawood graph:

GraphData["HeawoodGraph","MaximalIndependencePolynomial"][x]

Compare with the numbers of maximal independent vertex sets:

Tally[Length/@GraphData["HeawoodGraph","MaximalIndependentVertexSets"]]

Return the number of maximal independent edge sets for the Heawood graph:

GraphData["HeawoodGraph","MaximalIndependentEdgeSetCount"]

Compare with the number of maximal independent edge sets:

GraphData["HeawoodGraph","MaximalIndependentEdgeSets"]//Length

Return the maximal independent edge sets for the Heawood graph:

GraphData["HeawoodGraph","MaximalIndependentEdgeSets"]//Short

Return the maximal matching-generating polynomial for the Heawood graph:

GraphData["HeawoodGraph","MaximalMatchingGeneratingPolynomial"][x]

Compare with the explicit edge sets:

Tally[Length/@GraphData["HeawoodGraph","MaximalIndependentEdgeSets"]]

Return the number of maximal independent vertex sets for the Heawood graph:

GraphData["HeawoodGraph","MaximalIndependentVertexSetCount"]

Compare with the number of maximal independent vertex sets:

GraphData["HeawoodGraph","MaximalIndependentVertexSets"]

Length[%]

Return the maximal independent vertex sets for the cubical graph:

GraphData["CubicalGraph","MaximalIndependentVertexSets"]

Return the maximal independence polynomial for the cubical graph:

GraphData["CubicalGraph","MaximalIndependencePolynomial"][x]

Compare with the explicit edge sets:

Tally[Length/@GraphData["CubicalGraph","MaximalIndependentVertexSets"]]

Return the maximal matching generating polynomial for the Heawood graph:

GraphData["HeawoodGraph","MaximalMatchingGeneratingPolynomial"][x]

Compare with the numbers of maximal independent edge sets:

Tally[Length/@GraphData["HeawoodGraph","MaximalIndependentEdgeSets"]]

Return the number of maximum independent edge sets for the Heawood graph:

GraphData["HeawoodGraph","MaximumIndependentEdgeSetCount"]

Do the same with the "Count" annotation:

GraphData["HeawoodGraph","MaximumIndependentEdgeSets","Count"]

Return the maximum independent edge sets for the Heawood graph:

GraphData["HeawoodGraph","MaximumIndependentEdgeSets"]

Length[%]

Return the number of maximum independent vertex sets for the Heawood graph:

GraphData["HeawoodGraph","MaximumIndependentVertexSetCount"]

Do the same with the "Count" annotation:

GraphData["HeawoodGraph","MaximumIndependentVertexSets","Count"]

Return the maximum independent vertex sets for the Heawood graph:

GraphData["HeawoodGraph","MaximumIndependentVertexSets"]

Length[%]

OpenersExampleSubsubsection16(Spacer1)Irredundant Set-Related Graph Properties  (7)

Give the number of irredundant sets in the cubical graph:

GraphData["CubicalGraph","IrredundantSetCount"]

Compare with the length of the list of sets:

GraphData["CubicalGraph","IrredundantSets"]//Length

Use the "Count" annotation:

GraphData["CubicalGraph","IrredundantSets","Count"]

Give the irredundant sets in the cubical graph:

GraphData["CubicalGraph","IrredundantSets"]

Give the maximal irredundant polynomial of the cubical graph:

GraphData["CubicalGraph","MaximalIrredundancePolynomial"][x]

Compute from the maximal irredundant sets:

Tally[Length/@GraphData["CubicalGraph","MaximalIrredundantSets"]]

Give the number of maximal irredundant sets in the cubical graph:

GraphData["CubicalGraph","MaximalIrredundantSetCount"]

Compare with the length of the list of sets:

GraphData["CubicalGraph","MaximalIrredundantSets"]//Length

Use the "Count" annotation:

GraphData["CubicalGraph","MaximalIrredundantSets","Count"]

Give the maximal irredundant sets in the cubical graph:

GraphData["CubicalGraph","MaximalIrredundantSets"]

Give the number of maximum irredundant sets in the cubical graph:

GraphData["CubicalGraph","MaximumIrredundantSetCount"]

Compare with the length of the list of sets:

GraphData["CubicalGraph","MaximumIrredundantSets"]//Length

Use the "Count" annotation:

GraphData["CubicalGraph","MaximumIrredundantSets","Count"]

Give the maximum irredundant sets in the cubical graph:

GraphData["CubicalGraph","MaximumIrredundantSets"]

OpenersExampleSubsubsection17(Spacer1)Dominating Set-Related Graph Properties  (28)

Return the connected dominating set count of the cubical graph:

GraphData["CubicalGraph","ConnectedDominatingSetCount"]

Compare with the connected domination polynomial:

GraphData["CubicalGraph","ConnectedDominationPolynomial"][1]

Compare with the connected dominating sets:

GraphData["CubicalGraph","ConnectedDominatingSets"]//Length

Give the connected dominating sets of the square graph:

GraphData["SquareGraph","Graph","Labeled"]

GraphData["SquareGraph","ConnectedDominatingSets"]

Return the connected domination number of the cubical graph:

GraphData["CubicalGraph","ConnectedDominationNumber"]

Compare with the connected domination polynomial:

Exponent[GraphData["CubicalGraph","ConnectedDominationPolynomial"][x],x,Min]

Compare with the connected dominating sets:

Min[Length/@GraphData["CubicalGraph","ConnectedDominatingSets"]]

Return the connected domination polynomial of the cubical graph:

GraphData["CubicalGraph","ConnectedDominationPolynomial"][x]

Compare with the sizes of connected dominating sets:

Tally[Length/@GraphData["CubicalGraph","ConnectedDominatingSets"]]

Give the domatic numbers of the first several hypercube graphs:

Table[GraphData[{"Hypercube",n},"DomaticNumber"],{n,0,10}]

Return the number of dominating sets of the cubical graph:

GraphData["CubicalGraph","DominatingSetCount"]

Compare with the domination polynomial:

GraphData["CubicalGraph","DominationPolynomial"][1]

Compare with the dominating sets:

GraphData["CubicalGraph","DominatingSets"]//Length

Return the dominating sets of the cubical graph:

GraphData["CubicalGraph","DominatingSets"]

Return the domination number of the cubical graph:

GraphData["CubicalGraph","DominationNumber"]

Return the domination polynomial of the cubical graph:

GraphData["CubicalGraph","DominationPolynomial"][x]//Expand

Compare with the sizes of dominating sets:

Tally[Length/@GraphData["CubicalGraph","DominatingSets"]]

Give the number of minimal connected dominating sets in the Nauru graph:

GraphData["NauruGraph","MinimalConnectedDominatingSetCount"]

Compute from the minimal connected dominating sets:

GraphData["NauruGraph","MinimalConnectedDominatingSets"]//Length

Use the "Count" annotation:

GraphData["NauruGraph","MinimalConnectedDominatingSets","Count"]

Return the minimal connected dominating sets in the Nauru graph:

GraphData["NauruGraph","MinimalConnectedDominatingSets"]

Give the minimal connected domination polynomial of the Nauru graph:

GraphData["NauruGraph","MinimalConnectedDominationPolynomial"][x]

Compute from the minimal connected dominating sets:

Tally[Length/@GraphData["NauruGraph","MinimalConnectedDominatingSets"]]

Give the number of minimal dominating sets in the cubical graph:

GraphData["CubicalGraph","MinimalDominatingSetCount"]

Compute from the minimal dominating sets:

GraphData["CubicalGraph","MinimalDominatingSets"]//Length

Use the "Count" annotation:

GraphData["CubicalGraph","MinimalDominatingSets","Count"]

Return the minimal dominating sets in the cubical graph:

GraphData["CubicalGraph","MinimalDominatingSets"]

Give the minimal domination polynomial of the cubical graph:

GraphData["CubicalGraph","MinimalDominationPolynomial"][x]

Compute from the minimal dominating sets:

Tally[Length/@GraphData["CubicalGraph","MinimalDominatingSets"]]

Give the minimal total dominating set count of the cubical graph:

GraphData["CubicalGraph","MinimalTotalDominatingSetCount"]

Compute from the minimal total dominating sets:

GraphData["CubicalGraph","MinimalTotalDominatingSets"]//Length

Use the "Count" annotation:

GraphData["CubicalGraph","MinimalTotalDominatingSets","Count"]

Give the minimal total dominating sets in the cubical graph:

GraphData["CubicalGraph","MinimalTotalDominatingSets"]

Give the minimal total domination polynomial of the cubical graph:

GraphData["CubicalGraph","MinimalTotalDominationPolynomial"][x]

Compute from the minimal total dominating sets:

Tally[Length/@GraphData["CubicalGraph","MinimalTotalDominatingSets"]]

Return the minimum connected dominating set count of the cubical graph:

GraphData["CubicalGraph","MinimumConnectedDominatingSetCount"]

Compare with the connected domination polynomial:

With[{poly=GraphData["CubicalGraph","ConnectedDominationPolynomial"][x]},Coefficient[poly,x,Exponent[poly,x,Min]]]

Compare with the minimum connected dominating sets:

GraphData["CubicalGraph","MinimumConnectedDominatingSets"]//Length

Give the minimum connected dominating sets of the square graph:

GraphData["SquareGraph","MinimumConnectedDominatingSets"]

Return the number of minimum dominating sets for the cubical graph:

GraphData["CubicalGraph","MinimumDominatingSetCount"]

Do the same using the "Count" annotation:

GraphData["CubicalGraph","MinimumDominatingSets","Count"]

Compare to the value computed from the domination polynomial:

DeleteCases[CoefficientList[GraphData["CubicalGraph","DominationPolynomial"][x],x],0][[1]]

Return the minimum dominating sets for the cubical graph:

GraphData["CubicalGraph","MinimumDominatingSets"]

Length[%]

Compare to the number from the direct property:

GraphData["CubicalGraph","MinimumDominatingSetCount"]

Return the number of minimum total dominating sets for the cubical graph:

GraphData["CubicalGraph","MinimumTotalDominatingSetCount"]

Do the same using the "Count" annotation:

GraphData["CubicalGraph","MinimumTotalDominatingSets","Count"]

Compare to the value computed from the total domination polynomial:

DeleteCases[CoefficientList[GraphData["CubicalGraph","TotalDominationPolynomial"][x],x],0][[1]]

Return the minimum total dominating sets for the cubical graph:

GraphData["CubicalGraph","MinimumTotalDominatingSets"]

Length[%]

Compare to the number from the direct property:

GraphData["CubicalGraph","MinimumTotalDominatingSetCount"]

Return the number of total dominating sets of the cubical graph:

GraphData["CubicalGraph","TotalDominatingSetCount"]

Compare with the total domination polynomial:

GraphData["CubicalGraph","TotalDominationPolynomial"][1]

Compare with the total dominating sets:

GraphData["CubicalGraph","TotalDominatingSets"]//Length

Return the total dominating sets of the cubical graph:

GraphData["CubicalGraph","TotalDominatingSets"]

Return the total domination number of the cubical graph:

GraphData["CubicalGraph","TotalDominationNumber"]

Return the total domination polynomial of the cubical graph:

GraphData["CubicalGraph","TotalDominationPolynomial"][x]//Expand

Compare with the sizes of total dominating sets:

Tally[Length/@GraphData["CubicalGraph","TotalDominatingSets"]]

OpenersExampleSubsubsection18(Spacer1)Symmetry-Related Graph Properties  (7)

Display the arc transitivity of the Coxeter graph:

GraphData["CoxeterGraph","ArcTransitivity"]

List arc-transitive graphs:

GraphData["ArcTransitive"]//Short[#,5]&

Produce a table of the arc transitivities of some small arc-transitive graphs:

Grid[SortBy[{#,GraphData[#,"ArcTransitivity"]}&/@Cases[GraphData["ArcTransitive",;;10],_String],Last],Dividers->All,Alignment->Left]

Give the order of the automorphism group of the octahedral graph:

GraphData["OctahedralGraph","AutomorphismCount"]

Directly compute from the group:

aut=GraphData["OctahedralGraph","AutomorphismGroup"]

GroupOrder[aut]

List the names of groups generating the cubical graph as an (undirected) Cayley graph:

groups=GraphData["CubicalGraph","CayleyGraphGeneratingGroupNames"]

Visualize the (directed) Cayley graphs:

graphs=FiniteGroupData[#,"CayleyGraph"]&/@groups

Verify the undirected graphs are isomorphic with the cubical graph:

IsomorphicGraphQ[GraphData["CubicalGraph"],UndirectedGraph[#]]&/@graphs

List group representations (not necessarily corresponding to distinct groups) that generate the cubical graph as an (undirected) Cayley graph:

groups=GraphData["CubicalGraph","CayleyGraphGeneratingGroups"]

GraphicsGrid[Partition[graphs=CayleyGraph/@groups,UpTo[4]]]

Verify these all generate the cubical graph:

Union[ToEntity/@UndirectedGraph/@graphs]

Give the distinguishing number of the Petersen graph:

GraphData["PetersenGraph","DistinguishingNumber"]

Give the number of minimum distinguishing labelings of the Petersen graph:

GraphData["PetersenGraph","MinimumDistinguishingLabelingCount"]

Do the same using the "Count" annotation:

GraphData["PetersenGraph","MinimumDistinguishingLabelings","Count"]

Give minimum distinguishing labelings of the Petersen graph:

GraphData["SquareGraph","MinimumDistinguishingLabelings"]

Length[%]

Compare with the value from the direct property:

GraphData["SquareGraph","MinimumDistinguishingLabelingCount"]

OpenersExampleSubsubsection19(Spacer1)Information-Related Graph Properties  (9)

Give the bandwidth of the 5-hypercube graph:

GraphData[{"Hypercube",5},"Bandwidth"]

Compare to the known closed form:

With[{n=5},Sum[Binomial[k,Floor[k/2]],{k,0,n-1}]]

Give the burning number of the 5-star graph:

GraphData[{"Star",5},"BurningNumber"]

Give the gonality of the 5-star graph:

GraphData[{"Star",5},"Gonality"]

Return the likelihood of the Petersen graph:

GraphData["PetersenGraph","Likelihood"]

Likelihoods are normalized for fixed node count:

Total/@Table[GraphData[#,"Likelihood"]&/@GraphData[n],{n,7}]

Return the Lovász number of the 5-cycle graph:

GraphData[{"Cycle",5},"LovaszNumber"]

Give the pathwidths of the hypercube graphs:

Table[GraphData[{"Hypercube",n},"Pathwidth"],{n,10}]

Compare to the known closed form:

Table[Sum[Binomial[k,Floor[k/2]],{k,0,n-1}],{n,10}]

Display the Shannon capacity of the cubical graph:

GraphData["CubicalGraph","ShannonCapacity"]

Give the tree depth of a complete graph:

GraphData[{"Complete",10},"TreeDepth"]

Give the treewidth of a complete graph:

GraphData[{"Complete",10},"Treewidth"]

Give the treewidth of a complete bipartite graph:

GraphData[{"CompleteBipartite",{2,7}},"Treewidth"]

OpenersExampleSubsubsection20(Spacer1)Path- and Cycle-Related Properties  (37)

Return the number of chordless cycles in the Petersen graph:

GraphData["PetersenGraph","ChordlessCycleCount"]

Verify against the chordless cycle polynomial:

GraphData["PetersenGraph","ChordlessCyclePolynomial"][1]

Verify against the chordless cycles:

GraphData["PetersenGraph","ChordlessCycles"]

Tally[Length/@%][[All,2]]//Total

Return the chordless cycle polynomial of the Petersen graph:

GraphData["PetersenGraph","ChordlessCyclePolynomial"][x]

Give the chordless cycles of the Petersen graph:

cc=GraphData["PetersenGraph","ChordlessCycles"]

Tally[Length/@cc]

Visually verify the returned cycles are chordless:

GraphicsGrid[Partition[Subgraph[EdgeList[GraphData["PetersenGraph"]],#]&/@cc,UpTo[8]]]

Return the number of off chordless cycles in the complement of the Petersen graph:

GraphData["PetersenGraph","ComplementOddChordlessCycleCount"]

Verify against the odd chordless cycle polynomial:

GraphData["PetersenGraph","ComplementOddChordlessCyclePolynomial"][1]

Verify against the chordless cycles:

GraphData["PetersenGraph","ComplementOddChordlessCycles"]

Tally[Length/@%][[All,2]]//Total

Return the chordless cycle polynomial in the complement of the Petersen graph:

GraphData["PetersenGraph","ComplementOddChordlessCyclePolynomial"][x]

Compare with the property computed from the complement:

GraphData[GraphData["PetersenGraph","ComplementGraph","Name"],"OddChordlessCyclePolynomial"][x]

Return the chordless cycles of the complement of the Petersen graph:

GraphData["PetersenGraph","ComplementOddChordlessCycles"]

Return the number of cycles of the cubical graph:

GraphData["CubicalGraph","CycleCount"]

Do the same using the "Count" annotation:

GraphData["CubicalGraph","Cycles","Count"]

Return the cycles:

GraphData["CubicalGraph","Cycles"]

Length[%]

Give the cycle polynomial of the cubical graph as a pure function:

GraphData["CubicalGraph","CyclePolynomial"]

Compare to cycle tallies:

GraphData["CubicalGraph","CyclePolynomial"][x]

Total[#2 x^#&@@@Tally[Length/@GraphData["CubicalGraph","UndirectedCycles"]]]

Return the cycles in the cubical graph:

GraphData["CubicalGraph","Cycles"]

Return the number of Eulerian cycles of the butterfly graph:

GraphData["ButterflyGraph","EulerianCycleCount"]

Return the cycles:

ec=GraphData["ButterflyGraph","EulerianCycles"]

GraphData["ButterflyGraph","Graph","Labeled"]

Length[ec]

Visualize the Eulerian cycles:

HighlightGraph[DirectedGraph[GraphData["ButterflyGraph"]],{DirectedEdge@@@Partition[#,2,1,1]}]&/@ec

Give the tally of cubical graph face sizes:

GraphData["CubicalGraph","FaceSignature"]

Compute directly from faces:

GraphData["CubicalGraph","FaceIndices"]

Tally[Length/@%]

Display the girth of the Petersen graph:

GraphData["PetersenGraph","Girth"]

Return the number of Hamilton decompositions of the octahedral graph:

GraphData["OctahedralGraph","HamiltonDecompositionCount"]

Do the same using the "Count" annotation:

GraphData["OctahedralGraph","HamiltonDecompositions","Count"]

Return Hamilton decompositions of the octahedral graph:

GraphData["OctahedralGraph","HamiltonDecompositions"]

Length[%]

Return the number of Hamiltonian cycles of the cubical graph:

GraphData["CubicalGraph","HamiltonianCycleCount"]

Do the same using the "Count" annotation:

GraphData["CubicalGraph","HamiltonianCycles","Count"]

List the Hamiltonian cycles of the cubical graph:

hc=GraphData["CubicalGraph","HamiltonianCycles"]

Length[hc]

Display the Hamiltonian cycles:

GraphicsGrid[Partition[HighlightGraph[GraphData["CubicalGraph"],UndirectedEdge@@@Partition[#,2,1,1]]&/@hc,UpTo[4]]]

Return the Hamiltonian number of the octahedral graph:

GraphData["OctahedralGraph","HamiltonianNumber"]

Return the number of Hamiltonian paths of the tetrahedral graph:

GraphData["TetrahedralGraph","HamiltonianPathCount"]

Do the same using the "Count" annotation:

GraphData["TetrahedralGraph","HamiltonianPaths","Count"]

Return the Hamiltonian paths of the cubical graph:

hp=GraphData["TetrahedralGraph","HamiltonianPaths"]

Length[hp]

Display the Hamiltonian paths:

GraphicsGrid[Partition[HighlightGraph[GraphData["TetrahedralGraph"],{UndirectedEdge@@@Partition[#,2,1],Style[#[[1]],Green],Style[#[[-1]],Red]}]&/@hp,UpTo[4]]]

Return the number of Hamiltonian walks of the cubical graph:

GraphData["CubicalGraph","HamiltonianWalkCount"]

Do the same using the "Count" annotation:

GraphData["CubicalGraph","HamiltonianWalks","Count"]

List the Hamiltonian walks of the cubical graph:

GraphData["CubicalGraph","HamiltonianWalks"]

Give the hexagon count of the truncated tetrahedral graph:

GraphData["TruncatedTetrahedralGraph","HexagonCount"]

Compare with the value from the cycle polynomial:

Coefficient[GraphData["TruncatedTetrahedralGraph","CyclePolynomial"][x],x,6]

Return the k-cyclic indices of the butterfly graph:

GraphData["ButterflyGraph","KCyclicIndices"]

Give the longest cycle count of the (3,4)-cone graph:

GraphData[{"Cone",{3,4}},"LongestCycleCount"]

Do the same using the "Count" annotation:

GraphData[{"Cone",{3,4}},"LongestCycles","Count"]

Give the longest cycles of the (3,4)-cone graph:

GraphData[{"Cone",{3,4}},"LongestCycles"]

Length[%]

Compare to the value from the direct property:

GraphData[{"Cone",{3,4}},"LongestCycleCount"]

Compare to the number of hexagons:

GraphData[{"Cone",{3,4}},"HexagonCount"]

Give the longest path count of the (3,4)-cone graph:

GraphData[{"Cone",{3,4}},"LongestPathCount"]

Do the same using the "Count" annotation:

GraphData[{"Cone",{3,4}},"LongestPaths","Count"]

Give the longest path length of the (3,4)-cone graph:

GraphData[{"Cone",{3,4}},"LongestPathLength"]

Compare to the value obtained from the paths themselves (adjusting for the fact that a path specified by n vertices has length n-1):

Max[Length/@GraphData[{"Cone",{3,4}},"LongestPaths"]]-1

Give the longest paths of the (3,4)-cone graph:

GraphData[{"Cone",{3,4}},"LongestPaths"]

Length[%]

Compare to the value from the direct property:

GraphData[{"Cone",{3,4}},"LongestPathCount"]

Return the number of odd chordless cycles in the Petersen graph:

GraphData["PetersenGraph","OddChordlessCycleCount"]

Verify against the chordless cycle polynomial:

GraphData["PetersenGraph","OddChordlessCyclePolynomial"][x]

%/.x->1

Verify against the chordless cycles:

GraphData["PetersenGraph","OddChordlessCycles"]

Tally[Length/@%][[All,2]]//Total

Give the odd chordless cycle polynomial of the 9-antiprism graph:

GraphData[{"Antiprism",9},"OddChordlessCyclePolynomial"][x]

Compare with the length tallies of all odd chordless cycles:

Tally[Length/@GraphData[{"Antiprism",9},"OddChordlessCycles"]]

Give the odd chordless cycles of the Petersen graph:

GraphData["PetersenGraph","OddChordlessCycles"]

Compare with the set of cycles extracted from all chordless cycles:

Select[GraphData["PetersenGraph","ChordlessCycles"],Length[#]>3&&Mod[Length[#],2]==1&]

Return the number of paths of the butterfly graph:

GraphData["ButterflyGraph","PathCount"]

Do the same using the "Count" annotation:

GraphData["ButterflyGraph","Paths","Count"]

Return the cycles:

GraphData["ButterflyGraph","Paths"]

Length[%]

Give the path polynomial of the butterfly graph as a pure function:

GraphData["ButterflyGraph","PathPolynomial"]

Compare to path length tallies:

GraphData["ButterflyGraph","PathPolynomial"][x]

Total[#2 x^#&@@@Tally[Length/@GraphData["ButterflyGraph","Paths"]]]

Return the paths in the butterfly graph:

GraphData["ButterflyGraph","Paths"]

Give the pentagon count of the snub cubical graph:

GraphData["SnubCubicalGraph","PentagonCount"]

Compare with the value from the cycle polynomial:

Coefficient[GraphData["SnubCubicalGraph","CyclePolynomial"][x],x,5]

Give the square count of the snub cubical graph:

GraphData["SnubCubicalGraph","SquareCount"]

Compare with the value from the cycle polynomial:

Coefficient[GraphData["SnubCubicalGraph","CyclePolynomial"][x],x,4]

Graphs with nonzero square count should not be square-free:

GraphData["SnubCubicalGraph","SquareFree"]

Give the square count of the snub cubical graph:

GraphData["SnubCubicalGraph","TriangleCount"]

Compare with the value from the cycle polynomial:

Coefficient[GraphData["SnubCubicalGraph","CyclePolynomial"][x],x,3]

Graphs with nonzero triangle count should not be triangle-free:

GraphData["SnubCubicalGraph","TriangleFree"]

OpenersExampleSubsubsection21(Spacer1)Graph Centralities  (11)

Closeness centralities:

GraphData["EGraph","ClosenessCentralities"]

GraphData["EGraph","Graph","Labeled"]

With[{g="EGraph"},
SetProperty[GraphData[g],{
VertexLabels->Thread[Range[GraphData[g,"VertexCount"]]->GraphData[g,"ClosenessCentralities"]],
ImagePadding->{{0,15},{0,30}}
}]]

Degree centralities:

GraphData["AGraph","DegreeCentralities"]

Identical to degrees:

GraphData["AGraph","Degrees"]

GraphData["AGraph","Graph","Labeled"]

With[{g="AGraph"},
SetProperty[GraphData[g],{
VertexLabels->Thread[Range[GraphData[g,"VertexCount"]]->GraphData[g,"DegreeCentralities"]],
ImagePadding->{{0,10},{0,10}}
}]]

Eccentricity centralities:

GraphData["EGraph","EccentricityCentralities"]

Identical to reciprocal of vertex eccentricities for a connected graph:

1/GraphData["EGraph","Eccentricities"]

Edge betweenness centralities:

GraphData["RGraph","EdgeBetweennessCentralities"]

Eigenvector centralities:

GraphData["RGraph","EigenvectorCentralities"]

HITS centralities:

GraphData["RGraph","HITSCentralities"]

GraphData["RGraph","Graph","Labeled"]

With[{g="RGraph"},
SetProperty[GraphData[g],{
VertexLabels->Thread[Range[GraphData[g,"VertexCount"]]->#],
ImagePadding->{{0,50},{0,40}}
}]&/@GraphData[g,"HITSCentralities"]]

Katz centralities:

GraphData["RGraph","KatzCentralities"]

Link rank centralities:

GraphData["RGraph","LinkRankCentralities"]

Page rank centralities:

GraphData["DiamondGraph","PageRankCentralities"]

Return using explicit variables:

GraphData["DiamondGraph","PageRankCentralities"][α]

GraphData["DiamondGraph","Graph","Labeled"]

With[{g="DiamondGraph"},
SetProperty[GraphData[g],{
VertexLabels->Thread[Range[GraphData[g,"VertexCount"]]->GraphData[g,"PageRankCentralities"][α]],
ImagePadding->{{0,80},{0,40}}
}]]

Radiality centralities:

GraphData["EGraph","RadialityCentralities"]

Status centralities:

GraphData["RGraph","StatusCentralities"]

OpenersExampleSubsubsection22(Spacer1)Naming-Related Properties  (7)

List the alternate English names of the tesseract graph:

GraphData["TesseractGraph","AlternateNames"]

Show the alternate standard names for the tesseract graph:

GraphData["TesseractGraph","AlternateStandardNames"]

Give the entity for the Petersen graph:

GraphData["PetersenGraph","Entity"]

Give the textual name of the octahedral graph:

GraphData["OctahedralGraph","Name"]

Give the name of the complete graph (Subscript[K, 4]):

GraphData[{"Complete",4},"Name"]

Verify the standard name for this graph:

GraphData[{"Complete",4},"StandardName"]

GraphData[%,"Name"]

Give all textual names of the octahedral graph:

GraphData["OctahedralGraph","Names"]

Query the standard name of the 4-hypercube graph:

GraphData[{"Hypercube",4},"StandardName"]

Show other alternate standard names corresponding to this standard name:

GraphData["TesseractGraph","AlternateStandardNames"]

Union[GraphData[#,"StandardName"]&/@%]

Give the standard name of the complete graph (Subscript[K, 4]):

GraphData[{"Complete",4},"StandardName"]

GraphData["TetrahedralGraph","StandardName"]

Give all standard names of the octahedral graph:

GraphData["OctahedralGraph","StandardNames"]

OpenersExampleSubsubsection23(Spacer1)Notation-Related Properties  (3)

Give LCF notations for the octahedral graph (sorted by exponents):

GraphData["IcosahedralGraph","LCFNotations"]//Short

Length[%]

Tally the LCF notation exponents:

Tally[GraphData["IcosahedralGraph","LCFNotations"][[All,2]]]

Display the nontrivial LCF embeddings:

lcf=GraphData["IcosahedralGraph","Graph","LCF"];
GraphicsGrid[{lcf[[1;;2]],lcf[[3;;]]}]

Give the primary notation of the cubical graph:

GraphData["CubicalGraph","Notation"]

Display the notation with traditional typesetting:

GraphData["CubicalGraph","Notation"]/.s_String:>Style[s,Italic]//TraditionalForm

Give a list of rules for notations associated with the complete graph (Subscript[K, 4]):

GraphData[{"Complete",4},"NotationRules"]

Give rules for various notations for the octahedral graph:

GraphData["OctahedralGraph","NotationRules"]

OpenersExampleSubsubsection24(Spacer1)Basic Classes  (4)

Bipartite graphs:

GraphData["Bipartite"]//Short[#,5]&

GraphData["UtilityGraph","Bipartite"]

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Bipartite",;;6],UpTo[10]]]

Nonplanar graphs:

GraphData["Nonplanar"]//Short[#,5]&

GraphData["UtilityGraph","Nonplanar"]

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Nonplanar",;;6],UpTo[5]]]

Planar graphs:

GraphData["Planar"]//Short[#,5]&

GraphData["IcosahedralGraph","Planar"]

GraphData["IcosahedralGraph","Nonplanar"]

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Planar",;;5],UpTo[10]]]

Trees:

GraphData["Tree"]//Short[#,5]&

GraphData[{"CompleteTree",{2,5}},"Tree"]

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Tree",;;8],UpTo[10]]]

OpenersExampleSubsubsection25(Spacer1)Classes Based on Vertex Degrees  (8)

Cubic graphs:

GraphData["Cubic"]//Short[#,5]&

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Cubic",;;10],UpTo[10]]]

Octic graphs:

GraphData["Octic"]//Short[#,5]&

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Octic",;;15],UpTo[10]]]

Quartic graphs:

GraphData["Quartic"]//Short[#,5]&

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Quartic",;;9],UpTo[10]]]

Quintic graphs:

GraphData["Quintic"]//Short[#,5]&

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Quintic",;;11],UpTo[10]]]

Regular graphs:

GraphData["Regular"]//Short[#,5]&

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Regular",;;8],UpTo[10]]]

Septic graphs:

GraphData["Septic"]//Short[#,5]&

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Septic",;;15],UpTo[10]]]

Sextic graphs:

GraphData["Sextic"]//Short[#,5]&

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["Sextic",;;10],UpTo[10]]]

Two-regular graphs:

GraphData["TwoRegular"]//Short[#,5]&

GraphicsGrid[Partition[Tooltip[GraphData[#],GraphData[#,"Name"]]&/@GraphData["TwoRegular"],UpTo[10]]]

OpenersExampleSubsubsection26(Spacer1)Classes Based on Transversals  (26)

Acyclic graphs:

GraphData["Acyclic"]//Short[#,5]&

Almost Hamiltonian graphs:

GraphData["AlmostHamiltonian"]//Short[#,5]&

Bridged graphs:

GraphData["Bridged"]//Short[#,5]&

Bridgeless graphs:

GraphData["Bridgeless"]//Short[#,5]&

Chordal graphs:

GraphData["Chordal"]//Short[#,5]&

Chordless graphs:

GraphData["Chordless"]//Short[#,5]&

Cyclic graphs:

GraphData["Cyclic"]//Short[#,5]&

Eulerian graphs:

GraphData["Eulerian"]//Short[#,5]&

Hamilton-connected graphs:

GraphData["HamiltonConnected"]//Short[#,5]&

Hamilton-decomposable graphs:

GraphData["HamiltonDecomposable"]//Short[#,5]&

Hamilton-laceable graphs:

GraphData["HamiltonLaceable"]//Short[#,5]&

Hamiltonian graphs:

GraphData["Hamiltonian"]//Short[#,5]&

(SuperStar[H])-connected graphs:

GraphData["HStarConnected"]//Short[#,5]&

Hypohamiltonian graphs:

GraphData["Hypohamiltonian"]//Short[#,5]&

Hypotraceable graphs:

GraphData["Hypotraceable"]

GraphicsGrid[Partition[GraphData/@%,3,3,{1,1},{}]]

Graphs that provide counterexamples to Kempe's purported proof of the four-color theorem:

GraphData["KempeCounterexample"]

GraphicsGrid[Partition[GraphData/@%,3],Alignment->{Automatic,Bottom},ImageSize->Medium]

Maximally nonhamiltonian graphs:

GraphData["MaximallyNonhamiltonian"]//Short[#,5]&

Median graphs:

GraphData["Median"]//Short[#,5]&

Non-tree median graphs:

Complement@@(GraphData/@{"Median","Tree"})//Short[#,5]&

Noneulerian graphs:

GraphData["Noneulerian"]//Short[#,5]&

Nonhamiltonian graphs:

GraphData["Nonhamiltonian"]//Short[#,5]&

Pancyclic graphs:

GraphData["Pancyclic"]//Short[#,5]&

Square-free graphs:

GraphData["SquareFree"]//Short[#,5]&

Traceable graphs:

GraphData["Traceable"]//Short[#,5]&

Triangle-free graphs:

GraphData["TriangleFree"]//Short[#,5]&

Unicyclic graphs:

GraphData["Unicyclic"]//Short[#,5]&

Pseudotrees that are not trees are equivalent to unicyclic graphs:

Sort[Complement@@(GraphData/@{"Pseudotree","Tree"})]===Sort[GraphData["Unicyclic"]]

Untraceable graphs:

GraphData["Untraceable"]//Short[#,5]&

OpenersExampleSubsubsection27(Spacer1)Classes Based on Chess Boards  (16)

Antelope graphs:

GraphData["Antelope"]//Short[#,5]&

Bishop graphs:

GraphData["Bishop"]//Short[#,5]&

Black bishop graphs:

GraphData["BlackBishop"]//Short[#,5]&

Fiveleaper graphs:

GraphData["Fiveleaper"]//Short[#,5]&

King graphs:

GraphData["King"]

Knight graphs:

GraphData["Knight"]

Queen graphs:

GraphData["Queen"]

Rook graphs:

GraphData["Rook"]

Rook complement graphs:

GraphData["RookComplement"]

Triangular honeycomb acute knight graphs:

GraphData["TriangularHoneycombAcuteKnight"]//Short[#,5]&

Triangular honeycomb bishop graphs:

GraphData["TriangularHoneycombBishop"]//Short[#,5]&

Triangular honeycomb king graphs:

GraphData["TriangularHoneycombKing"]//Short[#,5]&

Triangular honeycomb obtuse knight graphs:

GraphData["TriangularHoneycombObtuseKnight"]//Short[#,5]&

Triangular honeycomb queen graphs:

GraphData["TriangularHoneycombQueen"]//Short[#,5]&

Triangular honeycomb rook graphs:

GraphData["TriangularHoneycombRook"]//Short[#,5]&

White bishop graphs:

GraphData["WhiteBishop"]//Short[#,5]&

OpenersExampleSubsubsection28(Spacer1)Classes Based on Symmetry and Regularity  (17)

Arc-transitive graphs:

GraphData["ArcTransitive"]//Short[#,8]&

Asymmetric graphs:

GraphData["Asymmetric"]//Short[#,5]&

Chang graphs:

GraphData["Chang"]

Distance-regular graphs:

GraphData["DistanceRegular"]//Short[#,8]&

Distance-transitive graphs:

GraphData["DistanceTransitive"]//Short[#,8]&

Edge-transitive graphs:

GraphData["EdgeTransitive"]//Short[#,5]&

Identity graphs:

GraphData["Identity"]//Short[#,5]&

Locally Petersen graphs:

GraphData["ConwaySmithGraph","Classes"]

Paulus graphs:

GraphData["Paulus"]

Semisymmetric graphs:

GraphData["Semisymmetric"]

Strongly regular graphs:

GraphData["StronglyRegular"]//Short[#,5]&

Symmetric graphs:

GraphData["Symmetric"]//Short[#,5]&

Taylor graphs:

GraphData["Taylor"]

Vertex-transitive graphs:

GraphData["VertexTransitive"]//Short[#,5]&

Weakly regular graphs:

GraphData["WeaklyRegular"]//Short[#,5]&

Zero-symmetric graphs:

GraphData["ZeroSymmetric"]//Short[#,5]&

(0,2)-graphs:

GraphData["ZeroTwo"]//Short[#,5]&

OpenersExampleSubsubsection29(Spacer1)Classes Based on Forbidden Graphs  (3)

Beineke graphs:

GraphData["Beineke"]

GraphicsGrid[Partition[GraphData/@%,UpTo[5]],ImageSize->Medium]

Kuratowski graphs:

GraphData["Kuratowski"]

GraphicsRow[GraphData/@%]

Metelsky graphs:

GraphData["Metelsky"]

GraphicsRow[GraphData/@%]

OpenersExampleSubsubsection30(Spacer1)Special Classes  (34)

Apex graphs:

GraphData["Apex"]//Short[#,5]&

Bicolorable graphs:

GraphData["Bicolorable"]//Short[#,5]&

Bicubic graphs:

GraphData["Bicubic"]//Short[#,5]&

Cage graphs:

GraphData["Cage"]//Short[#,5]&

Cayley graphs:

GraphData["Cayley"]//Short[#,5]&

Claw-free graphs:

GraphData["ClawFree"]//Short[#,5]&

Chromatically unique graphs:

GraphData["ChromaticallyUnique"]//Short[#,5]&

Chromatically unique graphs on six or fewer vertices:

GraphData["ChromaticallyUnique",;;6]

The cubical graph is chromatically unique:

GraphData["CubicalGraph","ChromaticallyUnique"]

The antenna graph is not:

GraphData["AntennaGraph","ChromaticallyUnique"]

Find and show graphs that are cochromatic with the antenna graph:

l=Select[GraphData[GraphData["AntennaGraph","VertexCount"]],GraphData[#,"ChromaticPolynomial"]==GraphData["AntennaGraph","ChromaticPolynomial"]&]

GraphicsGrid[{GraphData/@l}]

Grid[{GraphData[#,"Name"],GraphData[#,"ChromaticPolynomial"][x]}&/@l,Alignment->Left,Dividers->All]

Claw-free graphs:

GraphData["ClawFree"]//Short[#,5]&

Conference graphs:

GraphData["Conference"]//Short[#,5]&

Critical nonplanar graphs:

GraphData["CriticalNonplanar"]//Short[#,5]&

Double-toroidal graphs:

GraphData["DoubleToroidal"]//Short[#,5]&

Fullerenes:

GraphData["Fullerene"]//Short[#,5]&

Fusenes:

GraphData["Fusene"]

GraphicsGrid[Partition[GraphData/@SortBy[%,GraphData[#,"V"]&],5,5,{1,1},{}],ImageSize->Medium]

Imperfect graphs:

GraphData["Imperfect"]//Short[#,8]&

Incidence graphs:

GraphData["Incidence"]//Short[#,8]&

Integral graphs:

GraphData["Integral"]//Short[#,5]&

LCF (regular Hamiltonian) graphs:

GraphData["LCF"]//Short[#,5]&

Line graphs:

GraphData["Line"]//Short[#,5]&

Matchstick graphs:

GraphData["Matchstick"]//Short[#,5]&

Moore graphs:

GraphData["Moore"]//Short[#,5]&

No perfect matching graphs:

GraphData["NoPerfectMatching"]//Short[#,5]&

Nonempty graphs:

GraphData["Nonempty"]//Short[#,5]&

Complement[GraphData[All],GraphData["Nonempty"]]

Nuciferous graphs:

GraphData["Nuciferous"]

Ore graphs:

GraphData["Ore"]//Short[#,5]&

Perfect graphs:

GraphData["Perfect"]//Short[#,5]&

Perfect matching graphs:

GraphData["PerfectMatching"]//Short[#,5]&

Self-complementary graphs:

GraphData["SelfComplementary"]//Short[#,5]&

Self-dual graphs:

GraphData["SelfDual"]

Snarks:

GraphData["Snark"]//Short[#,5]&

Named snarks:

DeleteCases[GraphData["Snark"],{"Snark",_}]

Toroidal graphs:

GraphData["Toroidal"]//Short[#,5]&

Triangulated graphs:

GraphData["Triangulated"]//Short[#,5]&

Unit-distance graphs:

GraphData["UnitDistance"]//Short[#,5]&

Weakly perfect graphs:

GraphData["WeaklyPerfect"]//Short[#,5]&

Well-covered graphs:

GraphData["WeaklyPerfect"]//Short[#,5]&

OpenersExampleSubsubsection31(Spacer1)Classes Associated with Polyhedra  (10)

Antiprism graphs:

GraphData["Antiprism"]

GraphicsGrid[Partition[Tooltip@@@GraphData["Antiprism",{"Graph","Name"}],UpTo[5]]]

Archimedean graphs:

GraphData["Archimedean"]

GraphicsGrid[Partition[Tooltip@@@GraphData["Archimedean",{"Graph","Name"}],UpTo[5]]]

Archimedean dual graphs:

GraphData["ArchimedeanDual"]

GraphicsGrid[Partition[Tooltip@@@GraphData["ArchimedeanDual",{"Graph","Name"}],UpTo[5]]]

Dipyramidal graphs:

GraphData["Dipyramid"]

GraphicsGrid[Partition[Tooltip@@@SortBy[GraphData["Dipyramid",{"Graph","Name"}],VertexCount[#[[1]]]&],UpTo[5]]]

Johnson skeleton graphs:

GraphData["JohnsonSkeleton"]

GraphicsGrid[Partition[Tooltip@@@SortBy[{GraphData[#],Subscript["J","JohnsonSkeleton"/.GraphData[#,"NotationRules"]]}&/@GraphData["JohnsonSkeleton"],Last],UpTo[10]]]

Platonic graphs:

GraphData["Platonic"]

GraphicsRow[Tooltip@@@SortBy[GraphData["Platonic",{"Graph","Name"}],VertexCount[#[[1]]]&]]

Polyhedral graphs:

GraphData["Polyhedral"]//Short[#,5]&

Prism graphs:

GraphData["Prism"]

Regular polychoron graphs:

GraphData["RegularPolychoron"]

Wheel graphs:

GraphData["Wheel"]

GraphicsGrid[Partition[Tooltip@@@SortBy[GraphData["Wheel",{"Graph","Name"}],VertexCount[#[[1]]]&],UpTo[5]]]

OpenersExampleSubsubsection32(Spacer1)Special Classes of Trees and Their Generalizations  (10)

Cacti:

GraphData["Cactus"]//Short[#,5]&

Caterpillar trees:

GraphData["Caterpillar"]//Short[#,5]&

Centipede trees:

GraphData["Centipede"]

Forests:

GraphData["Forest"]//Short[#,5]&

Halin graphs:

GraphData["Halin"]//Short[#,5]&

Lobster trees:

GraphData["Lobster"]//Short[#,5]&

Pseudoforests:

GraphData["Pseudoforest"]//Short[#,5]&

Pseudotrees:

GraphData["Pseudotree"]//Short[#,5]&

Spider trees:

GraphData["Spider"]//Short[#,5]&

Tripod trees:

GraphData["Tripod"]

OpenersExampleSubsubsection33(Spacer1)Classes Indexed by One or More Integers  (68)

Apollonian graphs:

GraphData["Apollonian"]

Bipartite Kneser graphs:

GraphData["BipartiteKneser"]//Short[#,5]&

Book graphs:

GraphData["Book"]

Bouwer graphs:

GraphData["Bouwer"]

Bruhat graphs:

GraphData["Bruhat"]

Caveman graphs:

GraphData["Caveman"]//Short[#,5]&

Circulant graphs:

GraphData["Circulant"]//Short[#,5]&

Complete graphs:

GraphData["Complete"]

Complete bipartite graphs:

GraphData["CompleteBipartite"]//Short[#,5]&

Complete k-partite graphs:

GraphData["CompleteKPartite"]//Short[#,5]&

Complete tripartite graphs:

GraphData["CompleteTripartite"]//Short[#,5]&

Cone graphs:

GraphData["Cone"]//Short[#,5]&

Crown graphs:

GraphData["Crown"]

Cycle graphs:

GraphData["Cycle"]

Cyclotomic graphs:

GraphData["Cyclotomic"]

Diagonal intersection graphs:

GraphData["DiagonalIntersection"]

Dipyramidal graphs:

GraphData["Dipyramid"]

Doob graphs:

GraphData["Doob"]

Empty graphs:

GraphData["Empty"]

Fan graphs:

GraphData["Fan"]//Short[#,5]&

Fibonacci cube graphs:

GraphData["FibonacciCube"]

Folded cube graphs:

GraphData["FoldedCube"]

Gear graphs:

GraphData["Gear"]

Generalized polygon graphs:

GraphData["GeneralizedPolygon"]//Short[#,5]&

Grid graphs:

GraphData["Grid"]//Short[#,5]&

Haar graphs:

GraphData["Haar"]//Short[#,5]&

Hadamard graphs:

GraphData["Hadamard"]//Short[#,5]&

Halved cube graphs:

GraphData["HalvedCube"]

Hamming graphs:

GraphData["Hamming"]//Short[#,5]&

Hanoi graphs:

SortBy[GraphData["Hanoi"],GraphData[#,"V"]&]

GraphicsRow[GraphData/@%]

Harary graphs:

GraphData["Harary"]//Short[#,5]&

Helm graphs:

GraphData["Helm"]

Honeycomb toroidal graphs:

GraphData["HoneycombToroidal"]//Short[#,5]&

Hypercube graphs:

GraphData["Hypercube"]

I-graphs:

GraphData["IGraph"]//Short[#,5]&

Johnson graphs:

GraphData["Johnson"]//Short[#,5]&

Johnson skeleton graphs:

GraphData["JohnsonSkeleton"]//Short[#,5]&

Keller graphs:

GraphData["Keller"]

Klein bottle triangulation graphs:

GraphData["KleinBottleTriangulation"]

Kneser graphs:

GraphData["Kneser"]//Short[#,5]&

Ladder graphs:

GraphData["Ladder"]

Ladder rung graphs:

GraphData["LadderRung"]

Menger sponge graphs:

GraphData["MengerSponge"]

GraphicsRow[GraphData[#,"Graph","3D"]&/@%]

Möbius ladder graphs:

GraphData["MoebiusLadder"]

Mycielski graphs:

GraphData["Mycielski"]

Odd graphs:

GraphData["Odd"]

Paley graphs:

GraphData["Paley"]

Pan graphs:

GraphData["Pan"]

Path complement graphs:

GraphData["PathComplement"]

Path graphs:

GraphData["Path"]

Permutation star graphs:

GraphData["PermutationStar"]

Sierpiński carpet graphs:

SortBy[GraphData["SierpinskiCarpet"],GraphData[#,"V"]&]

GraphicsRow[GraphData/@%]

Sierpiński sieve graphs:

SortBy[GraphData["SierpinskiSieve"],GraphData[#,"V"]&]

GraphicsRow[GraphData/@%]

Sierpiński tetrahedron graphs:

SortBy[GraphData["SierpinskiTetrahedron"],GraphData[#,"V"]&]

GraphicsRow[GraphData[#,"Graph","3D"]&/@Take[%,3]]

Stacked book graphs:

GraphData["StackedBook"]//Short[#,5]&

Stacked prism graphs:

GraphData["StackedPrism"]//Short[#,5]&

Star graphs:

SortBy[GraphData["Star"],GraphData[#,"V"]&]

GraphicsGrid[Partition[Tooltip@@@(GraphData[#,{"Graph","Name"}]&/@%),UpTo[7]]]

Sun graphs:

GraphData["Sun"]

Sunlet graphs:

SortBy[GraphData["Sunlet"],GraphData[#,"V"]&]

GraphicsGrid[Partition[Tooltip@@@(GraphData[#,{"Graph","Name"}]&/@%),UpTo[7]]]

Tetrahedral graphs:

GraphData["Tetrahedral"]

Torus grid graphs:

GraphData["TorusGrid"]

Torus triangulation graphs:

GraphData["TorusTriangulation"]

Transposition graphs:

GraphData["Transposition"]

Triangular graphs:

GraphData["Triangular"]

Triangular grid graphs:

GraphData["TriangularGrid"]

Turán graphs:

GraphData["Turan"]//Short[#,5]&

Wheel graphs:

GraphData["Wheel"]

GraphicsGrid[Partition[Tooltip@@@GraphData["Wheel",{"Graph","Name"}],UpTo[7]]]

Windmill graphs:

GraphData["Windmill"]

Wreath graphs:

GraphData["Wreath"]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (1)

Find the list of graph names matching a string wildcard expression:

GraphData["Sm*"]

Find the list of graph names matching a string expression:

GraphData["Gr"~~__]

Find the list of graph names matching a regular expression:

GraphData[RegularExpression["([A-Z].*){5}"]]

OpenersExampleSection3(Spacer1)Applications  (8)

Generate a list of graphs on five nodes:

GraphData[5]

Length[%]

Union[GraphData[#,"VertexCount"]&/@%%]

Generate a list of Hamiltonian graphs on five nodes:

GraphData["Hamiltonian",5]

Length[%]

Union[GraphData[#,{"VertexCount","Hamiltonian"}]&/@%%]

Generate a list of Hamiltonian planar graphs on five nodes:

GraphData[{"Hamiltonian","Planar"},5]

Length[%]

Union[GraphData[#,{"VertexCount","Hamiltonian","Planar"}]&/@%%]

Generate a list of graphs on five or fewer nodes:

GraphData[;;5]

Union[GraphData[#,"VertexCount"]&/@%]

Max[%]≤5

Generate an array of Cayley graphs:

GraphicsGrid[Partition[GraphData/@GraphData["Cayley",;;10],UpTo[7]]]

Visualize families of graphs by plotting edge count against vertex count:

ListPlot[Tooltip[GraphData[#,{"EdgeCount","VertexCount"}],GraphData[#,"StandardName"]]&/@GraphData[]]

ListPlot[GraphData["Crown",{"EdgeCount","VertexCount"}]]

Plot the numbers of graphs with different numbers of nodes available:

ListLinePlot[Table[Length[GraphData[n]],{n,50}]]

Show the five known connected vertex-transitive nonhamiltonian graphs:

GraphicsGrid[Partition[Show[GraphData[#],PlotLabel->TextCell[GraphData[#,"Name"],PageWidth->100,TextAlignment->Center]]&/@SortBy[GraphData[{"Connected","VertexTransitive","Nonhamiltonian"}],GraphData[#,"V"]&],UpTo[3]],Alignment->Top]

OpenersExampleSection4(Spacer1)Properties & Relations  (10)

You can use (RefLink[GraphData, paclet:ref/GraphData]) graphs directly in Combinatorica:

<<Combinatorica`

Graph["CubicalGraph"]

ShowGraph[Graph["CubicalGraph"],ImageSize->Small]

ShowGraphArray[Graph[{"Antiprism",#}]&/@Range[3,8]]

HamiltonianQ[Graph["CubicalGraph"]]

aut1=Automorphisms[Graph["CubicalGraph"]]

autgroup=GraphData["CubicalGraph","AutomorphismGroup"]/.Cycles->System`Cycles

aut2=PermutationList[#,GraphData["CubicalGraph","VertexCount"]]&/@GroupElements[autgroup]

aut1===aut2

(RefLink[FromEntity, paclet:ref/FromEntity]) can be used to make a graph from an entity:

FromEntity[(Entity["quartic transitive graph 39", Entity["Graph",{"QuarticTransitive",39}], "Entity[\"Graph\", {\"QuarticTransitive\", 39}]", "graph"])]

(RefLink[ToEntity, paclet:ref/ToEntity]) can be used to construct an entity from a graph:

ToEntity[%]

InputForm[%]

Give the tesseract graph using (RefLink[GraphData, paclet:ref/GraphData]) directly:

GraphData["TesseractGraph"]

Do the same using the explicit "Graph" property:

GraphData["TesseractGraph","Graph"]

Construct a graph using (RefLink[FromEntity, paclet:ref/FromEntity]) and the "Entity" property:

FromEntity[GraphData["TesseractGraph","Entity"]]

Construct a graph using an entity corresponding to its (RefLink[GraphData, paclet:ref/GraphData]) canonical name:

FromEntity[Entity["Graph","TesseractGraph"]]

Use a member of an indexed graph family known to (RefLink[EntityValue, paclet:ref/EntityValue]):

FromEntity[Entity["Graph",{"Path",40}]]

Convert undirected graphs to graph entities using (RefLink[ToEntity, paclet:ref/ToEntity]):

ToEntity[Graph[{1\[UndirectedEdge]2,2\[UndirectedEdge]3,3\[UndirectedEdge]1}]]

InputForm[%]

ToEntity[CompleteGraph[4]]

ToEntity[PetersenGraph[12,5]]

Convert to the corresponding (RefLink[GraphData, paclet:ref/GraphData]) entity using (RefLink[CanonicalName, paclet:ref/CanonicalName]):

CanonicalName[%]

Use (RefLink[GraphPlot, paclet:ref/GraphPlot]) and (RefLink[GraphPlot3D, paclet:ref/GraphPlot3D]) to construct graph drawings from connectivity:

GraphPlot[GraphData["DodecahedralGraph","Edges","Rule"]]

GraphPlot3D[GraphData["DodecahedralGraph","Edges","Rules"]]

Use the embedding provided by (RefLink[GraphData, paclet:ref/GraphData]):

GraphPlot[GraphData["DodecahedralGraph","AdjacencyMatrix"],VertexCoordinates->GraphData["DodecahedralGraph","VertexCoordinates"]]

Use all embeddings available:

GraphicsGrid[Partition[GraphPlot[GraphData["DodecahedralGraph","AdjacencyMatrix"],VertexCoordinates->#]&/@GraphData["DodecahedralGraph","VertexCoordinates","All"],UpTo[4]]]

Show that the integral graphs have integer-valued spectra:

Short[l1=GraphData["Integral"],4]

GraphData["TwentyFourCellGraph","Spectrum"]

l2=Select[GraphData[All],And@@IntegerQ/@GraphData[#,"Spectrum"]&];

l1==l2

Show that the graphs classified as snarks satisfy their defining properties:

Short[l1=GraphData["Snark"],4]

GraphData["Snark","LongDescription"]

Short[l2=Select[GraphData["Connected"],GraphData[#,"Cubic"]&&GraphData[#,"Bridges"]=={}&&GraphData[#,"EdgeChromaticNumber"]==4&],4]

l1==l2

Construct an attractive symmetric embedding of the Gray graph from its LCF notation:

LCFGraph[l_List,n_:1]:=Module[{v=Length[l]n},Graph[Range[v],Union[Sort/@Join[Partition[Range[v],2,1,1],MapIndexed[{#2[[1]],Mod[#1+#2[[1]]-1,v]+1}&,Flatten[Table[l,{n}]]]]],VertexCoordinates->CirclePoints[v]]]

lcf=GraphData["GrayGraph","LCFNotations"]//First

LCFGraph@@lcf

Verify that an antiprism graph is the skeleton of an antiprism:

GraphData[{"Antiprism",5}]

Get the polyhedral embedding:

GraphData[{"Antiprism",5},"PolyhedralEmbeddings"]

Display the corresponding (RefLink[PolyhedronData, paclet:ref/PolyhedronData]) object:

PolyhedronData[{"Antiprism",5}]

Get the skeleton graph from the polyhedron object:

PolyhedronData[{"Antiprism",5},"Skeleton","Name"]

PolyhedronData[{"Antiprism",5},"Skeleton"]

Show that the automorphism group of the complete graph (Subscript[K, 4]) is the symmetric group (Subscript[S, 4]):

aut=PermutationList[#,4]&/@GroupElements[GraphData[{"Complete",4},"AutomorphismGroup"]]

s4=PermutationList[#,4]&/@GroupElements[SymmetricGroup[4]]

s4==aut

OpenersExampleSection5(Spacer1)Possible Issues  (4)

(RefLink[GraphData, paclet:ref/GraphData]) results are complete when the number of graphs is not too large:

Length/@Table[GraphData[n],{n,7}]

Length/@Table[GraphData["Cubic",2n],{n,6}]

For queries corresponding to a large number of graphs, the list returned by (RefLink[GraphData, paclet:ref/GraphData]) may not be exhaustive:

GraphData[8]//Length

GraphData["Cubic",20]//Length

Using nonstandard graph names will not work:

GraphData["cubical graph","VertexCount"]

Use string patterns directly in (RefLink[GraphData, paclet:ref/GraphData]):

Cases[GraphData["Cu*"],_String]

Or use general string-matching capabilities:

Select[Cases[GraphData[All],_String],StringMatchQ[#,"cubical"~~___,IgnoreCase->True]&]

GraphData["CubicalGraph","VertexCount"]

Using nonstandard property names will not work:

GraphData["CubicalGraph","vertex count"]

Use general string patterns to locate standard property names:

Select[GraphData["CubicalGraph", "Properties"],StringMatchQ[#,"vertex"~~___,IgnoreCase->True]&]

GraphData["CubicalGraph", "VertexCount"]

Arithmetical operations cannot be carried out on (RefLink[Missing, paclet:ref/Missing]) entries:

GraphData["SixHundredCellGraph","HamiltonianCycles"]<GraphData["Tutte12Cage","HamiltonianCycles"]

Remove the (RefLink[Missing, paclet:ref/Missing]) entries before performing operations:

Sort[DeleteCases[GraphData[#,{"HamiltonianCycleCount","Name"}]&/@GraphData["Hypercube"],{_Missing,_}]]

Display the data as a formatted table using (RefLink[Grid, paclet:ref/Grid]):

TextGrid[%,Frame->True,Alignment->{{Decimal,Left},Center},Background->{None,{{LightYellow,White}}}]

OpenersExampleSection6(Spacer1)Interactive Examples  (1)

Create a simple graph explorer:

Manipulate[Column[{GraphData[g],GraphData[g,p]}],{g,GraphData[All]},{p,Complement@@GraphData/@{"Properties","Classes"}}]

OpenersExampleSection7(Spacer1)Neat Examples  (3)

Display planar embeddings of the heptahedral graphs:

GraphicsGrid[Partition[Tooltip@@@(GraphData[#,{"Graph","Name"}]&/@GraphData["Polyhedral",7]),UpTo[7]]]

See the toric structure of some of the cubic symmetric graphs:

GraphPlot3D[GraphData[#,"Edges","Rule"],Boxed->False]&/@{"Foster056A","Foster162A","Foster192A"}

GraphData["Foster056A","Graph","All"][[2]]

Construct the connectivity graph of the contiguous US states plus Washington, DC:

Length[contusa=Complement[EntityList[(EntityClass["all US states with District of Columbia", EntityClass["AdministrativeDivision","AllUSStatesPlusDC"], "EntityClass[\"AdministrativeDivision\", \"AllUSStatesPlusDC\"]", "administrative divisions"])],{(Entity["Alaska, United States", Entity["AdministrativeDivision",{"Alaska","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"Alaska\", \"UnitedStates\"}]", "administrative division"]),(Entity["Hawaii, United States", Entity["AdministrativeDivision",{"Hawaii","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"Hawaii\", \"UnitedStates\"}]", "administrative division"])}]]

Make a list of rules representing adjacent states:

borderingrules=Flatten[Thread[#->EntityValue[#,"BorderingStates"]]&/@contusa];

Visualize the resulting graph:

graph1=UndirectedGraph[Graph[contusa,borderingrules],
VertexCoordinates->Reverse/@EntityValue[contusa,"Coordinates"],
VertexLabels->Placed["Name",Tooltip]]

Check the vertex and edge counts:

Through[{VertexCount,EdgeCount}[graph1]]

Compare with the counts for the "ContiguousUSAGraph":

GraphData["ContiguousUSAGraph",{"VertexCount","EdgeCount"}]

Exclude four pairs of states that either share only a single point in common or have a sea border but no land border:

exclude={{(Entity["Arizona, United States", Entity["AdministrativeDivision",{"Arizona","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"Arizona\", \"UnitedStates\"}]", "administrative division"]),(Entity["Colorado, United States", Entity["AdministrativeDivision",{"Colorado","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"Colorado\", \"UnitedStates\"}]", "administrative division"])},{(Entity["Michigan, United States", Entity["AdministrativeDivision",{"Michigan","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"Michigan\", \"UnitedStates\"}]", "administrative division"]),(Entity["Minnesota, United States", Entity["AdministrativeDivision",{"Minnesota","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"Minnesota\", \"UnitedStates\"}]", "administrative division"])},{(Entity["New Mexico, United States", Entity["AdministrativeDivision",{"NewMexico","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"NewMexico\", \"UnitedStates\"}]", "administrative division"]),(Entity["Utah, United States", Entity["AdministrativeDivision",{"Utah","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"Utah\", \"UnitedStates\"}]", "administrative division"])},{(Entity["New York, United States", Entity["AdministrativeDivision",{"NewYork","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"NewYork\", \"UnitedStates\"}]", "administrative division"]),(Entity["Rhode Island, United States", Entity["AdministrativeDivision",{"RhodeIsland","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"RhodeIsland\", \"UnitedStates\"}]", "administrative division"])}};

Visualize the excluded borders:

Function[pairs,GeoGraphics[Transpose[{{Blue,Red},Polygon[#]&/@pairs}]]]/@exclude

Construct connectivity rules excluding these four edges:

borderingrules2=Complement[borderingrules,Join[Rule@@@exclude,Rule@@@Reverse/@(exclude)]];

Visualize:

graph2=UndirectedGraph[Graph[contusa,borderingrules2],
VertexCoordinates->Reverse/@EntityValue[contusa,"Coordinates"],
VertexLabels->Placed["Name",Tooltip]]

Check the vertex and edge counts:

Through[{VertexCount,EdgeCount}[graph2]]

Verify this graph is isomorphic to the "ContiguousUSAGraph" using (RefLink[ToEntity, paclet:ref/ToEntity]):

ToEntity[graph2]

GraphData[CanonicalName[%]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Graph, paclet:ref/Graph])  ▪  (RefLink[GraphPlot, paclet:ref/GraphPlot])  ▪  (RefLink[GraphPlot3D, paclet:ref/GraphPlot3D])  ▪  (RefLink[PolyhedronData, paclet:ref/PolyhedronData])  ▪  (RefLink[KnotData, paclet:ref/KnotData])  ▪  (RefLink[LatticeData, paclet:ref/LatticeData])}, {Related Interpreter Types:  (RefLink[Graph, paclet:ref/interpreter/Graph])  ▪  (RefLink[GraphClass, paclet:ref/interpreter/GraphClass])  ▪  (RefLink[ComputedGraph, paclet:ref/interpreter/ComputedGraph])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Graph Construction & Representation, paclet:guide/GraphConstructionAndRepresentation])}, {▪(RefLinkPlain[Graphs & Networks, paclet:guide/GraphsAndNetworks])}, {▪(RefLinkPlain[Mathematical Data, paclet:guide/MathematicalData])}, {▪(RefLinkPlain[Computational Geometry, paclet:guide/ComputationalGeometry])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(Spacer1)▪(WebLink[(Spacer1)GraphData Source Information, http://reference.wolfram.com/language/note/GraphDataSourceInformation.html])}})}})