Fact-checked by Grok 2 weeks ago

Disjoint union of graphs

In , the disjoint union of two G and H, often denoted G \cup H or G + H, is the whose set is the union of the sets V(G) and V(H) (which are assumed to be disjoint) and whose edge set is the union of the edge sets E(G) and E(H), with no edges connecting from G to from H. This operation produces a disconnected that preserves the structure of each original as an isolated component. The disjoint union extends naturally to multiple graphs, where the result is a graph with the summed vertex and edge sets across all components, and it plays a foundational role in characterizing disconnected graphs: a graph is disconnected if and only if it is a nontrivial disjoint union of two or more connected graphs. Key properties include additivity for the independence number, \alpha(G \cup H) = \alpha(G) + \alpha(H), reflecting the ability to select independent sets independently in each component; the chromatic number, \chi(G \cup H) = \max\{\chi(G), \chi(H)\}, since colorings of the components can reuse the same palette up to the maximum required; and the vertex connectivity \kappa(G \cup H) = 0 (assuming nonempty G and H), since the resulting graph is disconnected. Additionally, the chromatic polynomial of the disjoint union factors as the product of the individual chromatic polynomials, \pi_k(G \cup H) = \pi_k(G) \cdot \pi_k(H), which aids in counting proper colorings. Beyond basic properties, the is central to the construction of cographs (or complement-reducible graphs), which are precisely the graphs obtainable from the single-vertex graph by repeated applications of and complementation; these graphs are P_4-free and have efficient recognition algorithms. It also appears in , such as in for analyzing unions of cliques or cycles, and in applications like modeling independent subsystems in networks or decomposing graphs into components for algorithmic processing. The operation's simplicity makes it a building block for more complex graph products, like the join (disjoint union plus complete bipartite edges between components), while ensuring no interactions between parts facilitates proofs in , where the becomes block-diagonal.

Definition and Notation

Formal Definition

In graph theory, the disjoint union of two graphs G = (V(G), E(G)) and H = (V(H), E(H)) with disjoint vertex sets V(G) \cap V(H) = \emptyset is defined as the graph G \sqcup H = (V(G) \cup V(H), E(G) \cup E(H)), where there are no edges connecting vertices from V(G) to V(H) . This operation combines the structures of G and H without introducing any inter-component connections, preserving the internal edges and vertices of each graph intact . The definition extends naturally to a finite family of graphs \{G_i = (V(G_i), E(G_i)) \mid i \in I\}, where the V(G_i) are pairwise disjoint: the disjoint union \bigsqcup_{i \in I} G_i has vertex set \bigcup_{i \in I} V(G_i) and edge set \bigcup_{i \in I} E(G_i), again with no edges between distinct G_i . To ensure vertex disjointness when labels may overlap, vertices are often relabeled, for example, as ordered pairs (i, v) for v \in V(G_i) and i \in I, yielding V\left( \bigsqcup_{i \in I} G_i \right) = \{(i, v) \mid i \in I, v \in V(G_i)\} and E\left( \bigsqcup_{i \in I} G_i \right) = \{\{(i, v_1), (i, v_2)\} \mid i \in I, \{v_1, v_2\} \in E(G_i)\} . Every is the disjoint union of its connected components, which are the maximal connected subgraphs, and this decomposition yields a disconnected unless all but one component is empty . For directed graphs, the G \sqcup H of two digraphs G = (V(G), A(G)) and H = (V(H), A(H)) with disjoint vertex sets preserves the arc sets A(G \sqcup H) = A(G) \cup A(H), with no arcs directed from V(G) to V(H) or vice versa, maintaining the original directions within each component .

Common Notations

In graph theory literature, the disjoint union of two graphs G and H is commonly denoted by G + H, particularly in combinatorial contexts where the operation is treated additively. This notation assumes the vertex sets of G and H are disjoint, aligning with the formal definition requiring no shared vertices. Another prevalent symbol is G \sqcup H, which explicitly highlights the disjointness of the underlying sets, and is frequently used in modern expositions and research papers. In some algebraic graph theory texts, the notation G \oplus H appears as an alternative, drawing an analogy to the direct sum in linear algebra. Within , the disjoint union of graphs is conceptualized as the coproduct in the category of graphs, though specific symbolic notation may vary. In computational implementations, libraries such as employ the function GraphDisjointUnion[G, H], while igraph uses disjoint_union(G, H). The additive notation G + H dates to mid-20th-century texts and evolved from set-theoretic unions, becoming standardized in influential works like and Murty's.

Properties

Structural Properties

The disjoint union of two graphs G and H, denoted G \sqcup H or G + H, combines their and sets without introducing any connections between them, resulting in a whose connected components are precisely the components of G and H. If both G and H are nonempty and connected, then G \sqcup H is disconnected with exactly two connected components. More generally, the number of connected components in G \sqcup H equals the sum of the numbers in G and H, as there are no edges linking vertices across the original graphs. In G \sqcup H, the degree of every vertex remains unchanged from its degree in either G or H, since no new edges are added and no existing incidences are altered. This preservation holds because the vertex sets are disjoint, ensuring that neighborhoods are confined to their respective original graphs. Consequently, structural features like isolated vertices or high-degree vertices in one graph do not affect the other. For infinite graphs, the disjoint union operation extends naturally: if both G and H are countable, then G \sqcup H is also countable, as the union of two countable is countable. The of the vertex set in G \sqcup H is the cardinal sum of the cardinalities of V(G) and V(H), and similarly for the edge set. This property ensures that the operation respects the size and structure of infinite graphs without introducing uncountable elements from countable inputs. The of G \sqcup H is the block-diagonal matrix formed by placing the adjacency matrices of G and H along the diagonal, with zero blocks off the diagonal to reflect the absence of edges between the graphs. Assuming the vertices are ordered such that those of G precede those of H, this structure directly encodes the disconnection and independence of the components.

Invariant Preservation

The of the G \sqcup H of two graphs G and H is the sum of their individual , that is, |V(G \sqcup H)| = |V(G)| + |V(H)|. Similarly, the size, or number of , is additive: |E(G \sqcup H)| = |E(G)| + |E(H)|. These properties follow directly from the construction of the , where the and sets are combined without overlap. Certain graph invariants are preserved by taking the maximum over the components. The chromatic number satisfies \chi(G \sqcup H) = \max(\chi(G), \chi(H)), as colorings of the components can be independently assigned using the larger number of colors required by either . The clique number behaves analogously: \omega(G \sqcup H) = \max(\omega(G), \omega(H)), since no edges exist between the components, preventing larger s from forming across them. In contrast, the independence number is additive: \alpha(G \sqcup H) = \alpha(G) + \alpha(H), as independent sets in the union can be formed by taking the union of maximum independent sets from each component. Spectral invariants also exhibit union-like behavior under disjoint union. The eigenvalues of the adjacency matrix of G \sqcup H form the multiset union of the eigenvalues of G and H, with multiplicities preserved from each. For the Laplacian matrix, the spectrum is likewise the multiset union of the individual Laplacian spectra, with the eigenvalue 0 having multiplicity equal to the number of components (two in the case of two graphs). Other structural invariants include the girth, which is the minimum of the girths of the components when both are defined (i.e., both graphs contain cycles): g(G \sqcup H) = \min(g(G), g(H)). The disjoint union preserves planarity: if both G and H are planar, then so is G \sqcup H, as the components can be drawn separately without crossings.

Examples and Constructions

Basic Examples

The disjoint union of two isolated vertices, each represented as the complete graph K_1, yields a graph with two vertices and no edges. This is the empty graph on two vertices, often denoted $2K_1, where the vertex set is the disjoint union of the individual vertices and the edge set is empty. A basic example involving an edge is the disjoint union K_1 + K_2, where K_2 is the complete graph on two vertices (a single edge). The resulting graph has three vertices: two connected by an edge and one isolated vertex. The vertex set combines the disjoint vertices from K_1 and K_2, while the edge set includes only the single edge from K_2, with no additional connections. For cycles, the C_3 + C_4 produces a with seven vertices and seven edges, consisting of a disconnected (C_3) and a 4-cycle (C_4). No edges exist between the two components, preserving the cyclic structures independently. The of complete graphs, K_m + K_n, forms two separate cliques of sizes m and n with no edges between them. This creates a simple disconnected cluster with \binom{m}{2} + \binom{n}{2} edges in total. To illustrate the construction, consider G = K_2 with vertices labeled 1 and 2 (edge between 1 and 2) and H = K_1 with vertex labeled 3 (no edges). The adjacency list for G + H is:
  • 1: {2}
  • 2: {1}
  • 3: {}
The vertices and edges remain distinct, with labels distinguishing the components.

Special Graph Classes

Cluster graphs, also known as disjoint unions of , form a fundamental class where the graph consists entirely of isolated complete subgraphs with no edges between them. This structure ensures that each connected component is a , making the graph free of induced P_3 paths across components. Cluster graphs arise naturally in clustering problems and network analysis, where vertices within clusters are fully connected, and clusters remain independent. Cographs represent another key class built iteratively using disjoint unions alongside complement operations. Starting from a single isolated , cographs are constructed by repeatedly applying the to combine existing cographs or taking the complement of a cograph, which inverts edges within the structure. This recursive definition yields graphs that are precisely the induced P_4-free graphs, exhibiting modular decompositions without the forbidden 4-vertex path. The operation preserves the complement-reducible property, allowing cographs to model hierarchical structures in various applications. Threshold graphs incorporate disjoint unions in their constructive definition, beginning with a single and adding either an isolated —equivalent to a with K_1—or a dominating adjacent to all existing . This process generates graphs characterized by degree sequences where neighborhoods are nested, and they are free of induced 2K_2, P_4, and C_4 subgraphs. The inclusion of isolated via enables the representation of sparse, hierarchical networks, such as dominance orders in social structures. Disjoint unions of cycles produce graphs with girth determined by the shortest cycle in the union, providing extremal constructions in for maximizing edges while avoiding shorter cycles or certain minors. For instance, the extremal function for such graphs as disconnected minors bounds the maximum edges in H-minor-free graphs, where H is the union; when H is a of cycles, ex(n, H) = n/2. These constructions highlight properties like even degrees and 2-regular components, useful in studying and cycle packing. In these special classes, invariants such as the chromatic number equal the maximum over the components, reflecting the disjoint nature of the unions.

Comparison with Other Operations

The disjoint union of two graphs G and H combines their vertex sets and edge sets without adding any edges between the components, resulting in a disconnected graph whose components are isomorphic to G and H. In contrast, the join operation G * H, also known as the complete bipartite addition, starts with the disjoint union but adds every possible edge between vertices of G and H, yielding a connected graph that is the complete bipartite graph K_{|V(G)|,|V(H)|} plus the internal edges of G and H. This fundamental difference highlights the disjoint union as preserving the isolation of components, while the join maximizes inter-component connectivity. Unlike the G \square H, which forms a on set V(G) \times V(H) with edges only when vertices differ in exactly one coordinate and are adjacent in that 's component, the introduces no such layered or grid-like interconnections. The often produces connected graphs with structured paths mimicking products of paths or cycles, whereas the maintains complete separation, akin to placing the graphs side by side without interaction. The strong product G \boxtimes H extends this further by including edges from both the and cases where vertices are adjacent in both factors simultaneously, creating denser connectivity that combines elements of layering and joining; in opposition, the represents the minimal connection, adding zero cross-edges. The lexicographic product G[H], defined by adjacency if the first coordinates are adjacent in G or identical with the second coordinates adjacent in H, effectively replaces each of G with a copy of H and connects entire copies fully whenever the original vertices in G are adjacent, leading to highly ordered and often complete-like substructures. This ordered dependency starkly differs from the , where components remain independent and no such hierarchical or adjacency-driven cross-links are imposed. Overall, while these operations all build on combining vertex sets, the uniquely emphasizes disconnection and independence, serving as the baseline for more integrative products.

Categorical Perspective

In the category of graphs, denoted Graph, the disjoint union serves as the coproduct. For any two graphs G and H, their G \sqcup H satisfies the universal property of the : for any graph K and any pair of graph s f: G \to K and g: H \to K, there exists a unique graph h: G \sqcup H \to K such that h \circ i_G = f and h \circ i_H = g, where i_G: G \to G \sqcup H and i_H: H \to G \sqcup H are the s. The inclusion morphisms i_G and i_H act as the on their respective components, G and H into G \sqcup H without alteration or overlap. This is unique up to , meaning any other object fulfilling the same is isomorphic to G \sqcup H. This structure extends naturally to categories of directed graphs and multigraphs. In categories such as DiGrphs for directed graphs and Grphs for multigraphs (which permit multiple edges), the remains the , preserving the universal property with analogous inclusions. At the foundational level, the disjoint union of graphs reduces to the in the : the vertex set of G \sqcup H is the disjoint union of the vertex sets of G and H, and similarly for the edge sets, ensuring compatibility with the graph structure.

Applications

In Graph Decomposition

The connected components theorem states that any graph can be uniquely decomposed, up to the ordering of components, as the of its maximal connected subgraphs. This decomposition partitions the vertex set into equivalence classes under the relation, where each component is a connected , and no edges exist between different components. In modular decomposition, modules are vertex subsets that behave uniformly with respect to the rest of the , and the decomposition identifies a hierarchy of such modules that is closed under disjoint unions. This structure is particularly relevant in recognizing cographs, which are graphs constructed solely from isolated vertices via repeated disjoint unions and joins, resulting in a modular decomposition tree with only union and join nodes. In spectral graph theory, the disjoint union of graphs facilitates the analysis of the , which becomes block-diagonal with blocks corresponding to the Laplacians of the individual components. This property allows the eigenvectors of the overall Laplacian to be decomposed into those of the components, enabling independent for tasks such as component identification and assessment. Historically, the played a key role in early classifications of infinite graphs, as explored by Dénes in his foundational work on the theory of finite and infinite graphs during the 1930s.

In Algorithmic Graph Theory

The of two graphs G_1 = (V_1, E_1) and G_2 = (V_2, E_2) with disjoint vertex sets can be computed in linear time by concatenating their representations, yielding a of O(|V_1| + |V_2| + |E_1| + |E_2|). This operation relabels vertices if necessary to ensure disjointness and preserves structural properties without additional overhead. Recognition algorithms for classes closed under , such as cographs, exploit this operation for efficient identification. Cographs, defined as P_4-free s built from single vertices via and joins, can be recognized in linear time, O(n + m), through construction of a cotree where nodes represent of subgraphs. This seminal processes the graph via a series of modular checks and builds the hierarchical representation directly. Module identification extends this to general graphs by computing the modular , which identifies maximal strong modules treatable as units under disjoint union-like behaviors. A recursive linear-time using lexicographic BFS orders the vertices to factorize modules and constructs the tree in O(n + m) time, enabling recognition of classes invariant under disjoint unions. In optimization problems on disconnected graphs formed by disjoint unions, computations decompose naturally across components. For example, the maximum set size is the of sizes over components, allowing to solve on each and results, reducing overall for large inputs. The additivity of invariants like independence number over disjoint unions aids such decompositions in . Software libraries provide practical implementations of that maintain attributes and support these computations. NetworkX in offers a disjoint_union function that relabels nodes sequentially and copies /node , facilitating algorithmic pipelines. Similarly, igraph in and C includes disjoint_union for multiple graphs, relabeling vertices to ensure disjointness while preserving .

References

  1. [1]
    [PDF] GRAPH THEORY WITH APPLICATIONS
    This book is intended as an introduction to graph theory. Our aim has been to present what we consider to be the basic material, together with a wide.
  2. [2]
    [PDF] Chain Theorems for Different Classes of 3-connected Graphs
    Feb 4, 2025 · We define the graph union of G and G′ as G∪G′ := (V ∪V ′,E∪E′). If V ∩ V ′ = ∅, then G and G′ are disjoint and G ∪ G′ is called a disjoint union ...<|control11|><|separator|>
  3. [3]
    [PDF] Ramsey Properties of Families of Graphs - UCSD Math
    Jul 29, 2002 · disjoint union of eight 3-structures. However, in fact, we can omit identical patterns, so in this very symmetric example one can take as G ...
  4. [4]
    [PDF] GRAPH THEORY WITH APPLICATIONS
    This book is intended as an introduction to graph theory. Our aim has been to present what we consider to be the basic material, together with a wide.
  5. [5]
    [PDF] An introduction to graph theory - arXiv
    Aug 2, 2023 · This disjoint union is denoted by G1 ⊔ G2 ⊔···⊔ Gk. Note: If G and H are two graphs, then the two graphs G ⊔ H and H ⊔ G are isomorphic ...
  6. [6]
    [PDF] An Introduction to Algebraic Graph Theory - SUNY Geneseo
    Mar 25, 2021 · Given two graphs G and H with disjoint vertex sets, we define the union of G and H, denoted by G ⊕ H, as the graph with vertex set V (G) ∪ V (H).
  7. [7]
    coproduct in nLab
    Apr 10, 2025 · The notion of coproduct is a generalization to arbitrary categories of the notion of disjoint union in the category Set.
  8. [8]
    GraphDisjointUnion - Wolfram Language Documentation
    GraphDisjointUnion gives a new graph obtained from two or more directed or undirected graphs obtained by separately taking the unions of the original vertex and ...
  9. [9]
    Disjoint union of graphs - igraph R manual pages
    Description. The union of two or more graphs are created. The graphs are assumed to have disjoint vertex sets. Usage. disjoint_union(..
  10. [10]
    [PDF] Diestel: Graph Theory - PRIP
    ... Diestel. Graph Theory. Electronic Edition 2000 cс Springer-Verlag New York 1997, 2000 ... disjoint spanning trees .................................... 58. 3.6 ...
  11. [11]
    [PDF] Spectra of graphs - CWI
    The smallest eigenvalue gives information about independence number and chromatic number. ... disjoint union of (λ + 1)-cliques by adding a new vertex ...
  12. [12]
    Graph Theory Fundamentals | SpringerLink
    Apr 4, 2025 · Moreover, if G_1 and G_2 are edge-disjoint, then G_1\cup G_2 is called the disjoint-union of G_1 and G_2.
  13. [13]
    Graph Union -- from Wolfram MathWorld
    treats vertices and edges in the components as distinct regardless of their labels. The graph disjoint union of n copies of a graph G is commonly denoted nG ( ...
  14. [14]
    Cycle Graph -- from Wolfram MathWorld
    Cycle graphs (as well as disjoint unions of cycle graphs) are two-regular. Cycle graphs are also uniquely Hamiltonian as well as dominating unique. The ...
  15. [15]
    [PDF] Section 1.4. Constructing Graphs from Other Graphs
    Sep 9, 2020 · If. G and H are disjoint, then G∪H is the disjoint union of G and H, denoted G+H. Note. In Exercise 1.4.1 it is to be shown that every graph may ...
  16. [16]
    Cluster graph modification problems - ScienceDirect.com
    A graph G = ( V , E ) is called a cluster graph if every connected component of G is a complete graph. G is called a p-cluster graph if it is a cluster graph ...
  17. [17]
    [PDF] Apex Graphs and Cographs - Digital Commons@Georgia Southern
    A cograph is a graph that can be generated from the single-vertex graph K1 using the operations of complementation and disjoint union. Due to the following ...
  18. [18]
    [PDF] Threshold graphs, shifted complexes, and graphical complexes
    Finally, we show that if N(G) = D(G) then G is threshold. We will do this by showing that G is constructed by repeatedly starring or adding a disjoint vertex.
  19. [19]
    The extremal function for disconnected minors - ScienceDirect.com
    Our first result verifies these conjectures. Theorem 3. Let H be a disjoint union of cycles. ... Graph Theory, 18 (5) (1994), pp. 431-448. Crossref View in ...
  20. [20]
    Graph Join -- from Wolfram MathWorld
    The join of graphs G1 and G2 is the union of G1 and G2, with all edges joining their disjoint point sets V1 and V2.
  21. [21]
    Graph Cartesian Product -- from Wolfram MathWorld
    The Cartesian graph product G=G_1 square G_2, also called the graph box product and sometimes simply known as "the" graph product (Beineke and Wilson 2004, ...
  22. [22]
    Graph Strong Product -- from Wolfram MathWorld
    The graph strong product is unrelated to the graph theoretic property known as graph strength.
  23. [23]
    Graph Lexicographic Product -- from Wolfram MathWorld
    The graph product denoted G-H and defined by the adjacency relations (gadjg^') or (g=g^' and hadjh^'). The graph lexicographic product is also known as the ...
  24. [24]
    None
    Summary of each segment:
  25. [25]
    [PDF] A survey of the algorithmic aspects of modular decomposition! - l'IRIF
    Modular decomposition is a technique that applies to (but is not restricted to) graphs. The notion of a module naturally appears in the proofs of many graph ...
  26. [26]
    [PDF] Math 443/543 Graph Theory Notes 5: Graphs as matrices, spectral ...
    Nov 3, 2014 · Definition 16 The disjoint union of two graphs G = G1 t G2 is the graph ... block diagonal form with L (Gi) along the diagonal for some ...
  27. [27]
    Theorie Der Endlichen und Unendlichen Graphen - Internet Archive
    May 25, 2023 · Theorie Der Endlichen und Unendlichen Graphen: Kombinatorische Topologie der Streckenkomplexie. by: Denes Konig. Publication date: 1950-01-01.
  28. [28]
    disjoint_union — NetworkX 3.5 documentation
    Combine graphs G and H. The nodes are assumed to be unique (disjoint). This algorithm automatically relabels nodes to avoid name collisions. Parameters: G,H ...
  29. [29]
    A Linear Recognition Algorithm for Cographs - SIAM.org
    In this paper we present a linear time algorithm for recognizing cographs and constructing their cotree representation.
  30. [30]
    A recursive linear time modular decomposition algorithm via LexBFS
    Oct 21, 2007 · This paper presents a simpler linear-time algorithm for computing modular decomposition trees of graphs, using slice decomposition and rooted ...