This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Graph Construction and Representations
Graphs and Components
Graph a graph object
Edges, Vertices list of edges and vertices in a graph
M, V number of edges and vertices in a graph
Graph Representations
ToOrderedPairs get a list of edges
ToAdjacencyLists represent a graph as adjacency lists
ToAdjacencyMatrix represent a graph as an adjacency matrix
SymmetricQ test if a square matrix represents a symmetric relation
EquivalenceRelationQ test if a matrix defines an equivalence relation
ShowGraph display a graph
ShowGraphArray display several graphs
MakeGraph construct a graph using a binary predicate
RandomGraph generate a random graph
GraphUnion construct the union of two graphs
SetEdgeWeights assign weights to edges
SetVertexWeights assign weights to vertices
Graph Input and Output
ReadGraph read graph specification from a file
WriteGraph write graph specification into a file
Cycle a circular chain of edges
GridGraph graph with nodes on a grid
FiniteGraphs list of all built-in finite parameterless graphs
Wheel  ▪ Hypercube  ▪ Harary  ▪ ...