Graph Complement Calculator

Ḡ: what G is missing

CalculatorsFreeNo Signup
4.4(421 reviews)
All Tools

Loading tool...

About Graph Complement Calculator

A graph complement calculator computing Ḡ: the graph on the same vertices where uv is an edge iff uv is NOT in G. |E(Ḡ)| = C(n,2) - |E(G)|. Self-complementary iff G ≅ Ḡ. α(G)=ω(Ḡ), χ(G) bounds. Client-side.

Graph Complement Calculator Features

  • Ḡ edges
  • Self-complement check
  • Edge count
  • α↔ω duality
  • Adjacency matrix
Graph complement Ḡ: same vertices, complementary edge set (E(Ḡ) = E(K_n)\E(G)). |E(G)|+|E(Ḡ)| = C(n,2). Key duality: α(G)=ω(Ḡ), χ(G)·α(G)≥n. Self-complementary: G≅Ḡ (C_5, P_4 are self-complementary).

How to Use

Select graph:

  • Ḡ: Complement graph
  • Edges: C(n,2)-|E|
  • Self: G≅Ḡ?

Complement Duality

α(G)=ω(Ḡ): max independent set in G = max clique in complement. χ(G)·α(G)≥n: fundamental bound. For perfect graphs: χ(G)=ω(G) and Ḡ is also perfect (WPGT). Complement preserves perfection!

Self-Complementary

G≅Ḡ requires n≡0,1(mod4) and |E|=n(n-1)/4. Examples: P_1, P_4, C_5. For n=4: unique (P_4). For n=5: two (C_5, bull). The number grows rapidly with n.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Compute Ḡ.
  3. 3Count edges.
  4. 4Check self-complementary.
  5. 5Compare α,ω.

Graph Complement Calculator — Frequently Asked Questions

What's the complement of K_n?+

Ḡ of K_n = empty graph E_n (no edges). Ḡ of E_n = K_n. Complement of K_{m,n} = K_m ∪ K_n (disjoint complete). The complement operation is an involution: complement of complement = original.

What's self-complementary?+

G≅Ḡ: G is isomorphic to its complement. Necessary: n≡0,1(mod4). n=1: trivially. n=4: P_4. n=5: C_5 and the 'bull graph'. Known for all n, but counting them is hard.

How does Ramsey theory connect?+

R(s,t) = min n such that any 2-coloring of K_n has monochromatic K_s or K_t. Equivalently: every graph on n vertices has α≥s or ω≥t. By complement: ω(G)≥s or ω(Ḡ)≥t.

Share this tool: