GraphDifference
GraphDifference[g1,g2]
gives the graph difference of the graphs g1 and g2.
GraphDifference[{vw,…},…]
uses rules vw to specify the graph g.
Details and Options

- The graph difference Graph[v1,e1]∖Graph[v2,e2] is given by Graph[v1⋃v2,e1∖ e2].
- GraphDifference works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

Examples
open allclose allScope (5)
GraphDifference works with undirected graphs:
Properties & Relations (6)
The vertices of the graph difference are the union of the vertices of the graphs:
The edges of the graph difference are the complement of the edges of the graphs:
The graph difference of any graph and itself is an empty graph:
The graph difference of any graph and its CompleteGraph is isomorphic to the complement of the graph:
The GraphDifference of two graphs has the same vertices as GraphUnion:
The GraphDifference of two graphs has the same vertices as GraphIntersection:
Text
Wolfram Research (2010), GraphDifference, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphDifference.html (updated 2015).
CMS
Wolfram Language. 2010. "GraphDifference." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GraphDifference.html.
APA
Wolfram Language. (2010). GraphDifference. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphDifference.html