TOPICS
Search

Simple Graph


SimpleGraph

A simple graph, also called a strict graph (Tutte 1998, p. 2), is an unweighted, undirected graph containing no graph loops or multiple edges (Gibbons 1985, p. 2; West 2000, p. 2; Bronshtein and Semendyayev 2004, p. 346). A simple graph may be either connected or disconnected.

Unless stated otherwise, the unqualified term "graph" usually refers to a simple graph. A simple graph with multiple edges is sometimes called a multigraph (Skiena 1990, p. 89).

SimpleGraphs

The number of nonisomorphic simple graphs on n nodes can be given by NumberOfGraphs[n] in the Wolfram Language package Combinatorica` , and the values for n=1, 2, ... are 1, 2, 4, 11, 34, 156, 1044, 12346, 274668, ... (OEIS A000088; see above figure). King and Palmer (cited in Read 1981) have calculated S_n up to n=24, for which

 S_(24)=195704906302078447922174862416726256004122075267063365754368.
(1)

There appears to be no standard term for a simple graph on n edges, although the words "polynema" (Kyrmse) and "polyedge" (Muñiz 2011) have been proposed for n-edge connected graphs.

All simple graphs on n nodes can be enumerated using ListGraphs[n] in the Wolfram Language package Combinatorica` and a precomputed list on up to n=7 vertices is available via GraphData[n]. A much more efficient enumeration can be done using the program geng (part of nauty) by B. McKay. However, since the order in which graphs are returned by the geng program changes as a function of time as improvements are made, the canonical ordering given on McKay's website is used here and in GraphData.

A graph may be tested in the Wolfram Language to see if it is a simple graph using SimpleGraphQ[g].

A polynomial

 g_p(x)=sum_(q)g_(pq)x^q
(2)

that enumerates the number of distinct graphs with p nodes (where g_(pq) is the number of graphs on p nodes with q edges) can be found using a rather complicated application of the Pólya enumeration theorem. This procedure gives the counting polynomial as

 g_p(x)=p!Z(S_p^((2)),1+x),
(3)

where S_p^((2)) is the pair group that acts on the 2-subsets of {1,2,...,p}, which is given by

 Z(S_p^((2)))=1/(p!)sum_((j))h_(j)product_(n=0)^(|_(p-1)/2_|)a_(2n+1)^(nj_(2n+1)+(2n+1)(j_(2n+1); 2))product_(n=1)^(|_p/2_|)[(a_na_(2n))^(n-1)]^(j_(2n))a_(2n)^(2n(j_(2n); 2))product_(q=1)^pproduct_(r=q+1)^pa_(LCM(q,r))^(j_qj_rGCD(q,r))
(4)

(Harary 1994, p. 185). Here, |_x_| is the floor function, (n; m) is a binomial coefficient, LCM is the least common multiple, GCD is the greatest common divisor, the sum (j) is over all exponent vectors of the cycle index Z(S_p) of the symmetric group S_p, and h_(j) is the coefficient of the term with exponent vector j_p in Z(S_p). The first few cyclic indices Z(S_p^((2))) are

Z(S_1^((2)))=1
(5)
Z(S_2^((2)))=a_1
(6)
Z(S_3^((2)))=1/6a_1^3+1/2a_1a_2+1/3a_3
(7)
Z(S_4^((2)))=1/(24)a_1^6+3/8a_1^2a_2^2+1/3a_3^2+1/4a_2a_4
(8)
Z(S_5^((2)))=1/(120)a_1^(10)+1/(12)a_1^4a_2^3+1/8a_1^2a_2^4+1/6a_1a_3^3+1/4a_2a_4^2+1/5a_5^5.
(9)

These can be given by the command PairGroup[SymmetricGroup[n]], x] in the Wolfram Language package Combinatorica` . Normalizing by p! and letting a_i=1+x^i then gives g_p(x), the first few of which are

g_2=1+x
(10)
g_3=1+x+x^2+x^3
(11)
g_4=1+x+2x^2+3x^3+2x^4+x^5+x^6
(12)
g_5=1+x+2x^2+4x^3+6x^4+6x^5+6x^6+4x^7+2x^8+x^9+x^(10)
(13)
g_6=1+x+2x^2+5x^3+9x^4+15x^5+21x^6+24x^7+24x^8+21x^9+15x^(10)+9x^(11)+5x^(12)+2x^(13)+x^(14)+x^(15).
(14)

These polynomials are implemented as GraphPolynomial[n, x] in the Wolfram Language package Combinatorica` .

Plugging in x=1 to any of these gives the total number of simple graphs on n nodes. All simple graphs on n nodes with k edges can be enumerated using the command ListGraphs[n, k] in the Wolfram Language package Combinatorica` . The number of nonisomorphic simple graphs on n nodes with k edges can be given by NumberOfGraphs[n, k] in the Wolfram Language package Combinatorica` , The array for the number of graphs g_(nk) having n nodes and k edges is given below (OEIS A008406).

n\k0123456789101112131415
11
211
31111
41123211
511246664211
61125915212424211595211

The mean number of edges for graphs with n vertices is given by n(n-1)/4, giving the sequence for n=1, 2, ... of 0, 1/2, 3/2, 3, 5, 15/2, 21/2, 14, 18, ... (OEIS A064038 and A014695). This means that the total number of edges in the distinct graphs of orders n=1, 2, ... are 0, 1, 6, 33, 170, 1170, 10962, 172844, 4944024, 270116280, ... (OEIS A086314).

SimpleGraphTypes

The figure above shows the first few members of various common classes of simple graphs: the antiprism graph, complete graph, cycle graph, empty graph, gear graph, prism graph, star graph, and wheel graph.


See also

Adjacency Matrix, Directed Graph, Graph, Graph Edge, Multigraph, Pseudograph, Regular Graph, Simple Directed Graph, Steinitz's Theorem, Weighted Graph

Explore with Wolfram|Alpha

References

Bronshtein, I. N. and Semendyayev, K. A. Handbook of Mathematics, 4th ed. New York: Springer-Verlag, 2004.Gibbons, A. Algorithmic Graph Theory. Cambridge, England: Cambridge University Press, 1985.Harary, F. "The Number of Linear, Directed, Rooted, and Connected Graphs." Trans. Amer. Math. Soc. 78, 445-463, 1955.Harary, F. "Enumeration of Graphs." In Graph Theory. Reading, MA: Addison-Wesley, pp. 185-187, 1994.ISGCI: Information System on Graph Class Inclusions v2.0. "List of Small Graphs." http://www.graphclasses.org/smallgraphs.html.Kyrmse, R. "Polynemas." http://www.oocities.org/kyrmse/POLIN-E.htm.McKay, B. "Simple Graphs." http://cs.anu.edu.au/~bdm/data/graphs.html.Muñiz, A. "Puzzle Zapper Blog: Pentaedges." http://puzzlezapper.com/blog/2011/04/pentaedges/. Apr. 10, 2011.Read, R. "The Graph Theorists Who Count--And What They Count." In The Mathematical Gardner (Ed. D. Klarner). Boston, MA: Prindle, Weber, and Schmidt, pp. 326-345, 1981.Skiena, S. Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Reading, MA: Addison-Wesley, p. 89, 1990.Sloane, N. J. A. Sequences A000088/M1253, A008406, A014695, A064038, and A086314 in "The On-Line Encyclopedia of Integer Sequences."Steinbach, P. Field Guide to Simple Graphs. Albuquerque, NM: Design Lab, 1990.Tutte, W. T. Graph Theory as I Have Known It. Oxford, England: Oxford University Press, 1998.West, D. B. Introduction to Graph Theory, 2nd ed. Englewood Cliffs, NJ: Prentice-Hall, 2000.

Referenced on Wolfram|Alpha

Simple Graph

Cite this as:

Weisstein, Eric W. "Simple Graph." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/SimpleGraph.html

Subject classifications