Twin-Width Calculator

contraction sequence width

CalculatorsFreeNo Signup
4.8(629 reviews)
All Tools

Loading tool...

About Twin-Width Calculator

A twin-width calculator computing tww(G): minimum d such that G has a contraction sequence where each step merges two rows/columns and at most d entries are 'red' (mixed). Bonnet et al. 2021. tww=0 iff cograph. FPT model checking. Client-side.

Twin-Width Calculator Features

  • tww(G)
  • Contractions
  • Cograph=0
  • FPT
  • Common graphs
Twin-width tww(G): minimum d in a contraction sequence reducing G to a single vertex, where at each step, merging two vertices creates at most d 'red' neighbors (disagreeing adjacencies). Bonnet, Kim, Thomassé, Watrigant (2021). Revolutionary parameter.

How to Use

Select graph:

  • tww: Twin-width
  • Contract: Merge twins
  • Red: Mixed entries

Contraction Sequences

Start with G. Repeatedly merge two vertices: combined vertex is adjacent to u if both were, non-adjacent if neither was, or 'red' (mixed). Width = max red degree across all steps. tww = min over all sequences.

Breakthrough Results

tww=0 ⟺ cograph. Bounded tww: all proper minor-closed classes, bounded rw, many more. FPT first-order model checking on bounded tww! Unifies many tractability results. Most exciting parameter since treewidth.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Build contraction.
  3. 3Track red degree.
  4. 4Minimize max red.
  5. 5Compare with cw.

Twin-Width Calculator — Frequently Asked Questions

Why is twin-width exciting?+

Unifies many graph classes! Planar, bounded treewidth, bounded clique-width, proper minor-closed — all have bounded twin-width. FO model checking is FPT. Connects to many areas of math and CS.

What's a contraction?+

Merge two vertices into one. The new vertex is adjacent to u if both originals were, non-adjacent if neither was, 'red' if they disagreed. Red neighbors = uncertainty. Width = max red degree.

Is twin-width computable?+

Computing exact tww is NP-hard! But for fixed d: recognizing tww≤d is FPT (Bonnet et al. 2021). Computing contraction sequences of bounded width is the hard part; using them is easy (FPT model checking).

Share this tool: