TOPICS
Search

Graph Likelihood


The graph likelihood of a simple graph is defined by starting with the set S_1={(K_1,1)}. The following procedure is then iterated to produce a probability distribution S_n over isomorphism classes of graphs of order n. At step n, choose an integer k uniformly from {0,1,...,n-1}. Choose a graph in S_(n-1) according to its probability, and add a new vertex joined to a uniformly chosen k-element subset of its vertices. Merge any isomorphic graphs produced by this procedure by totaling their probabilities. The likelihood L(G) of a graph G on n vertices is the probability assigned to its isomorphism class in S_n.

The more general sequential-growth process, with an arbitrary distribution of the vertex degree of each new vertex, was studied by Janson and Severini (2013). The graph likelihood arising from the discrete uniform distribution on the possible degrees was introduced by Banerji et al. (2014).

GraphLikelihood

The nth iteration of this procedure produces every possible graph on n vertices. The results for graphs of orders n=1 to 4 are illustrated above. Likelihoods for all simple graphs of order up to 10 have been computed by E. Weisstein (Dec. 23, 2013).

The fact that every finite graph can be obtained, and therefore has positive likelihood, is a graph-theoretic analog of the infinite monkey theorem (Banerji et al. 2014).

L(G^_)=L(G), where G^_ is the graph complement of G. K_n and K^__n are therefore co-likely.

Since the values are probabilities, the sum of likelihoods over all n-node graphs is 1 and individual likelihoods satisfy

 0<L(G)<=1,
(1)

with L(G)=1 holding only for G=K_1. L(G) also satisfies the stronger inequality

 1/(|Aut(G)|product_(i=1)^(n)(i-1; |_(i-1)/2_|))<=L(G)<=1/(|Aut(G)|),
(2)

where |Aut(G)| is the order of the automorphism group of G (Banerji et al. 2014).

An exact recurrence is obtained by defining

 A(G)=|V(G)|!|Aut(G)|L(G).
(3)

Then A(K_1)=1, and for a graph G on n>=2 vertices,

 A(G)=sum_(v in V(G))(A(G-v))/((n-1; deg_G(v))),
(4)

where G-v denotes the vertex deletion of v from G. Equivalently,

 L(G)=1/(n!|Aut(G)|)sum_(v in V(G))(A(G-v))/((n-1; deg_G(v))).
(5)

Choosing any representative of the isomorphism class of G with vertex set V(G), the same exact recurrence gives a subset dynamic program

 F(S)=sum_(v in S)(F(S-{v}))/((|S|-1; deg_(G[S])(v))),
(6)

with F({v})=1 and

 L(G)=(F(V(G)))/(n!|Aut(G)|).
(7)

Thus graph likelihood can be computed exactly either by recursive evaluation of the vertex-deletion recurrence or, after choosing such a representative, by the subset dynamic program above. The latter uses O(2^nn) arithmetic operations and O(2^n) space (Severini and Weisstein 2026).

The following table summarizes the likelihoods for members of a number of special classes. Parameters start at 1 except for hypercube graphs (n=0), triangular graphs (n=2), antiprism graphs, barbell graphs, crown graphs, cycle graphs, Möbius ladders, prism graphs, and sun graphs (n=3), and wheel graphs (n=4). The star OEIS pair uses the shifted index n-1 and gives the numerator and denominator together for n>=4.

graphOEISvalues
Andrásfai graph1/2, 1/270, 1909/2540160000, 197065201/167682078305280000000, ...
antiprism graph13/21600, 1909/2540160000, ...
barbell graph97/129600, 79/282240000, ...
cocktail party graph K_(n×2)A394956/A3975991/2, 1/36, 13/21600, 11/1587600, ...
complete graph K_nA000012/A0001421, 1/2, 1/6, 1/24, 1/120, 1/720, ...
crown graph29/64800, 11/40642560, ...
cycle graph C_n1/6, 1/36, 1/270, 29/64800, 2/42525, ...
empty graph K^__nA000012/A0001421, 1/2, 1/6, 1/24, 1/120, 1/720, ...
hypercube graph Q_n1, 1/2, 1/36, 11/40642560, ...
ladder graph1/2, 1/36, 61/43200, 20299/2540160000, ...
ladder rung graphA394956/A3975991/2, 1/36, 13/21600, 11/1587600, ...
Möbius ladder M_n23/259200, 1909/2540160000, ...
path graph P_n1, 1/2, 1/3, 1/9, 29/1080, 2/405, 2509/3402000, 1889/20412000, ...
prism graph Y_n29/64800, 11/40642560, ...
star graph S_nA293458/A0107961, 1/2, 1/3, 5/72, 17/1440, 77/43200, 437/1814400, ...
sun graph59/25920, 101/9072000, ...
triangular graph1, 1/6, 13/21600, ...
wheel graph W_n1/24, 13/720, 203/129600, 2393/18144000, ...

For positive integers n, classes with known closed form values include

L(K_n)=1/(n!)
(8)
L(K^__n)=1/(n!)
(9)
L(S_n)={1/2 for n=2; n/((n!)^2)sum_(k=0)^(n-1)k! otherwise
(10)
={1/2 for n=2; ((-1)^n!(-n-1))/((n-1)!)-(n!(-1))/((n!)^2) otherwise.
(11)

Here K_n is a complete graph, K^__n is an empty graph, S_n is a star graph, n! is a factorial, and !n is a subfactorial.

For the ladder rung graph nP_2 with n>=1,

 L(nP_2)=1/((2n)!)sum_(2<=i_1<i_2<...<i_n<=2n)product_(j=1)^n(i_j-(2j-1))/(i_j-1).
(12)

Equivalently, its likelihood has the series-coefficient form

 L(nP_2)=1/((2n-1)!)[z^(2n)](erf^(-1)(sqrt(2/pi)z))^2,
(13)

where [z^k] denotes coefficient notation and erf^(-1)(z) is the inverse erf function. Since the cocktail party graph K_(n×2) is the graph complement of nP_2 and L(G)=L(G^_), both formulas also hold for it.

In addition, there is a relationship between L(C_n) for a cycle graph and L(P_(n-1)) for a path graph given for n>=3 by

 L(P_(n-1))=n(n-1; 2)L(C_n)
(14)

(Banerji et al. 2014).

For s>=1 and n>=2s, let G_s be the disjoint graph union of s copies of P_2 and n-2s isolated vertices. Its likelihood is

L(G_s)=1/(n!)sum_(2<=i_1<i_2<...<i_s<=n)product_(j=1)^(s)(i_j+1-2j)/(i_j-1)
(15)
=1/(n!)sum_(i_1=2)^(n-s+1)sum_(i_2=i_1+1)^(n-s+2)sum_(i_3=i_2+1)^(n-s+3)...sum_(i_s=i_(s-1)+1)^(n)(i_2-3)/(i_2-1)(i_3-5)/(i_3-1)...(i_s-(2s-1))/(i_s-1),
(16)

giving special cases

L(G_1)=(n-1)/(n!)
(17)
L(G_2)=((n-1)(n-6)+4H_(n-1))/(2n!),
(18)

where H_n is a harmonic number.

GraphLikelihoods

Values of L(G) for n-node graphs are plotted above.

GraphLikelihoodMimima

The minimizing graphs for 1<=n<=18 are illustrated above. Computations by E. Weisstein (2013) determined the minima through n=10. On this numerical evidence, Dervovic et al. (2018) conjectured that the balanced complete bipartite graph and its graph complement minimize graph likelihood for every n>=6. Severini and Weisstein (2026) determined all global minimizers through n=18. The balanced complete bipartite graph and its graph complement are the only minimizers for 4<=n<=18 except at n=5, 15, and 17. Among complete bipartite graphs of any given graph order n>=4, the balanced member uniquely minimizes graph likelihood.

The following table gives the exact minima and all minimizing graphs, up to graph isomorphism. Here K_n, C_n, and P_n denote a complete graph, a cycle graph, and a path graph, respectively, G^_ denotes the graph complement, and G union H denotes a disjoint graph union, with 2G=G union G.

nminimum likelihoodminimizing graphs
11K_1
21/2K^__2, P_2
31/6K^__3, K_3
41/(36)2P_2, C_4
51/(270)C_5
6(23)/(259200)K_(3,3), 2C_3
7(319)/(54432000)K_(3,4), K_3 union K_4
8(319)/(15240960000)K_(4,4), 2K_4
9(76441)/(115221657600000)K_(4,5), K_4 union K_5
10(76441)/(145179288576000000)K_(5,5), 2K_5
11(20692621)/(2012184939663360000000)K_(5,6), K_5 union K_6
12(20692621)/(11155553305493667840000000)K_(6,6), 2K_6
13(368997387881)/(16080060756670792571289600000000)K_(6,7), K_6 union K_7
14(368997387881)/(386307379618259120732661350400000000)K_(7,7), 2K_7
15(63977511069907)/(43503039787261205233506826321920000000000)C_5[K^__3], Catlin graph
16(7628328998218493)/(107497751435913928580204708114517196800000000000)K_(8,8), 2K_8
17(46676188724227801)/(671983801047531669544656802525006213939200000000000)H_(17)
18(2200453451294991512083)/(2881657382291313298001639051759143747136048332800000000000000)K_(9,9), 2K_9

For n=15, the minimum is attained exactly by the graph blow-up C_5[K^__3] of the cycle graph C_5 by independent sets of size 3 and by its graph complement, the Catlin graph. The blow-up is equivalently the circulant graph C_(15)(1,4,6). These two graphs have 45 and 60 edges, respectively, and their automorphism groups both have order 77760. The minimum likelihood is 1.4706...×10^(-27), and its ratio to that of K_(7,8) is

 (L(C_5[K^__3]))/(L(K_(7,8)))=(1535460265677768)/(7628328998218493)=0.20128...<1.
(19)

Thus n=15 is the first failure of the global conjecture. This counterexample is both a triangle-free graph and a vertex-transitive graph.

For n=17, the unique minimizer H_(17) is a self-complementary graph obtained from the cycle graph C_5 by replacing its vertices, in cyclic order, with K_4, K^__4, K^__4, K_4, and K_1, where K_4 and K_1 are complete graphs and K^__4 is an empty graph. Join cyclically consecutive parts completely and add no edges between nonconsecutive parts (Severini and Weisstein 2026).

Exact computation shows that, for n=18, the minimum is attained, up to graph isomorphism, exactly by the complete bipartite graph K_(9,9) and its graph complement (OEIS A234234 and A234235).

More generally, Severini and Weisstein (2026) proved

log_21/(L(K_(|_n/2_|,[n/2])))=(1/2-1/(8ln2))n^2+O(nlnn)
(20)
log_21/(min_(G)L(G))=(n^2)/2+O(nlnn)
(21)

as n->infty. Thus the ratio between the likelihood of the balanced complete bipartite graph and the minimum grows exponentially in n^2, so the conjecture fails for every sufficiently large n. They also showed that the Shannon entropy of the graph-likelihood distribution is n^2/(4ln2)+O(nlnn) bits. Consequently, the graph likelihood of the balanced complete bipartite graph is asymptotically greater than that of a typical graph generated by the uniform sequential-attachment process defining graph likelihood.

The minimum values of L(G_n) for n=1, 2, ... are 1, 1/2, 1/6, 1/36, 1/270, 23/259200, ... (OEIS A234234 and A234235).

GraphLikelihoodMaxima

Exact maxima are known through n=12, with the maximizing graphs illustrated above. Neither threshold graphs nor split graphs contains maximizers for every graph order (Severini and Weisstein 2026). For n=1, 2, ..., the maximum values are 1, 1/2, 1/3, 13/72, 307/4320, 1927/86400, ... (OEIS A234236 and A234237).


See also

Infinite Monkey Theorem, Likelihood

Explore with Wolfram|Alpha

References

Banerji, C. R. S.; Mansour, T.; and Severini, S. "A Notion of Graph Likelihood and an Infinite Monkey Theorem." J. Phys. A: Math. Theor. 47, 035101 (8 pp.), 2014. https://doi.org/10.1088/1751-8113/47/3/035101.Dervovic, D.; Mocherla, A.; and Severini, S. "Constructing Graphs with Limited Resources." 27 Feb 2018. https://arxiv.org/abs/1802.09844.Janson, S. and Severini, S. "An Example of Graph Limits of Growing Sequences of Random Graphs." J. Combin. 4, 67-80, 2013. https://doi.org/10.4310/JOC.2013.v4.n1.a3.Severini, S. and Weisstein, E. W. "The Minimum of the Graph Likelihood." 28 Oct 2026. https://arxiv.org/abs/2608.19467.Sloane, N. J. A. Sequences A000012/M0003, A000088/M1253, A000142/M1675, A010796, A234234, A234235, A234236, A234237, A293458, A394956, and A397599 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Graph Likelihood

Cite this as:

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

Subject classifications