gives the graph sum of the graphs g1 and g2.
- GraphSum is also known as graph addition.
- GraphSum is typically used to produce multigraphs with particular subgraphs.
- GraphSum[g1,g2] gives a graph obtained by combining edges of the IndexGraph of g1 and g2.
- For graphs g1 and g2 having the same number of vertices, GraphSum[g1,g2] returns AdjacencyGraph[AdjacencyMatrix[g1]+AdjacencyMatrix[g2]].
- GraphSum takes the same options as Graph.
Examplesopen allclose all
Directed Graphs (5)
GraphSum works with directed graphs:
Undirected Graphs (5)
GraphSum works with undirected graphs:
Mixed Graphs (5)
GraphSum works with mixed graphs:
GraphSum works with multigraphs:
Weighted Graphs (5)
GraphSum works with weighted graphs:
Properties & Relations (5)
The sum of any graph and its complement is a CompleteGraph:
Neat Examples (1)
Wolfram Research (2022), GraphSum, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphSum.html.
Wolfram Language. 2022. "GraphSum." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GraphSum.html.
Wolfram Language. (2022). GraphSum. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphSum.html