Spectral Gap Calculator

expansion and mixing speed

CalculatorsFreeNo Signup
4.8(421 reviews)
All Tools

Loading tool...

About Spectral Gap Calculator

A spectral gap calculator computing λ₁-λ₂ of the adjacency matrix. Large spectral gap → strong expansion, fast mixing, pseudo-random behavior. Ramanujan graphs: achieve optimal spectral gap 2√(d-1). Key for expander graphs and random walk analysis. Client-side.

Spectral Gap Calculator Features

  • λ₁-λ₂
  • Expansion
  • Ramanujan
  • Mixing time
  • Common graphs
Spectral gap: λ₁ - |λ₂| of adjacency matrix. Large gap → pseudo-random, fast-mixing, good expander. Ramanujan graphs: |λ₂| ≤ 2√(d-1), achieving the Alon-Boppana bound. Optimal spectral gap = optimal expansion.

How to Use

Select graph:

  • Gap: λ₁-|λ₂|
  • Ram.: Ramanujan?
  • Mix: Speed

Ramanujan Graphs

d-regular graph is Ramanujan if |λ₂| ≤ 2√(d-1). Optimal spectral gap! Lubotzky-Phillips-Sarnak (1988): explicit constructions. Marcus-Spielman-Srivastava (2013): bipartite Ramanujan always exist.

Random Walk Mixing

Mixing time ∝ log(n)/(λ₁-|λ₂|). Larger gap → faster mixing. MCMC convergence. PageRank convergence. Decentralized computation speed. All controlled by spectral gap.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Find eigenvalues.
  3. 3Compute gap.
  4. 4Check Ramanujan.
  5. 5Estimate mixing.

Spectral Gap Calculator — Frequently Asked Questions

Why does the spectral gap matter?+

It controls: (1) random walk mixing speed, (2) expansion properties, (3) pseudo-randomness, (4) error-correcting code quality. Larger gap = better in all four. The single most informative spectral parameter for applications.

What is a Ramanujan graph?+

A d-regular graph where all non-trivial eigenvalues have |λ| ≤ 2√(d-1). Achieves the best possible spectral gap (Alon-Boppana bound). Named after Ramanujan's work on modular forms. The 'gold standard' of expanders.

How does gap relate to pseudo-randomness?+

Large gap ⟹ edge distribution is 'uniform-like': every set S has ~d|S|/n neighbors. Formally: expander mixing lemma. Random-looking despite being deterministic. Used in derandomization.

Share this tool: