Mathematica > Computable Data > Mathematical Data >
Mathematica > Mathematics and Algorithms > Mathematical Data >

GraphData

Updated In 7 Graphic
GraphData[name]
gives an image of the graph with the specified name.
GraphData[name, "property"]
gives the value for the specified property for a named graph.
GraphData["class"]
gives 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 "PetersenGraph" and "FosterCage".
  • GraphData[patt] gives a list of all graph names that match the string pattern patt.
  • GraphData[{n, i}, ...] gives data for the i^(th) simple graph with n vertices.
  • 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.
  • GraphData[;;n] gives a list of standard named graphs with n vertices.
  • GraphData[m;;n] gives a list of standard named graphs with m through n vertices.
  • GraphData["class", n], etc. gives a list of graphs with n vertices, etc. in the specified class.
  • GraphData["Classes"] gives a list of all supported classes.
  • GraphData["Properties"] 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
"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 giving pure functions representing graph polynomials include:
"CharacteristicPolynomial"characteristic polynomial of the adjacency matrix
"ChromaticPolynomial"chromatic polynomial
"FlowPolynomial"flow polynomial
"IdiosyncraticPolynomial"Tutte's idiosyncratic polynomial
"IndependencePolynomial"independence 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 acylic
"HosoyaIndex"Hosoya index
"KirchhoffIndex"Kirchhoff index
"KirchhoffSumIndex"Kirchhoff sum index
"StabilityIndex"stability index
"WeinerIndex"Wiener index
"WeinerSumIndex"Wiener sum 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
"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 Hamiltonian cycles
"HamiltonianCycles"lists of Hamiltonian cycles
"HamiltonianPathCount"number of distinct Hamiltonian paths
"HamiltonianPaths"lists of 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
"NotationRules"rules for notations specifying the graph
"StandardName"standard Mathematica name
  • GraphData["class"] gives a list of named graphs in the specified class. GraphData[name, "class"] gives True or False depending on whether the graph corresponding to name is in the specified class.
  • GraphData[name, "Classes"] 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
"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
"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 {k,mu,1;1,mu,k}
"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
"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)
"LineGraph"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 5 Platonic solids
"Polyhedral"skeleton of a polyhedron
"Prism"skeleton of a prism
"RegularPolychoron"skeleton of one of the 6 regular 4-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:
"Apollonian"connectivity graph of a 2D Apollonian gasket
"BipartiteKneser"vertices represent k subsets and (n-k) subsets of {1 ,..., n}
"Book"graph Cartesian product of a star and a 2-path graph
"Circulant"n vertices each with identical relative adjacencies
"Complete"all pairs of vertices are connected
"CompleteBipartite"all pairs connected across two disjoint sets of vertices
"CompleteTripartite"all neighboring pairs connected across 3 disjoint sets of vertices
"Cone"graph join of a cycle graph and empty graph
"Crown"complete bipartite K_(n,n) with horizontal edges removed
"Cycle"a single cycle through n vertices
"Cyclotomic"graph with vertices adjacent if their difference is a cube in GF(n)
"Doob"Cartesian product of Shrikhande graphs and a Hamming graph
"Empty"n vertices with no edges
"Fan"graph join of an empty graph with a path graph
"FoldedCube"folded n-hypercube graph
"Gear"a wheel with vertices added between the vertices of the outer cycle
"GeneralizedPolygon"an incidence plane based on a symmetric binary relation
"Grid"an array of points with grid connectivity
"Haar"Haar (regular bipartite) graph of index n
"Hadamard"graph corresponding to a (-1, 1) matrix satisfying H H^T=n I
"HalvedCube"halved n-hypercube graph
"Hamming"direct product of m complete graphs of size n
"Hanoi"a Hanoi graph
"Helm"a wheel with a pendant edge adjoined at each cycle vertex
"Hypercube"an n-dimensional hypercube
"Johnson"graph describing adjacencies in the m-subsets of an n-set
"Kneser"vertices represent k-subsets of {1 ,..., n}
"Ladder"a 2n-vertex ladder graph
"LadderRung"graph union of n 2-paths
"Lattice"a line graph of the complete bipartite graph K_(m,n)
"MoebiusLadder"an n-sided prism graph with a half-twist
"Mycielski"a triangle-free graph with chromatic number n
"Odd"an odd graph
"Paley"graph with vertices adjacent if their difference is a square in GF(n)
"Pan"an n-cycle connected to a singleton graph by a bridge
"Path"an n-vertex tree with no branches
"PermutationStar"a "star graph" on permutations of {1 ,..., n} with edges at swaps
"Sierpinski"a Sierpinski graph
"Square"vertices represent the n2 ordered pairs of {1 ,..., n}
"StackedBook"graph Cartesian product of a star and an n-path graph
"Star"a center vertex connected to n-1 vertices
"Sun"a complete graph with erected triangles on outer edges
"Sunlet"a cycle with pendant edges
"Tetrahedral"an (n, 3) Johnson graph
"TorusGrid"grid graph on a torus
"Triangular"an (n, 2) Johnson graph
"Wheel"a cycle with all vertices connected to a center
"Windmill"m copies of the complete graph K_n with a vertex in common
  • GraphData[name, "property", "ann"] or GraphData["property", "ann"] 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.
New in 6 | Last modified in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team