WLJS LogoWLJS Notebook

GraphComplement

GraphComplement[g] gives the graph complement of the graph g (edges become non-edges and vice versa).

Examples

Complement of a cycle:

GraphComplement[CycleGraph[5]]

Complement of a complete graph:

GraphComplement[CompleteGraph[4]]
(* Empty graph *)

Please visit the official Wolfram Language Reference for more details.

On this page