BUILT-IN WOLFRAM LANGUAGE SYMBOL

GraphDisjointUnion[g_{1},g_{2}]

gives the graph disjoint union of the graphs and .

GraphDisjointUnion[g_{1},g_{2},…]

gives the disjoint union of , , ….

## Details and OptionsDetails and Options

- The graph disjoint union is given by the graph union of IndexGraph[g
_{1},1] and IndexGraph[g_{2},n+1] where n is the VertexCount for . - GraphDisjointUnion works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

## BackgroundBackground

- 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 edge sets. For edges with same vertex labels in different graphs, GraphDisjointUnion keeps all of them but uniquely relabels vertices. GraphDisjointUnion therefore corresponds to the usual meaning of “graph union” in graph theoretical parlance. The resulting graph has canonically indexed vertices with labels from 1 to the sum of initial graph vertex counts. The particular labeling of the resulting graph may therefore depend on the ordering of vertices in the original graph and on the order in which the original graphs are specified, but differently labeled graphs obtained from GraphDisjointUnion in this way all belong to the same isomorphism class.
- The adjacency matrix for a disjoint union corresponds to the block diagonal matrix of the original graph adjacency matrices.
- Related functions include GraphUnion, GraphIntersection, and GraphDifference. Unlike GraphDisjointUnion, GraphUnion keeps only one edge if multiple edges exist in different graphs having the same vertex labels. GraphIntersection gives the graph obtained from the union of vertex sets and intersection of edge sets of the original graphs. GraphDifference gives the graph obtained from the union of vertex sets of two graphs and the complement of the second graph’s edge set with respect to the first. GraphComplement gives the graph that has the same vertex set as a given graph but with edges corresponding to absent edges in the original (and vice versa).

Introduced in 2010

(8.0)

| Updated in 2014 (10.0)

© 2015 Wolfram. All rights reserved.