Complete graph invariant 2026-11-05
A complete graph invariant is a graph invariant whose value determines a graph up to graph isomorphism. For graphs in a specified class, completeness meansAn ordinary invariant only requires the forward preservation statement . Completeness adds the converse: equal values must exclude graph non-isomorphism.
A direct construction proves that complete invariants exist for finite undirected simple graphs. For an -vertex graph, label its vertices and list the entries above the diagonal of its adjacency matrix in the fixed order . This gives a binary string. Repeat for every labeling and choose the least string in lexicographic order. Define to be the pair consisting of and this least string. Including distinguishes graphs whose edge string is empty but whose vertex counts differ.
Relabeling a graph permutes the same collection of candidate strings, so isomorphic graphs have the same minimum. Conversely, if two minima and vertex counts agree, some labeling of each graph gives exactly the same adjacency entries. Matching vertices with those labels is an isomorphism. This proves both directions, without assuming that the construction is computationally fast.
For an original three-vertex example, a path's possible strings are , and in the order . Its invariant is . A triangle instead gives . The difference certifies non-isomorphism. For larger graphs the naive construction may examine labelings, so mathematical completeness alone supplies no practical speed guarantee.
Canonical graph labeling produces a standardized labeled representative and is closely connected to this construction. The authors of nauty and Traces identify canonical-label production as one of their programs' tasks.[ref]
nauty and Traces by Brendan McKay and Adolfo Piperno. project overview and Documentation
A particular program's chosen representative need not be the lexicographically least string used in this illustrative definition; comparisons must use the same canonization convention.Vertex count, edge count and degree sequence are useful inexpensive invariants but are not complete. The example in graph non-isomorphism gives equal values for all three while connectedness differs. Completeness concerns the information retained, separately from the effort required to compute it.
Configuration model Created 2026-10-14 Updated 2026-10-20
For a prescribed degree sequence with even sum , attach labelled half-edges to vertex and choose a uniform perfect matching of the half-edges. Each pair becomes an edge, giving a multigraph that may have self-loops or parallel edges. The number of pairings is . Every simple graph with that degree sequence has exactly pairing representations, so conditioning on simplicity produces the uniform simple-graph model.
Erdős-Gallai theorem Created 2026-10-14 Updated 2026-11-05
The Erdős-Gallai theorem characterizes degree sequences of finite simple graphs. A nonincreasing sequence of nonnegative integers is realizable exactly when its sum is even and, for every ,Necessity comes from counting the edges incident with the first vertices: edges within that set contribute at most to the degree sum, and each outside vertex can contribute at most . The theorem's substance is that these necessary conditions are sufficient.
For example, is realized by a triangle in a graph. In contrast, has even sum but fails the inequality: . An even sum alone therefore does not guarantee a degree sequence.
Graph invariant 2026-11-05
A graph invariant assigns a value to a graph in a way preserved by graph isomorphism. For an invariant ,The value may be a number, a sequence or another mathematical object whose equality has been specified. Isomorphism preserves adjacency while allowing a relabeling of vertices; a drawing's page coordinates are therefore not a graph invariant.[ref]
Examples include vertex count, edge count, the sorted degree sequence and the number of connected components of a graph. If even one invariant differs, it proves graph non-isomorphism. Equality of an invariant usually supplies only a necessary condition. For example, a six-vertex cycle graph and two disjoint triangles both have six vertices, six edges and six degrees equal to2, but only the cycle is a connected graph. The example in graph non-isomorphism proves the obstruction through connectedness.
The adjacency matrix gives an algebraic way to construct invariants. Relabeling a graph replaces by for a permutation matrix . HenceFor a finite undirected simple graph, the th diagonal entry of counts three-step closed walks from vertex . Every triangle gives two traversal directions and three possible starting vertices, so the number of triangles in a graph isThe six-cycle has no triangles and trace zero; two disjoint triangles have trace12 and triangle count2. This invariant distinguishes them even though their degree sequences agree.
A complete graph invariant would satisfy the reverse implication too: equal values would guarantee graph isomorphism. Being easy to compute and being complete are separate properties. Combining several inexpensive invariants can reject many non-isomorphic pairs, but a surviving pair still requires a justification that the chosen information determines its adjacency structure.
Graph non-isomorphism 2026-11-05
Two graphs exhibit graph non-isomorphism when no bijection of their vertex sets preserves and reflects adjacency. For finite simple graphs and , this means there is no bijection satisfyingfor every pair of distinct vertices. Changing vertex names or drawing positions cannot establish non-isomorphism; the adjacency structure must differ.
A graph invariant is a property preserved by graph isomorphism. Different numbers of vertices, edges or connected components of a graph immediately prove non-isomorphism. Equal values of one invariant need not prove isomorphism.
For an original example, let be the six-vertex cycle graph with edges , and let be the disjoint union of graphs consisting of triangles and . Both have six vertices, six edges and degree sequence . Nevertheless, is a connected graph, whereas has two connected components. Any adjacency-preserving bijection transports a path to a path, so it would have to preserve connectedness. No such bijection exists. The common degree sequence is therefore an incomplete isomorphism test.
Finite exhaustive checking provides a direct decision procedure: if the vertex counts agree at , examine each of the possible bijections and test adjacency. If every bijection fails, the graphs are non-isomorphic. More efficient procedures can avoid enumerating all bijections; this simple procedure explains the logical criterion, rather than a practical performance bound.
Software tests also require a decision about what belongs to the structure. NetworkX's
is_isomorphic ignores node and edge attributes by default; matching functions can require them to agree.[ref]is_isomorphic documentation by NetworkX. node_match, edge_match and Examples
Two differently colored copies of the same uncolored graph can thus be isomorphic as simple graphs but non-isomorphic under a color-preserving requirement. The intended graph category must be specified before interpreting a negative result. Labelled tree count with prescribed degrees 2026-10-14
For and positive integers with , the number of labelled trees having vertex degree at label isBy the Prüfer degree formula, this is the multinomial coefficient counting sequences with occurrences of each label. If a degree is zero or the sum is wrong, there are no such trees. For the example degree sequence , there are labelled trees, one for each ordering of the labels . Knowing the vertex degrees thus constrains, but usually does not determine, the tree.
A network null model is an ensemble representing a specified baseline against which to assess an observed biological network. It should preserve the features that would otherwise confound the test: at least the number of vertices and edges, and often the degree sequence, direction, edge type, or relevant spatial constraints. It should randomize the feature whose biological organization is under investigation. An ensemble that preserves that very feature cannot test whether the feature is unusual.
For example, test whether a measured protein-protein interaction network contains more closed three-protein interaction groups than can be explained by the interaction counts of individual proteins. Define vertices as the measured proteins and an undirected edge as a reproducible detected interaction, using a fixed assay threshold and treatment of duplicates. Preselect the triangle count as the test statistic. Generate many simple random graphs by degree-preserving edge rewiring, rejecting self-loops and duplicate edges, with enough accepted swaps and separation to obtain a well-mixed reference sample. This retains the observed degree sequence while disrupting higher-order association.
Compute the same triangle count for every reference graph. Compare the observed count with this distribution; an empirical upper-tail p-value can be reported as for suitably sampled reference graphs. Report the size of the excess as well as its tail frequency, and check sensitivity to the assay threshold and any required connectivity constraint. A significant excess is evidence beyond the chosen degree baseline, while assay bias or spatial organization omitted from that baseline can still explain it.
A generative network model specifies a mechanism for producing networks, such as growth with preferential attachment, and asks what structures that mechanism creates. A network null model is defined by its role as a comparison baseline. These roles can overlap: the same random mechanism can be a proposed biological explanation in one analysis and a deliberately simplified null in another.
Pósa's theorem Created 2026-10-14 Updated 2026-11-05
Let a finite simple graph on vertices have nondecreasing degree sequence . Pósa's theorem gives the sufficient conditionfor a Hamiltonian cycle. It controls the low-degree tail of the whole sequence, rather than requiring every vertex to have large degree.
For example, any graph satisfying Dirac's theorem, with minimum degree at least , satisfies this condition. The condition is sufficient rather than necessary: the cycle is Hamiltonian but has . Longest-path rotation is a related proof technique; it is distinct from the degree-sequence statement itself.
Prüfer degree formula Created 2026-10-14 Updated 2026-10-31
For a labelled tree with vertices, the vertex degree of label is one plus the number of occurrences of in its Prüfer sequence:Each recording of corresponds to an incident edge removed when a neighbouring leaf of a graph is deleted. Exactly one incident edge remains when itself is deleted, or when it belongs to the final pair. In particular, is a leaf of a graph exactly when it never occurs in the Prüfer sequence. The same reasoning applies to each remaining tree and its remaining code. [ref]
https://www.cs.columbia.edu/~cs4203/files/GT-Lec4.pdf. Columbia University, Graph Theory Lecture 4, Proposition 7.1: degree equals occurrences plus one
For , the occurrence counts in label order are , giving the degree sequence . Its sum is , as required by the degree-sum formula. More generally, summing the occurrence counts gives , so summing the vertex degrees gives .
Simple graph 2026-10-14
An undirected simple graph is exactly a pair of setsThus every edge is a two-element set of distinct vertices. The unordered pair equals , so there is no direction. The distinctness condition excludes self-loops, and using a set of edges excludes parallel copies. A simple graph may have vertices with no incident edges; does not by itself determine . For example, and have the same edge set but different vertex sets.[ref]
https://ocw.mit.edu/courses/6-1200j-mathematics-for-computer-science-spring-2024/mit6_1200j_s24_lec11.pdf. MIT, Graphs and Coloring, Section 1.1
In the six-vertex example, the vertex neighbourhood of is , so its degree of a vertex is . In label order , the degree sequence isThis is the handshaking lemma: count each edge once at each of its two endpoints. The average degree of a graph here is . The degree sequence is a compact consistency check on an edge list; an odd sum could not describe any finite undirected graph. It also forces the number of odd degrees of vertices to be even, since the even terms do not affect the parity of the sum.
The adjacency matrix in the figure uses label order . Its entry is one exactly when , and zero otherwise. It is a symmetric matrix with zero diagonal, and each row sum gives the corresponding vertex degree. For example, row is . The fourteen ones count both directions of the seven undirected edges; they do not indicate fourteen different edges. This translates a picture into a representation suitable for calculation.
The restrictions matter. A directed graph uses an ordered pair to distinguish from , so reachability can depend on direction. A multigraph can contain several distinct edges between the same vertices; adding another would raise and to four without adding a new neighbour. A self-loop at contributes two to its undirected vertex degree, making it four, because both endpoints lie at . Specify whether self-loops are allowed in a multigraph. Finally, a weighted graph attaches numerical information to edges: if links carry travel times, minimizing the number of edges need not minimize total time. These are changes to the model, rather than changes to how the same simple graph is drawn.
Tree (graph theory) 2026-10-13
A tree is a nonempty connected graph containing no graph cycle. Think of seven locations joined so that everyone can reach everyone else, but no connection supplies an alternative route. For a finite simple graph with vertices, three descriptions are equivalent: being a tree; having exactly one simple graph path between every pair of distinct vertices; and being a connected graph with exactly edges. Here a simple graph path repeats no vertex. Connectedness in the last description is essential. [ref]
https://www.maths.tcd.ie/~dwilkins/Courses/MA2C03/MA2C03Courseware_2014to15/MA2C03_S4_Yr1415.pdf. Trinity College Dublin, graph theory notes, Theorems 4.24–4.26 and Corollary 4.27
For a concrete tree, label the vertices and take the edgeswhere abbreviates the unordered pair . There are seven vertices and six edges. The unique graph path from to is , using five edges. The degree sequence in label order is : its sum is , as the degree-sum formula predicts. Each of is a leaf of a graph, having vertex degree one.
A seven-vertex tree: one graph path, two connected components of a graph after deletion, and one graph cycle after insertion
. Details. Deleting edge leaves precisely two connected components of a graph, on and . Every edge of a tree is a bridge in a graph. Instead add edge to the original tree: it closes the unique existing graph path into exactly one graph cycle. Thus a tree provides economical connections with no redundancy: a single failed link separates locations. Every finite tree with at least two vertices has at least two instances of a leaf of a graph; the endpoints of a longest graph path supply them. [ref]
https://www.mathstat.dal.ca/~janssen/2113/notes/class14/. Dalhousie University, Trees: leaves and indispensable edges
The number alone proves nothing about connectedness: a cycle graph on together with an isolated vertex has seven vertices and six edges, yet is disconnected. Briefly, two different simple graph paths between the same vertices would contain a graph cycle. Repeatedly removing a leaf of a graph and its incident edge proves the tree count by mathematical induction, starting with one vertex and no edges.
