Graph Operations and Modifications

A graph with a certain property can often be built starting from another graph. They may be a subgraph of a larger graph, they can be incrementally modified by deleting or adding elements, or they can be built by combining multiple graphs using Boolean operations. The Wolfram Language provides an extensive collection of functions for producing new graphs from old.

Selecting Subgraphs

(RefLink[Subgraph, paclet:ref/Subgraph]) — extract a subgraph containing vertices, edges, or combinations

(RefLink[NeighborhoodGraph, paclet:ref/NeighborhoodGraph]) — extract a subgraph up to some distance from a graph element

(RefLink[FindSpanningTree, paclet:ref/FindSpanningTree]) — find a tree that connects all vertices

Conversion of Graphs

(RefLink[UndirectedGraph, paclet:ref/UndirectedGraph]) — convert a directed graph to an undirected graph

(RefLink[DirectedGraph, paclet:ref/DirectedGraph]) — convert an undirected graph to a directed graph

Modifications of Graphs

(RefLink[VertexReplace, paclet:ref/VertexReplace]) — replace vertices using rules

Operations on Graphs

(RefLink[BooleanGraph, paclet:ref/BooleanGraph]) — Boolean combination of graphs

(RefLink[LineGraph, paclet:ref/LineGraph]) — give the line graph where edges become vertices and vice versa

(RefLink[GraphPower, paclet:ref/GraphPower]) — graph with all vertices adjacent that are n steps or fewer apart

Reachability and Relation

(RefLink[TransitiveClosureGraph, paclet:ref/TransitiveClosureGraph]) — give the transitive closure

(RefLink[TransitiveReductionGraph, paclet:ref/TransitiveReductionGraph]) — give the transitive reduction