Papers
Topics
Authors
Recent
Search
2000 character limit reached

Component Twin-Width: Graph Parameter Insights

Updated 10 July 2026
  • Component twin-width is defined through contraction sequences that track the maximum size of red-connected components, offering a refined measure over traditional twin-width.
  • It enables improved algorithmic bounds for problems like q-COLORING and #H-Coloring by providing tighter complexity guarantees compared to clique-width approaches.
  • The parameter extends to semiring generalisations and binary CSP frameworks, leading to efficient FPT and exponential-time algorithms for various graph problems.

Component twin-width, denoted ctww(G)\mathrm{ctww}(G), is a graph parameter defined through contraction sequences of trigraphs. In contrast to twin-width, which measures the maximum red-degree occurring in an intermediate trigraph, component twin-width measures the maximum size of any red-connected component that appears during the sequence. The parameter was developed as an algorithmically useful refinement of the contraction-based viewpoint, especially for graph homomorphism counting and for binary constraint satisfaction problems and their semiring generalisations (Baril et al., 5 Sep 2025, Baril et al., 2022, Heinrich et al., 2023).

1. Formal definition through trigraphs and contractions

A trigraph is a triple

G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})

where (VG′,EG′)(V_{G'},E_{G'}) is a simple graph of black edges and (VG′,RG′)(V_{G'},R_{G'}) is a looped graph of red edges, with EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset. A red-connected component is a connected component of (VG′,RG′)(V_{G'},R_{G'}), and loops count only to keep a vertex in the same component (Baril et al., 5 Sep 2025).

If P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\} is a partition of V(G)V(G), the contracted trigraph G/PG/\mathcal P has vertex-set P\mathcal P. Its black edges are the pairs G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})0 such that G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})1 and G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})2, while its red edges are the pairs G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})3 such that G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})4, G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})5, and G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})6, together with all loops G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})7 for blocks of size at least G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})8. Informally, a red edge represents partial or mixed adjacency and a black edge complete adjacency (Baril et al., 5 Sep 2025).

A contraction sequence of a graph G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})9 is a sequence of trigraphs

(VG′,EG′)(V_{G'},E_{G'})0

such that (VG′,EG′)(V_{G'},E_{G'})1 has no red edges and is isomorphic to (VG′,EG′)(V_{G'},E_{G'})2, and each (VG′,EG′)(V_{G'},E_{G'})3 is obtained from (VG′,EG′)(V_{G'},E_{G'})4 by merging two vertices (VG′,EG′)(V_{G'},E_{G'})5 into one vertex (VG′,EG′)(V_{G'},E_{G'})6, coloring every new adjacency black if both incident edges were black, absent if both were absent, and red otherwise. Equivalently, the sequence is induced by a sequence of partitions in which each step merges two parts (Baril et al., 5 Sep 2025).

The component twin-width (VG′,EG′)(V_{G'},E_{G'})7 is the minimum, over all contraction sequences of (VG′,EG′)(V_{G'},E_{G'})8, of the maximum size of any red-connected component that ever appears. In the edge-labelled generalisation, the same definition is phrased for edge-labelled graphs by introducing a distinguished red outcome whenever a block-pair is not uniformly labelled (Baril et al., 2022).

2. Relation to twin-width and the contraction formalism

Twin-width and component twin-width use the same contraction-based language but optimise different width measures. For twin-width, a contraction sequence is evaluated by the maximum red-degree of any intermediate trigraph, and (VG′,EG′)(V_{G'},E_{G'})9 is the minimum such value over complete contraction sequences. Component twin-width instead tracks the size of red-connected components (Heinrich et al., 2023).

This distinction matters algorithmically. Red-degree controls local impurity around a vertex, whereas red-connected component size controls how far mixed adjacencies can propagate as a connected obstruction during contraction. The 2025 comparison with clique-width treats component twin-width as a parameter that describes desirable computational properties of graphs and shows that previously known exponential and double exponential comparisons with clique-width can be improved to linear bounds (Baril et al., 5 Sep 2025).

Several basic graph classes admit exact component twin-width values. Cographs are exactly those graphs of (VG′,RG′)(V_{G'},R_{G'})0, and odd or even cycles of length at least (VG′,RG′)(V_{G'},R_{G'})1 have (VG′,RG′)(V_{G'},R_{G'})2 (Baril et al., 2022). For complete graphs, the same framework yields (VG′,RG′)(V_{G'},R_{G'})3, which is used directly in the complexity analysis of (VG′,RG′)(V_{G'},R_{G'})4-COLORING (Baril et al., 2022).

3. Tight linear comparison with clique-width

A central structural theorem of Baril et al. states that for every graph (VG′,RG′)(V_{G'},R_{G'})5,

(VG′,RG′)(V_{G'},R_{G'})6

Equivalently,

(VG′,RG′)(V_{G'},R_{G'})7

The result is described as a tight linear comparison with clique-width (Baril et al., 5 Sep 2025).

For the inequality (VG′,RG′)(V_{G'},R_{G'})8, the proof starts from a contraction sequence witnessing (VG′,RG′)(V_{G'},R_{G'})9. In each trigraph EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset0, one maintains for every red-connected component EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset1 a EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset2-labelled clique-width expression EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset3 constructing exactly the induced subgraph EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset4 while respecting the current partition of EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset5 into parts. When two parts are merged, the stored expressions of the affected subcomponents are combined by disjoint union, black edges are added exactly where the trigraph records complete adjacency, and the labels of the merged parts are relabelled into one. Since each red-connected component has size at most EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset6, at most EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset7 labels are needed (Baril et al., 5 Sep 2025).

For the inequality EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset8, the proof fixes a EG′∩RG′=∅E_{G'}\cap R_{G'}=\emptyset9-expression for (VG′,RG′)(V_{G'},R_{G'})0 and recursively collapses it into a contraction sequence. Single-vertex constructions need no action; relabellings are handled by contracting the corresponding parks at the end; edge-creation does not increase red-component size when merging same-label parks because vertices with the same label have identical neighborhood profiles towards all other labels; and a disjoint union (VG′,RG′)(V_{G'},R_{G'})1 is processed by collapsing each side separately and then contracting corresponding parks label by label. After the first park-contraction the trigraph has at most (VG′,RG′)(V_{G'},R_{G'})2 parks, and no red-connected component ever exceeds size (VG′,RG′)(V_{G'},R_{G'})3 (Baril et al., 5 Sep 2025).

Because the proof is constructive, the paper notes two direct consequences. First, the linear bounds between component twin-width and clique-width entail natural approximations of component twin-width by making use of results known for clique-width. Second, the construction naturally extends to related parameters, and as a showcase proves that total twin-width and linear clique-width can be related via a tight quadratic bound (Baril et al., 5 Sep 2025).

4. Algorithms for #H-Coloring parameterised by component twin-width

For a fixed template graph (VG′,RG′)(V_{G'},R_{G'})4, the problem (VG′,RG′)(V_{G'},R_{G'})5-Coloring asks for the number of homomorphisms (VG′,RG′)(V_{G'},R_{G'})6 such that (VG′,RG′)(V_{G'},R_{G'})7 implies (VG′,RG′)(V_{G'},R_{G'})8. Component twin-width supports two distinct algorithmic parameterisations of this problem (Baril et al., 5 Sep 2025).

The first is an FPT algorithm parameterised by (VG′,RG′)(V_{G'},R_{G'})9. Suppose an P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}0-vertex graph P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}1 is given together with a contraction sequence of component twin-width P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}2. Then for any fixed template P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}3 on P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}4 vertices there is an algorithm running in

P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}5

time that computes P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}6-ColoringP={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}7. The dynamic program proceeds along the contraction sequence. At step P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}8, for each red-connected component P={S1,…,Sk}\mathcal P=\{S_1,\dots,S_k\}9 and each assignment V(G)V(G)0, the table entry V(G)V(G)1 counts the V(G)V(G)2-colorings of the vertices represented by V(G)V(G)3 that map each part into the allowed set V(G)V(G)4. When two parts are merged, only the unique affected red-connected component is updated, and the cost per merge is controlled by the bound V(G)V(G)5 (Baril et al., 5 Sep 2025).

The second is a fine-grained algorithm parameterised by V(G)V(G)6. If V(G)V(G)7 is a fixed template graph with V(G)V(G)8 and an optimal contraction sequence of V(G)V(G)9 is given, then G/PG/\mathcal P0-ColoringG/PG/\mathcal P1 for an arbitrary input graph G/PG/\mathcal P2 on G/PG/\mathcal P3 vertices can be computed in time

G/PG/\mathcal P4

Here the dynamic program is run over the contraction sequence of G/PG/\mathcal P5. At step G/PG/\mathcal P6, each red-connected component of G/PG/\mathcal P7 has at most G/PG/\mathcal P8 parts, and the state space is organised by maps that partition G/PG/\mathcal P9 into at most P\mathcal P0 parts, reflecting which part of the current contracted template each input vertex may use (Baril et al., 5 Sep 2025).

These bounds dominate the previously best clique-width-based algorithms in the comparison made in the 2025 paper. Using P\mathcal P1 and P\mathcal P2, the new algorithms are always at least as fast as the earlier clique-width approaches, and for several graph classes they are strictly faster (Baril et al., 5 Sep 2025).

5. Semiring generalisation and binary CSP

The 2022 work of Baril, Couceiro, and Lagerkvist extends component twin-width from ordinary graphs to edge-labelled graphs and uses it as the organising width measure for BINARY-CSP and several semiring-valued generalisations (Baril et al., 2022).

An edge-labelled graph is a triple

P\mathcal P3

where P\mathcal P4 is a finite vertex set, P\mathcal P5 is a finite label set, and P\mathcal P6 assigns a label to each ordered pair. Given a target P\mathcal P7 and a relation P\mathcal P8, a function P\mathcal P9 is an G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})00-morphism if

G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})01

Ordinary graph homomorphisms arise by choosing G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})02 and

G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})03

Contraction of an edge-labelled graph by a partition replaces a block-pair by its common label if that label is uniform, and by G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})04 otherwise (Baril et al., 2022).

The semiring framework is built from a semiring G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})05, a set of weights G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})06, and a pre-morphism G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})07 satisfying additivity, multiplicativity, and G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})08. This single abstraction captures decision, counting, list-CSP, min-cost and #ArgMinCost, the weighted version of Escoffier et al., and restrictive counting (Baril et al., 2022).

Two general algorithmic theorems are then obtained. If G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})09 and G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})10 are fixed and an optimal contraction sequence of the input G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})11 is given, then G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})12 can be solved in

G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})13

time. If instead G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})14 is fixed and an optimal contraction sequence of width G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})15 is given, then the same problem on an arbitrary G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})16-vertex input can be solved in

G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})17

These are presented as, respectively, an FPT algorithm and an improved exponential-time algorithm for broad classes of binary constraints (Baril et al., 2022).

The proof architecture is based on dynamic programming across the contraction sequence. The key ingredients are a feasibility lemma for non-red-connected block pairs, a component decomposition lemma expressing a family of partial morphisms as a disjoint union of joins over a partition of the domain, and a loop invariant asserting the correctness of the table entries after each contraction step (Baril et al., 2022).

6. Canonical classes, benchmark examples, and algorithmic significance

Several graph classes serve as canonical benchmarks for component twin-width and its algorithmic consequences. Cographs satisfy G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})18, so cograph-G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})19-COLORING, including counting, list-counting, and cost variants, runs in

G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})20

improving Wahlström’s previous G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})21 bound for the counting version. For odd or even cycles G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})22 with G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})23, one has G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})24, giving

G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})25

for all semiring variants, compared to the earlier G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})26 from clique-width arguments. For G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})27-COLORING, since G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})28, the resulting bound is G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})29; by inclusion–exclusion this can be pushed to G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})30, but only for unweighted plain coloring (Baril et al., 2022).

The 2025 comparison with clique-width sharpens these examples for the fine-grained G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})31-Coloring setting (Baril et al., 5 Sep 2025).

Graph class G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})32 Fine-grained bound
Cographs with at least one edge G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})33 G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})34 instead of G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})35
Cycles of length G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})36 G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})37 G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})38 instead of G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})39
Distance-hereditary (non-cograph) G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})40 G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})41 instead of G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})42

In these cases, the base of the exponent drops from G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})43 to G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})44 for cographs, from G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})45 to G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})46 for long cycles, and from G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})47 to G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})48 for distance-hereditary graphs (Baril et al., 5 Sep 2025).

Taken together, these results identify component twin-width as a width measure that supports both fixed-parameter tractability under G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})49 and improved exponential-time algorithms controlled by G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})50. The linear comparison

G′=(VG′,EG′,RG′)G'=(V_{G'},E_{G'},R_{G'})51

explains why clique-width-based methods can often be transferred to the component twin-width setting with no asymptotic loss and, in benchmark classes, with strict gains in the exponent. The semiring formulation further shows that these gains are not restricted to ordinary graph coloring, but extend uniformly to counting, list, weighted, and cost variants of binary constraint problems (Baril et al., 5 Sep 2025, Baril et al., 2022).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Component Twin-Width.