Darwin Help

Back to Index

EdgeComplement

Function EdgeComplement - construct the graph on the complementary edges

Calling Sequence  EdgeComplement(Graph)
Parameters
NameTypeDescription

Graph Graphan input graph
Return Type  Graph
Synopsis Computes the complement graph of the input. This is a graph over the same set of nodes, but with edges where there were no edges and vice-versa. The labels of the old edges are lost and the new edges are assigned a 0 label.
Examples
> hex := HexahedronGraph();
hex := Graph(Edges(Edge(0,1,2),Edge(0,1,4),Edge(0,1,5),Edge(0,2,3),Edge(0,2,6),E
dge(0,3,4),Edge(0,3,7),Edge(0,4,8),Edge(0,5,6),Edge(0,5,8),Edge(0,6,7),Edge(0,7,
8)),Nodes(1,2,3,4,5,6,7,8))
> EdgeComplement(hex);
Graph(Edges(Edge(0,1,3),Edge(0,1,6),Edge(0,1,7),Edge(0,1,8),Edge(0,2,4),Edge(0,2
,5),Edge(0,2,7),Edge(0,2,8),Edge(0,3,5),Edge(0,3,6),Edge(0,3,8),Edge(0,4,5),Edge
(0,4,6),Edge(0,4,7),Edge(0,5,7),Edge(0,6,8)),Nodes(1,2,3,4,5,6,7,8))


See also BipartiteGraph,   Clique,   DrawGraph,   Edge,   Edges,   FindConnectedComponents,   Graph,   Graph_Rand,   InduceGraph,   MaxCut,   MaxEdgeWeightClique,   MST,   Nodes,   Path,   RegularGraph,   ShortestPath,   TetrahedronGraph,   VertexCover