TOPICS
Search

Twin-Width


The twin-width of a finite nonempty simple graph measures how much disagreement is needed to reduce it to one vertex by merging pairs of vertices (Bonnet et al. 2022). Initially every graph edge is black. To merge two vertices, even if they are nonadjacent, replace them by one vertex. For every remaining vertex, the new pair is joined by a black edge if both old pairs were black edges, and by no edge if both old pairs were nonedges. It is joined by a red edge in every other case.

At each stage, the red degree of a vertex is the number of red edges incident to it. A d-contraction sequence ends at a single vertex and keeps every red degree at most d at every stage. The twin-width is the least d for which such a sequence exists. The graphs of twin-width zero are precisely the cographs.

The twin classes defining neighborhood diversity can be merged without creating red edges. If there are m classes, the first merge between classes leaves m-1 vertices, each with red degree at most m-2. Thus the twin-width is at most max(0,m-2). The two parameters can differ arbitrarily, since cographs can have unbounded neighborhood diversity (Gajarský et al. 2013).

Given an n-vertex graph, a d-contraction sequence, and a sentence phi of first-order logic, Bonnet et al. (2022) showed that whether the graph satisfies phi can be decided in time f(|phi|,d)n for a computable function f. Deciding whether a graph has twin-width at most 4 is an NP-complete problem (Bergé et al. 2022).

Bonnet and Chang (2026) showed that graphs of twin-width at most 2 have mim-width at most 8. Given a 2-contraction sequence, their algorithm constructs such a layout in polynomial time. This gives polynomial-time algorithms for graph coloring with any fixed number of colors, minimum dominating set, and minimum feedback vertex set when the sequence is given. With the number of colors supplied as part of the input, deciding colorability is NP-complete on the same class even with a supplied 2-contraction sequence.


See also

Boolean-Width, Cograph, Mim-Width, Neighborhood Diversity, Twin Vertices

Explore with Wolfram|Alpha

References

Bergé, P.; Bonnet, É.; and Déprés, H. "Deciding Twin-Width at Most 4 Is NP-Complete." In Proceedings of the International Colloquium on Automata, Languages, and Programming, pp. 18:1-18:20, 2022. https://doi.org/10.4230/LIPIcs.ICALP.2022.18.Bonnet, É. and Chang, Y. "Graphs of Twin-Width at Most 2 Have Bounded Mim-Width." 29 Nov 2026. https://arxiv.org/abs/2611.39623.Bonnet, É.; Kim, E. J.; Thomassé, S.; and Watrigant, R. "Twin-Width I: Tractable FO Model Checking." J. ACM 69, 3:1-3:46, 2022. https://doi.org/10.1145/3486655.Gajarský, J.; Lampis, M.; and Ordyniak, S. "Parameterized Algorithms for Modular-Width." In Parameterized and Exact Computation (Ed. G. Gutin and S. Szeider). Cham, Switzerland: Springer, pp. 163-176, 2013. https://doi.org/10.1007/978-3-319-03898-8_15.

Cite this as:

Weisstein, Eric W. "Twin-Width." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/Twin-Width.html

Subject classifications