Graph Circumference Calculator

longest cycle length

CalculatorsFreeNo Signup
4.2(259 reviews)
All Tools

Loading tool...

About Graph Circumference Calculator

A graph circumference calculator computing c(G): longest cycle length. c=0 for acyclic. c=n for Hamiltonian. Dirac (1952): δ≥n/2 → Hamiltonian (c=n). Ore: deg(u)+deg(v)≥n for non-adjacent → Hamiltonian. Client-side.

Graph Circumference Calculator Features

  • c(G) value
  • Hamiltonian?
  • Dirac's theorem
  • Ore's theorem
  • Common graphs
Circumference c(G): longest cycle. c=n iff Hamiltonian. Dirac (1952): δ(G)≥n/2 → Hamiltonian. Ore (1960): d(u)+d(v)≥n for all non-adjacent u,v → Hamiltonian. Finding c is NP-hard in general.

How to Use

Select graph:

  • c(G): Circumference
  • Dirac: δ≥n/2?
  • Hamiltonian: c=n?

Dirac's Theorem

If δ(G) ≥ n/2 (n≥3), then G is Hamiltonian. Simple, powerful sufficient condition. Ore generalizes: if d(u)+d(v)≥n for all non-adjacent pairs, then Hamiltonian. Both are best-possible degree conditions.

Computational Complexity

Determining if c=n (Hamiltonian cycle) is NP-complete. One of Karp's 21. No known polynomial algorithm. But many sufficient conditions (Dirac, Ore, Chvátal) give polynomial tests for special cases.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Compute circumference.
  3. 3Check Dirac.
  4. 4Check Ore.
  5. 5Hamiltonian?

Graph Circumference Calculator — Frequently Asked Questions

What's a Hamiltonian cycle?+

A cycle visiting every vertex exactly once. c=n iff such a cycle exists. Named after Hamilton's icosian game (1857). Deciding existence is NP-complete, unlike Eulerian cycles which are easy (Euler's theorem: all degrees even).

What does Dirac's theorem say?+

If every vertex has degree ≥ n/2, then G has a Hamiltonian cycle (n≥3). The bound is tight: K_{n/2-1,n/2+1} has δ=n/2-1 and no Hamiltonian cycle. This is one of the most cited results in graph theory.

Are there stronger sufficient conditions?+

Ore (1960): d(u)+d(v)≥n for non-adjacent pairs. Chvátal (1972): degree sequence condition. Bondy-Chvátal closure. Fan (1984): distance-2 degree condition. Each progressively weaker hypothesis, stronger conclusion.

Share this tool: