Graph Bandwidth Calculator

min-max label stretch

CalculatorsFreeNo Signup
4.7(268 reviews)
All Tools

Loading tool...

About Graph Bandwidth Calculator

A graph bandwidth calculator computing B(G): minimum max|f(u)-f(v)| over all bijections f:V→{1,...,n} and edges uv. B(P_n)=1, B(C_n)=2, B(K_n)=n-1. NP-hard. Related to sparse matrix reordering and VLSI layout. Client-side.

Graph Bandwidth Calculator Features

  • B(G) value
  • Optimal labeling
  • Cuthill-McKee
  • NP-hard
  • Common graphs
Graph bandwidth B(G): place vertices on a line {1,...,n}, minimize the maximum stretch of any edge. B(P_n)=1, B(C_n)=2, B(K_n)=n-1, B(K_{p,q})=p+⌊q/2⌋-1. NP-hard to compute. Applications: sparse matrix reordering, VLSI.

How to Use

Select graph:

  • B: Bandwidth
  • Labeling: Optimal order
  • Bounds: δ, density

Applications

Sparse matrix bandwidth: reorder rows/cols to move nonzeros near diagonal. Cuthill-McKee and reverse Cuthill-McKee algorithms. VLSI layout: minimize wire length. Profile minimization in finite elements.

Bounds

B(G) ≥ ⌈(n-1)/diam(G)⌉. B(G) ≥ δ(G)/2. B(G) ≥ density lower bound. For trees: B can be computed in polynomial time (special case). For caterpillars: exact formula known.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Compute bandwidth.
  3. 3Find labeling.
  4. 4Check bounds.
  5. 5Apply Cuthill-McKee.

Graph Bandwidth Calculator — Frequently Asked Questions

What's the bandwidth of a tree?+

Trees have bandwidth computable in polynomial time (Saxe, 1980). For paths: B=1. For stars K_{1,n}: B=⌈n/2⌉. For caterpillars: B = max over internal vertices of a specific formula involving pendant vertices.

What's Cuthill-McKee?+

Heuristic for bandwidth reduction: BFS from a peripheral vertex, order by increasing degree within each level. Reverse Cuthill-McKee (RCM) reverses this ordering. Often gives better results. Standard in sparse matrix libraries.

How is bandwidth related to pathwidth?+

pw(G) ≤ B(G) ≤ n-1. Bandwidth is always at least pathwidth. Both measure 'linearity' of a graph. Pathwidth allows bags of vertices; bandwidth requires single vertices per position.

Share this tool: