This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# GraphData

 GraphData[name]gives a graph with the specified name. GraphDatagives the value for the specified property for a named graph. GraphDatagives a list of named graphs in the specified class. GraphData[n]gives a list of named graphs with n vertices.
• Graphs can be specified by standard names such as and .
• GraphData[patt] gives a list of all graph names that match the string pattern patt.
• GraphData gives data for the i simple graph with n vertices.
• GraphData gives data for the graph of the specified type with identifier id. The identifier is typically an integer or lists of integers.
• GraphData gives a list of standard named graphs with n vertices.
• GraphData gives a list of standard named graphs with m through n vertices.
• GraphData etc. gives a list of graphs with n vertices etc. in the specified class.
• GraphData gives a list of all supported classes.
• GraphData gives a list of properties available for graphs.
• Basic graph properties include:
 "AdjacencyMatrix" adjacency matrix "DistanceMatrix" distance matrix "EdgeCount" total number of edges "EdgeIndices" pairs of vertex indices for each edge "EdgeRules" edges specified as vertex connectivity rules "FaceCount" total number of faces (for a planar graph) "FaceIndices" indices of faces (for a planar graph) "IncidenceMatrix" incidence matrix "LaplacianMatrix" Laplacian matrix "NormalizedLaplacianMatrix" normalized Laplacian matrix "VertexCount" total number of vertices
• Properties related to graph connectivity include:
 "Connected" connected "ConnectedComponentCount" number of connected components "ConnectedComponentGraphNames" names of graphs induced on connected components "ConnectedComponentIndices" indices of connected components "Disconnected" disconnected "EdgeConnectivity" minimum edge deletions to disconnect the graph "Triangulated" triangulated (maximally planar) "VertexConnectivity" minimum vertex deletions to disconnect the graph
• Properties related to graph display include:
 "AllImages" list of images of all available layouts for the graph "AllVertexCoordinates" vertex coordinates for all available layouts "Image" image of the default layout "Image3D" image embedded in 3D "LabeledImage" image of the default layout with vertex numbers included "VertexCoordinates" vertex coordinates for the default layout
• Properties returning Graph objects include:
 "ComplementGraph" graph complement "DualGraph" dual graph "Graph" graph object "LineGraph" line graph
• GraphData gives a set of specific graphs, images, or embeddings, where in 2D, may include , , , , , , , , , , , , , , and ; and in 3D, may include , , , and .
• Annotations related to graph display include:
 "Embeddings","type" embeddings of a given type "Embeddings3D","type" 3D embeddings of a given type "Graph","type" graph of a given type "Graphs","type" graphs of a given type "Images","type" images of a given type "Images3D","type" 3D images of a given type
• Properties giving pure functions representing graph polynomials include:
 "CharacteristicPolynomial" characteristic polynomial of the adjacency matrix "ChromaticPolynomial" chromatic polynomial "DetourPolynomial" characteristic polynomial of the detour matrix "DistancePolynomial" distance polynomial "FlowPolynomial" flow polynomial "IdiosyncraticPolynomial" Tutte's idiosyncratic polynomial "IndependencePolynomial" independence polynomial "LaplacianPolynomial" Laplacian polynomial "MatchingGeneratingPolynomial" matching generating polynomial "MatchingPolynomial" matching polynomial "RankPolynomial" rank polynomial "ReliabilityPolynomial" reliability polynomial "SigmaPolynomial" chromatic polynomial in falling factorial basis "TuttePolynomial" Tutte polynomial
• Coloring-related graph properties include:
 "ChromaticallyUnique" no other graph shares the chromatic polynomial "ChromaticInvariant" chromatic invariant "ChromaticNumber" chromatic number "EdgeChromaticNumber" edge chromatic number
• Graph index properties include:
 "BalabanIndex" Balaban index "CyclomaticNumber" minimum number of edges to remove to turn acyclic "DetourIndex" detour index "HararyIndex" Harary index "HosoyaIndex" Hosoya index "KirchhoffIndex" Kirchhoff index "KirchhoffSumIndex" Kirchhoff sum index "MolecularTopologicalIndex" molecular topological (second Schultz) index "StabilityIndex" stability index "TopologicalIndex" topological (first Schultz) index "WeinerIndex" Wiener index "WeinerSumIndex" Wiener sum index "ZIndex" Z index
• Global graph properties include:
 "ArcTransitivity" maximal order s of an s-arc-transitive graph "ArticulationVertices" list of vertices whose removal would disconnect the graph "AutomorphismCount" order of the vertex automorphism group "Automorphisms" vertex permutations corresponding to automorphisms "Bridges" list of edges whose removal would disconnect the graph "CliqueNumber" number of vertices in the largest clique "Corank" edge count minus vertex count plus connected component count "CrossingNumber" minimum crossings in an embedding of the graph "Degrees" degrees for each vertex "DeterminedByResistance" no other graph shares the same multiset of resistances "DeterminedBySpectrum" no other graph shares the spectrum "DetourMatrix" matrix of longest path distances "Diameter" the diameter of the graph "Eccentricities" eccentricities of each vertex "Genus" minimum number of handles to get a planar embedding "Girth" length of the shortest cycle "HamiltonianCycleCount" number of distinct directed Hamiltonian cycles "HamiltonianCycles" lists of directed Hamiltonian cycles "HamiltonianPathCount" number of distinct directed Hamiltonian paths "HamiltonianPaths" lists of directed Hamiltonian paths "IndependenceNumber" size of the largest independent set "LovaszNumber" Lovász number (estimate of Shannon capacity) "Rank" vertex count minus connected component count "RectilinearCrossingNumber" minimum crossings in a straight-line embedding "ResistanceMatrix" resistances between pairs of vertices for unit-resistance edges "ShannonCapacity" effective alphabet size in a graph-represented communication model "SpanningTreeCount" number of spanning trees "Spectrum" eigenvalues of the adjacency matrix "ToroidalCrossingNumber" minimum crossings in a toroidal embedding "Unitransitivity" maximal order s of an s-unitransitive graph
• Naming-related properties include:
 "AlternateNames" alternate English names "AlternateStandardNames" alternate standard Mathematica names "CochromaticGraphNames" graphs sharing the same chromatic polynomial "ComplementGraphName" name of the complement graph "CoresistanceGraphNames" graphs sharing the same resistance distance multiset "CospectralGraphNames" graphs sharing the same spectrum "DualGraphName" name of the graph dual "LineGraphName" name of the line graph "Name" English name "StandardName" standard Mathematica name
• Notation-related properties include:
 "LCFNotations" graph notations for embeddings based on Hamiltonian cycles "Notation" primary notation used for graph "NotationRules" rules for notations specifying the graph
• GraphData gives a list of named graphs in the specified class. GraphData gives True or False depending on whether the graph corresponding to name is in the specified class.
• GraphData gives a list of the classes in which the graph corresponding to name appears.
• Basic classes of graphs include:
 "Bipartite" bipartite (two components connected by every edge) "Nonplanar" nonplanar (requires crossings) "Planar" planar (no crossings) "Tree" tree (no cycles)
• Classes based on vertex degrees include:
 "Regular" each vertex is of the same degree "Cubic" each vertex is of degree 3 "Quartic" each vertex is of degree 4 "Quintic" each vertex is of degree 5 "Sextic" each vertex is of degree 6 "Septic" each vertex is of degree 7 "Octic" each vertex is of degree 8
• Classes based on traversals include:
 "Acyclic" free of cycles "Bridged" contains at least one bridge "Bridgeless" free of bridges "Cyclic" contains at least one cycle "Eulerian" has a closed cycle containing every edge once "HamiltonConnected" every pair of vertices bounds a Hamiltonian path "Hamiltonian" has a closed cycle containing every vertex once "HamiltonLaceable" Hamilton-connected with bipartitioned endpoints "Hypohamiltonian" one-vertex-removed graphs are Hamiltonian "Hypotraceable" one-vertex-removed graphs are traceable "KempeCounterexample" counterexample to Kempe's 4-coloring algorithm "KingsTour" tours of a chess king "KnightsTour" tours of a chess knight "Noneulerian" not Eulerian "Nonhamiltonian" not Hamiltonian "QueensTour" tours of a chess queen "SquareFree" free of 4-cycles "Traceable" contains a Hamiltonian path "TriangleFree" free of 3-cycles "Untraceable" not traceable
• Classes based on symmetry and regularity include:
 "ArcTransitive" ordered pairs of adjacent vertices have identical environments "Asymmetric" not symmetric "Chang" strongly regular on 28 vertices "DistanceRegular" all vertices have identical distance sets "DistanceTransitive" all pairs of vertices have identical distance environments "EdgeTransitive" all edges have identical environments "Identity" automorphism group is of order unity "LocallyPetersen" locally Petersen "Paulus" strongly regular on 25 or 26 vertices "Semisymmetric" regular and edge- but not vertex-transitive "StronglyRegular" strongly regular "Symmetric" both edge- and vertex-transitive "Taylor" distance-regular with intersection array of form "VertexTransitive" all vertices have identical environments "WeaklyRegular" regular, but not strongly regular "ZeroSymmetric" vertex-transitive cubic with edges partitioned into three orbits
• Special classes include:
 "Bicolorable" two or fewer vertex colors needed "Bicubic" bipartite and cubic "Cage" smallest graph of a given girth "CayleyGraph" Cayley graph "ClawFree" free of the claw graph "Conference" conference graph "CriticalNonplanar" nonplanar and removal of any vertex gives a planar graph "Fullerene" planar cubic with all bounded faces pentagons or hexagons "Fusene" planar 2-connected with all bounded faces hexagons "Incidence" incidence graph of a configuration "Integral" spectrum consists of integers "LCF" describable in LCF notation (regular Hamiltonian) "Line" line graph "Moore" graphs with the Moore property "Perfect" perfect graph "PerfectMatching" has a matching with n/2 vertices "SelfComplementary" isomorphic to its complement "SelfDual" isomorphic to its dual "Snark" snark graph "UnitDistance" embeddable with edges of unit length
• Classes associated with polyhedra include:
 "Antiprism" skeleton of an antiprism "Archimedean" skeleton of one of the 13 Archimedean solids "ArchimedeanDual" skeleton of one of the 13 Archimedean duals "Platonic" skeleton of one of the five Platonic solids "Polyhedral" skeleton of a polyhedron "Prism" skeleton of a prism "RegularPolychoron" skeleton of one of the six regular four-dimensional solids
• Special classes of trees include:
 "Caterpillar" vertices are on a central stalk or only one edge away from a stalk "Centipede" vertices and edges correspond to the configuration of a comb "Lobster" removal of leaves gives a caterpillar "Spider" one vertex of degree at most 3 and all others with degree at most 2
• Classes of graphs indexed by one or more integers include:
• GraphData or GraphData gives various annotations associated with a property. Typical annotations include:
 "Description" short textual description of the property "Information" hyperlink to additional information "LongDescription" longer textual description of the property "Note" additional information about the property "Value" the value of the property
• Using GraphData may require internet connectivity.
Return the Pappus graph:
Show all available images of the graph:
Show the spectrum of the icosahedral graph:
Generate a list of named snark graphs:
Return the Pappus graph:
 Out[1]=
Show all available images of the graph:
 Out[2]=

Show the spectrum of the icosahedral graph:
 Out[1]=

Generate a list of named snark graphs:
 Out[1]=
 Scope   (247)
Obtain a list of all standard implemented graphs:
Obtain a list of all implemented graphs:
Find the English name of a graph:
A list of alternate names can also be found:
Additional names acceptable as input can be found:
Find the list of graph classes:
Find the list of named graphs belonging to a class:
Test whether a graph belongs to a class:
Get a list of properties for a particular graph:
Get a short textual description of a property:
Get a longer textual description:
A property value can be any valid Mathematica expression:
A property that is not available for a graph has the value Missing:
Some graph properties may be Missing but still include partial information:
A property whose value is too large to include has the value Missing:
Give the adjacency matrix, returned as a SparseArray object:
Convert to an explicit matrix:
Plot the matrix using ArrayPlot:
Return the distance matrix of the octahedral graph:
Return the number of edges of the octahedral graph:
List the indices of edges of the octahedral graph:
Return the edges as a set of rules, suitable for plotting in GraphPlot:
Show the faces of the octahedral graph:
Give the incidence matrix of the octahedral graph:
Give it in expanded form:
Plot the matrix:
Give the Laplacian matrix of the octahedral graph:
Give it in expanded form:
Plot the matrix:
Give the normalized Laplacian matrix of the octahedral graph:
Give it in expanded form:
Plot the matrix:
Show the faces of the octahedral graph:
Give the vertex count:
List all connected graphs:
List connected graphs on five vertices:
Check if the graph is connected:
Check if the graph is connected:
List the indices of the connected components of the graph:
List the number of connected components:
List the names of the connected components:
List disconnected graphs on five vertices:
Check if the graph is disconnected:
Check if the graph is disconnected:
Find the edge connectivity of a complete binary tree of order 4:
List triangulated graphs:
Give the vertex connectivity of Tietze's graph:
Show all available images of the octahedral graph:
Return the vertex coordinates for all embeddings:
Show the default embedding of the octahedral graph:
Show the three-dimensional embedding of the octahedral graph returned by GraphPlot3D:
Show a labeled version of the default embedding of the octahedral graph:
Return the vertex coordinates for the default embedding:
Return the graph complement of the icosahedral graph:
Return the dual graph of the icosahedral graph:
Not all graphs have duals:
Return a graph object for the icosahedral graph:
This is also the default property for graphs:
Return the line graph of the icosahedral graph:
Return the primary embedding of a graph:
Return all tabulated embeddings of the graph:
Equivalent annotated syntax:
Return all tabulated planar embeddings of the graph:
Return all tabulated LCF embeddings of the graph:
Return an image of the primary embedding of a graph:
Return all tabulated images of the primary embedding of a graph:
Equivalent annotated syntax:
Return a 3D image of the primary embedding of a graph:
Display the characteristic polynomial of the Coxeter graph as a pure function:
As a function of a variable x:
Compare with the directly computed value:
Give the chromatic polynomial of the cubical graph as a pure function:
As a function of a variable x:
The chromatic polynomial is a special case of the rank polynomial:
Give the chromatic polynomial of the icosahedral graph in terms of a variable x:
Give the detour polynomial of the cubical graph as a pure function:
As a function of a variable x:
Give the distance polynomial of the cubical graph as a pure function:
As a function of a variable x:
Compute from distance matrix:
Give the flow polynomial of the cubical graph as a function of a variable u:
The flow polynomial is a special case of the rank polynomial:
Give the idiosyncratic polynomial of the cubical graph:
Compare with a direct computation:
Give the independence polynomial of the cubical graph:
Give the Laplacian polynomial of the cubical graph as a pure function:
As a function of a variable x:
Compute from Laplacian polynomial:
Give the matching generating polynomial of the cubical graph:
Give the matching polynomial of the cubical graph:
Give the rank polynomial of the cubical graph:
Give the reliability polynomial of the cubical graph:
The reliability polynomial is a special case of the Tutte polynomial:
Give the sigma polynomial of the cubical graph:
Give the Tutte polynomial of the cubical graph:
The Tutte polynomial is a special case of the rank polynomial:
Chromatically unique graphs:
The cubical graph is chromatically unique:
The antenna graph is not:
Display the Balaban index of the Coxeter graph:
Give the Balaban index of the isobutane graph:
Give the cyclomatic number (i.e. circuit rank) of the Coxeter graph:
Display the cyclomatic number of the icosahedral graph:
Compare with the value obtained from other properties:
Give the detour index of the cubical graph:
Give the Harary index of the cubical graph:
Give the Hosoya index of the cubical graph:
Give the Kirchhoff index of the cubical graph:
Give the Kirchhoff index of the isobutane graph:
Give the Kirchhoff sum index of the cubical graph:
Give the Kirchhoff sum index of the isobutane graph:
Give the molecular topological index of the cubical graph:
Give the stability index of the cubical graph:
Give the topological index of the cubical graph:
Give the Wiener index of the cubical graph:
Give the Wiener index of the isobutane graph:
Give the Wiener sum index of the cubical graph:
Give the Wiener sum index of the isobutane graph:
Give the Z index of the cubical graph:
Display the arc transitivity of the Coxeter graph:
List arc-transitive graphs:
Produce a table of the arc-transitivities of some small arc-transitive graphs:
Find graphs having articulation vertices:
Give the order of the automorphism group of the octahedral graph:
Explicitly give the automorphisms of the octahedral graph:
Find graphs having bridges:
List the chromatically unique graphs on 6 or fewer vertices:
Check if the square graph is chromatically unique:
Show the chromatic number of the icosahedral graph:
Display the clique number of the icosahedral graph:
Display the corank of the icosahedral graph:
Compute the corank from other graph properties:
Display the crossing number of the icosahedral graph:
The crossing number is 0 since the graph is planar:
Show the vertex degrees of the claw graph:
Give the graphs on four or fewer vertices that are determined by resistance:
Check if the cubical graph is determined by spectrum:
Check if the tesseract graph is determined by spectrum:
Give the names of the graphs with the same spectrum as the tesseract graph:
Give the detour matrix of the cubical graph:
Give the diameter of the Pappus graph:
Give the eccentricities of the Pappus graph:
Return the edge chromatic number of the 120-cell graph:
Give the genus of the cubical graph:
Display the girth of the Petersen graph:
Return the number of directed Hamiltonian cycles of the cubical graph:
List the directed Hamiltonian cycles of the cubical graph:
Return the number of Hamiltonian paths of the tetrahedral graph:
Return the Hamiltonian paths of the cubical graph:
Return the independence number of the Heawood graph:
Return the Lovász number of the 5-cycle graph:
Display the rank of the icosahedral graph:
Compute the corank from other graph properties:
Give the rectilinear crossing numbers for complete graphs:
Give the resistance matrix of the cubical graph:
Display the Shannon capacity of the cubical graph:
Display the number of spanning trees in the 120-cell graph:
Display the spectrum of the 600-cell graph:
Display a nicely formatted version:
Give the toroidal crossing numbers for complete graphs:
List the alternate English names of the tesseract graph:
Show the alternate standard names for the tesseract graph:
Show graph names for graphs that are cochromatic with the claw graph:
Show graph names for graphs that are cochromatic with the 5-star graph:
Give the names of graphs cochromatic with the bull graph:
Give the name of the graph complement of the cubical graph:
Show the graph names for the complement of graphs on four or fewer vertices:
The complement graph name of a self-complementary graph is identical to the :
Show graphs that share a resistance multiset with at least one other distinct graph:
List the names of graphs sharing the same multiset of resistances with a given graph:
Display these graphs:
Show graph names for graphs that are equivalent with a particular 20-vertex graph:
Give the names of graphs cospectral with the Shrikhande graph:
Show graph names for graphs that are cospectral with the tesseract graph:
Show the graph name for the graph that is dual to the tesseract graph:
It is in turn dual to the tesseract graph:
List graphs with a tabulated graph dual:
Show the name of the graph dual of the 24-cell graph:
Show that the 24-cell graph and tesseract graph are dual to one another:
Display the quartic transitive graph :
Verify that it is dual to itself:
Self-dual graphs are dual to themselves:
Give the name of the line graph for the Petersen graph:
Give the names of the line graphs of the Platonic graphs:
Show the Platonic graphs and their line graphs:
Show the graph names for the line graphs of graphs on four or fewer vertices:
Taking the line graph twice does not in general give back the original graph:
The line graph of a graph is isomorphic to itself only for cycle graphs or unions of identical cycle graphs:
Give the textual name of the octahedral graph:
Give the name of the complete graph :
Verify the standard name for this graph:
Query the standard name of the 4-hypercube graph:
Show other alternate standard names corresponding to this standard name:
Give the standard name of the complete graph :
Give LCF notations for the octahedral graph (sorted by exponents):
Tally the LCF notation exponents:
Display the nontrivial LCF embeddings:
Give the primary notation of the cubical graph:
Display the notation with traditional typesetting:
Give a list of rules for notations associated with the complete graph :
Give rules for various notations for the octahedral graph:
Bipartite graphs:
Nonplanar graphs:
Planar graphs:
Trees:
Regular graphs:
Cubic graphs:
Quartic graphs:
Quintic graphs:
Sextic graphs:
Septic graphs:
Octic graphs:
Acyclic graphs:
Bridged graphs:
Bridgeless graphs:
Cyclic graphs:
Eulerian graphs:
Hamilton-connected graphs:
Hamiltonian graphs:
Hamilton-laceable graphs:
Hypohamiltonian graphs:
Hypotraceable graphs:
Graphs that provide counterexamples to Kempe's purported proof of the four-color theorem:
King's tour graphs:
Knight's tour graphs:
Noneulerian graphs:
Nonhamiltonian graphs:
Queen's tour graphs:
Square-free graphs:
Traceable graphs:
Triangle-free graphs:
Untraceable graphs:
Arc-transitive graphs:
Asymmetric graphs:
Chang graphs:
Distance-regular graphs:
Distance-transitive graphs:
Edge-transitive graphs:
Identity graphs:
Locally Petersen graphs:
Paulus graphs:
Semisymmetric graphs:
Strongly regular graphs:
Symmetric graphs:
Taylor graphs:
Vertex-transitive graphs:
Weakly regular graphs:
Zero-symmetric graphs:
Bicolorable graphs:
Bicubic graphs:
Cage graphs:
Cayley graphs:
Claw-free graphs:
Conference graphs:
Critical nonplanar graphs:
Fullerenes:
Fusenes:
Incidence graphs:
Integral graphs:
LCF (regular Hamiltonian) graphs:
Line graphs:
Moore graphs:
Perfect graphs:
Perfect matching graphs:
Self-complementary graphs:
Self-dual graphs:
Named snarks:
Triangulated graphs:
Unit-distance graphs:
Antiprism graphs:
Archimedean graphs:
Archimedean dual graphs:
Platonic graphs:
Polyhedral graphs:
(Generalized) prism graphs:
Prism graphs:
Regular polychoron graphs:
Caterpillar trees:
Centipede trees:
Lobster trees:
Spider trees:
Apollonian graphs:
Bipartite Kneser graphs:
Book graphs:
Circulant graphs:
Complete graphs:
Complete bipartite graphs:
Complete tripartite graphs:
Cone graphs:
Crown graphs:
Cycle graphs:
Cyclotomic graphs:
Doob graphs:
Empty graphs:
Fan graphs:
Folded cube graphs:
Gear graphs:
Generalized polygon graphs:
Grid graphs:
Haar graphs:
Halved cube graphs:
Hamming graphs:
Hanoi graphs:
Helm graphs:
Hypercube graphs:
I-graphs:
Johnson graphs:
Kneser graphs:
Lattice graphs:
Mycielski graphs:
Odd graphs:
Paley graphs:
Pan graphs:
Path graphs:
Permutation star graphs:
Sierpinski graphs:
Square graphs:
Stacked book graphs:
Star graphs:
Sun graphs:
Sunlet graphs:
Tetrahedral graphs:
Torus grid graphs:
Triangular graphs:
Turán graphs:
Wheel graphs:
Windmill graphs:
Find the list of graph names matching a string wildcard expression:
Find the list of graph names matching a string expression:
Find the list of graph names matching a regular expression:
 Applications   (8)
Generate a list of graphs on 8 nodes:
Generate a list of Hamiltonian graphs on 8 nodes:
Generate a list of Hamiltonian planar graphs on 8 nodes:
Generate a list of graphs on 5 or fewer nodes:
Generate an array of Cayley graphs:
Visualize families of graphs by plotting edge count against vertex count:
Plot the numbers of graphs with different numbers of nodes available:
Show the five known connected vertex-transitive non-Hamiltonian graphs:
You can use GraphData graphs directly in Combinatorica:
Use GraphPlot and GraphPlot3D to construct graph drawings from connectivity:
Use the embedding provided by GraphData:
Use all embeddings available:
Show that the integral graphs have integer-valued spectra:
Show that the graphs classified as snarks satisfy their defining properties:
Construct an attractive symmetric embedding of the Gray graph from its LCF notation:
Verify that an antiprism graph is the skeleton of an antiprism:
Get the polyhedral embedding:
Display the corresponding PolyhedronData object:
Get the skeleton graph from the polyhedron object:
Using nonstandard graph names will not work:
Use string patterns directly in GraphData:
Or use general string-matching capabilities:
Using nonstandard property names will not work:
Use general string patterns to locate standard property names:
Arithmetical operations cannot be carried out on Missing entries:
Remove the Missing entries before performing operations:
Display the data as a formatted table using Grid:
Display planar embeddings of the heptahedral graphs:
See the toric structure of some of the cubic symmetric graphs:
Create a simple graph explorer: