Degree Sequence Calculator

Erdős-Gallai graphicality

CalculatorsFreeNo Signup
4.7(840 reviews)
All Tools

Loading tool...

About Degree Sequence Calculator

A degree sequence calculator computing vertex degrees from adjacency input and checking if a given sequence is graphical (realizable as a simple graph) using the Erdős-Gallai theorem. Also checks Hakimi algorithm and handshaking lemma. Client-side.

Degree Sequence Calculator Features

  • Degree list
  • Erdős-Gallai check
  • Handshaking lemma
  • Hakimi reduction
  • Regular check
Degree sequence: sorted vertex degrees d₁≥d₂≥...≥dₙ. A sequence is graphical if realizable as a simple graph. Erdős-Gallai (1960): graphical iff Σᵢ₌₁ᵏ dᵢ ≤ k(k-1)+Σᵢ₌ₖ₊₁ⁿ min(dᵢ,k) for all k, and Σdᵢ is even.

How to Use

Enter degrees:

  • Sort: Non-increasing order
  • Check: Graphical?
  • Sum: Must be even

Erdős-Gallai

A non-increasing sequence d₁,...,dₙ is graphical iff: (1) Sum is even. (2) For each k=1..n: Σᵢ₌₁ᵏ dᵢ ≤ k(k-1)+Σᵢ₌ₖ₊₁ⁿ min(dᵢ,k). This elegant characterization is both necessary and sufficient.

Hakimi Algorithm

Constructive proof: remove largest degree d₁, subtract 1 from the next d₁ largest degrees, repeat. If you reach all zeros, the sequence is graphical. This gives an actual graph realization.

Step-by-Step Instructions

  1. 1Enter degrees.
  2. 2Sort sequence.
  3. 3Check even sum.
  4. 4Apply Erdős-Gallai.
  5. 5Try Hakimi.

Degree Sequence Calculator — Frequently Asked Questions

What's the handshaking lemma?+

Σ degrees = 2|E|, always even. This is necessary for graphicality but not sufficient. Example: (3,3,3) has even sum 9... wait, 9 is odd! So (3,3,3) is not graphical. (2,2,2) has sum 6, and is graphical (triangle).

What's a regular graph?+

All degrees equal: d₁=d₂=...=dₙ=r. Called r-regular. 0-regular: empty. 1-regular: perfect matching. 2-regular: disjoint cycles. 3-regular: cubic graph. K_n is (n-1)-regular.

Can the degree sequence determine the graph?+

No! Multiple non-isomorphic graphs can share the same degree sequence. For example, both C₆ and K₃∪K₃ have degree sequence (2,2,2,2,2,2). Degree sequence is a necessary but not sufficient invariant for graph isomorphism.

Share this tool: