Clique-Width Calculator

labeled construction width

CalculatorsFreeNo Signup
4.5(454 reviews)
All Tools

Loading tool...

About Clique-Width Calculator

A clique-width calculator computing cw(G): minimum number of labels to construct G using: create vertex, disjoint union, relabel, join labels. cw = 1 for edgeless, cw = 2 for cographs. NP-hard to compute. MSO₁ model checking. Client-side.

Clique-Width Calculator Features

  • cw(G)
  • Labels
  • Cograph=2
  • vs tw/rw
  • Common graphs
Clique-width cw(G): minimum labels k to build G using 4 operations: ①create labeled vertex, ②disjoint union, ③relabel i→j, ④join all i-labeled to all j-labeled. Cographs: cw≤2. Distance-hereditary: cw≤3. tw+1 ≤ cw ≤ 2^(tw+1).

How to Use

Select graph:

  • cw: Clique-width
  • Labels: Construction
  • vs tw: Compare

Four Operations

①Create: single vertex with label i. ②Union: combine two graphs. ③Relabel: change all label i to j. ④Join: add all edges between label i and label j. These four operations generate all graphs.

Courcelle's Theorem

Every MSO₁-definable property decidable in O(n) time on bounded clique-width graphs (given decomposition). Extends Courcelle's theorem for treewidth to dense graphs. Powerful meta-theorem.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Compute cw.
  3. 3Build expression.
  4. 4Count labels.
  5. 5Apply MSO₁.

Clique-Width Calculator — Frequently Asked Questions

How is clique-width different from treewidth?+

Treewidth: tree-like decomposition into bags. Clique-width: algebraic construction with labels. tw bounded → cw bounded (cw ≤ 2^(tw+1)). But cw bounded ≠ tw bounded: complete graphs have cw=2 but tw=n-1!

What are cographs?+

Graphs built from single vertices using disjoint union and complement. Exactly the graphs with cw ≤ 2. Also: P₄-free graphs. Recognizable in linear time. Many hard problems polynomial on cographs.

Can clique-width be computed?+

Computing exact cw is NP-hard. But: bounded cw ⟺ bounded rank-width, and rank-width has FPT recognition. So we can test 'cw ≤ k' indirectly via rank-width.

Share this tool: