-width of Restricted Graph Classes

Andreas Brandstädt, Konrad Dąbrowski, François Dross, Shenwei Huang and Daniël Paulusma

Durham University, UK

15th October 2015 Aussois Motivation

Most natural problems in algorithmic are NP-complete. Want to find restricted classes of graphs where we can solve some problems in polynomial time. Best if we can find classes where lots of problems can be solved in polynomial time. Motivation

Most natural problems in algorithmic graph theory are NP-complete. Want to find restricted classes of graphs where we can solve some problems in polynomial time. Best if we can find classes where lots of problems can be solved in polynomial time. Motivation

Most natural problems in algorithmic graph theory are NP-complete. Want to find restricted classes of graphs where we can solve some problems in polynomial time. Best if we can find classes where lots of problems can be solved in polynomial time. Why Clique-width? Theorem (Courcelle, Makowsky and Rotics 2000, Kobler and Rotics 2003, Rao 2007, Oum 2008, Grohe and Schweitzer 2015)

Any problem expressible in “monadic second-order logic with quantification over vertices” (and certain other classes of problems) can be solved in polynomial time on graphs of bounded clique-width.

This includes:

I Vertex Colouring I Maximum Independent Set I Minimum I Hamilton Path/Cycle I Partitioning into Perfect Graphs I Graph Isomorphism I ... Clique-width

The clique-width is the minimum number of labels needed to construct G by using the following four operations:

(i) creating a new graph consisting of a single vertex v with label i (represented by i(v))

(ii) taking the disjoint union of two labelled graphs G1 and G2 (represented by G1 ⊕ G2) (iii) joining each vertex with label i to each vertex with label j (i 6= j) (represented by ηi,j )

(iv) renaming label i to j (represented by ρi→j )

For example, P4 has clique-width 3. Clique-width

d c b a

η3,2(3(d) ⊕ ρ3→2(ρ2→1(η3,2(3(c) ⊕ η2,1(2(b) ⊕ 1(a))))))

η3,2 ⊕ ρ3→2 ρ2→1 η3,2 ⊕ η2,1 ⊕ 1(a)

3(d) 3(c) 2(b) η3,2(3(d) ⊕ ρ3→2(ρ2→1(η3,2(3(c) ⊕ η2,1(2(b) ⊕ )))))

Clique-width

1 d a

1(a)

η3,2 1(a) η3,2(3(d) ⊕ ρ3→2(ρ2→1(η3,2(3(c) ⊕ η2,1( ⊕ )))))

Clique-width

2 1 d b a

2(b) 1(a)

η3,2 1(a)

2(b) η3,2(3(d) ⊕ ρ3→2(ρ2→1(η3,2(3(c) ⊕ η2,1( )))))

Clique-width

2 1 d b a

2(b) ⊕ 1(a)

η3,2 ⊕ 1(a)

2(b) η3,2(3(d) ⊕ ρ3→2(ρ2→1(η3,2(3(c) ⊕ ))))

Clique-width

2 1 d b a

η2,1(2(b) ⊕ 1(a))

η3,2 η2,1 ⊕ 1(a)

2(b) η3,2(3(d) ⊕ ρ3→2(ρ2→1(η3,2( ⊕ ))))

Clique-width

3 2 1 d c b a

3(c) η2,1(2(b) ⊕ 1(a))

η3,2 η2,1 ⊕ 1(a)

3(c) 2(b) η3,2(3(d) ⊕ ρ3→2(ρ2→1(η3,2( ))))

Clique-width

3 2 1 d c b a

3(c) ⊕ η2,1(2(b) ⊕ 1(a))

η3,2 ⊕ η2,1 ⊕ 1(a)

3(c) 2(b) η3,2(3(d) ⊕ ρ3→2(ρ2→1( )))

Clique-width

3 2 1 d c b a

η3,2(3(c) ⊕ η2,1(2(b) ⊕ 1(a)))

η3,2 η3,2 ⊕ η2,1 ⊕ 1(a)

3(c) 2(b) η3,2(3(d) ⊕ ρ3→2( ))

Clique-width

3 2 1 1 d c b a

ρ2→1(η3,2(3(c) ⊕ η2,1(2(b) ⊕ 1(a))))

η3,2 ρ2→1 η3,2 ⊕ η2,1 ⊕ 1(a)

3(c) 2(b) η3,2(3(d) ⊕ )

Clique-width

3 2 2 1 1 d c b a

ρ3→2(ρ2→1(η3,2(3(c) ⊕ η2,1(2(b) ⊕ 1(a)))))

η3,2 ρ3→2 ρ2→1 η3,2 ⊕ η2,1 ⊕ 1(a)

3(c) 2(b) η3,2( ⊕ )

Clique-width

3 3 2 2 1 1 d c b a

3(d) ρ3→2(ρ2→1(η3,2(3(c) ⊕ η2,1(2(b) ⊕ 1(a)))))

η3,2 ρ3→2 ρ2→1 η3,2 ⊕ η2,1 ⊕ 1(a)

3(d) 3(c) 2(b) η3,2( )

Clique-width

3 3 2 2 1 1 d c b a

3(d) ⊕ ρ3→2(ρ2→1(η3,2(3(c) ⊕ η2,1(2(b) ⊕ 1(a)))))

η3,2 ⊕ ρ3→2 ρ2→1 η3,2 ⊕ η2,1 ⊕ 1(a)

3(d) 3(c) 2(b) Clique-width

3 3 2 2 1 1 d c b a

η3,2(3(d) ⊕ ρ3→2(ρ2→1(η3,2(3(c) ⊕ η2,1(2(b) ⊕ 1(a))))))

η3,2 ⊕ ρ3→2 ρ2→1 η3,2 ⊕ η2,1 ⊕ 1(a)

3(d) 3(c) 2(b) Calculating clique-width

Theorem (Fellows, Rosamond, Rotics, Szeider 2009)

Calculating clique-width is NP-hard.

Theorem (Corneil, Habib, Lanlignel, Reed, Rotics 2012)

Can detect graphs of clique-width at most 3 in polynomial time.

It’s not known if this is also the case for graphs of clique-width 4.

Theorem (Oum 2008)

Can find a c-expression for a graph G where c ≤ 8cw(G) − 1 in cubic time.

The clique-width of all graphs up to 10 vertices has been calculated (Heule & Szeider 2013). Why clique-width?

I “Equivalent” to rank-width and NLC-width

I Generalises -width

I “Equivalent” to tree-width on graphs of bounded degree

The following operations don’t change the clique-width by “too much”

I Complementation

I Bipartite complementation

I Vertex deletion

I Edge subdivision (for graphs of bounded-degree)

Need only look at graphs that are

I prime

I 2-connected Why clique-width?

I “Equivalent” to rank-width and NLC-width

I Generalises tree-width

I “Equivalent” to tree-width on graphs of bounded degree

The following operations don’t change the clique-width by “too much”

I Complementation

I Bipartite complementation

I Vertex deletion

I Edge subdivision (for graphs of bounded-degree)

Need only look at graphs that are

I prime

I 2-connected Why clique-width?

I “Equivalent” to rank-width and NLC-width

I Generalises tree-width

I “Equivalent” to tree-width on graphs of bounded degree

The following operations don’t change the clique-width by “too much”

I Complementation

I Bipartite complementation

I Vertex deletion

I Edge subdivision (for graphs of bounded-degree)

Need only look at graphs that are

I prime

I 2-connected Aim

Underlying Research Question

What kinds of graph properties ensure bounded clique-width? Hereditary Classes

A graph H is an induced subgraph of G if H can be obtained by deleting vertices of G, written H ⊆i G.

P4 3P1 P1 + P2

So P1 + P2 ⊆i P4, but 3P1 6⊆i P4. A class of graphs is hereditary if it is closed under taking induced subgraphs. Let S be a set of graphs. The class of S-free graphs is the set of graphs that do not contain any graph in S as an induced subgraph.

For example: bipartite graphs are the (C3, C5, C7,...)-free graphs. Hereditary Classes

A graph H is an induced subgraph of G if H can be obtained by deleting vertices of G, written H ⊆i G.

P4 3P1 P1 + P2

So P1 + P2 ⊆i P4, but 3P1 6⊆i P4. A class of graphs is hereditary if it is closed under taking induced subgraphs. Let S be a set of graphs. The class of S-free graphs is the set of graphs that do not contain any graph in S as an induced subgraph.

For example: bipartite graphs are the (C3, C5, C7,...)-free graphs. H-free graphs

Theorem (D., Paulusma 2015)

The class of H-free graphs has bounded clique-width if and only if H ⊆i P4. Colouring H-free graphs

Theorem (Král’, Kratochvíl, Tuza & Woeginger, 2001)

The Vertex Colouring problem is polynomial-time solvable for H-free graphs if and only if H ⊆i P1 + P3 or P4, otherwise it is NP-complete.

P1 + P3 P4 Colouring (H1, H2)-free graphs The Vertex Colouring problem is polynomial-time solvable for (H1, H2)-free graphs if 1. H1 or H2 is an induced subgraph of P1 + P3 or of P4 ++ ∗ 2. H1 ⊆i K1,3, and H2 ⊆i C3 , H2 ⊆i C3 or H2 ⊆i P5 3. H1 6= K1,5 is a forest on at most six vertices or H1 = K1,3 + 3P1, and H2 ⊆i P1 + P3

4. H1 ⊆i sP2 or H1 ⊆i sP1 + P5 for s ≥ 1, and H2 = Kt for t ≥ 4

5. H1 ⊆i sP2 or H1 ⊆i sP1 + P5 for s ≥ 1, and H2 ⊆i P1 + P3

6. H1 ⊆i P1 + P4 or H1 ⊆i P5, and H2 ⊆i P1 + P4

7. H1 ⊆i P1 + P4 or H1 ⊆i P5, and H2 ⊆i P5

8. H1 ⊆i 2P1 + P2, and H2 ⊆i 2P1 + P3 or H2 ⊆i P2 + P3

9. H1 ⊆i 2P1 + P2, and H2 ⊆i 2P1 + P3 or H2 ⊆i P2 + P3

10. H1 ⊆i sP1 + P2 for s ≥ 0 or H1 = P5, and H2 ⊆i tP1 + P2 for t ≥ 0

11. H1 ⊆i 4P1 and H2 ⊆i 2P1 + P3

12. H1 ⊆i P5, and H2 ⊆i C4 or H2 ⊆i 2P1 + P3. Colouring (H1, H2)-free graphs The Vertex Colouring problem is polynomial-time solvable for (H1, H2)-free graphs if 1. H1 or H2 is an induced subgraph of P1 + P3 or of P4 ++ ∗ 2. H1 ⊆i K1,3, and H2 ⊆i C3 , H2 ⊆i C3 or H2 ⊆i P5 3. H1 6= K1,5 is a forest on at most six vertices (H1 ⊆i K1,3 + P2, P1 + S1,1,2, P6 or S1,1,3) or H1 = K1,3 + 3P1, and H2 ⊆i P1 + P3 4. H1 ⊆i sP2 or H1 ⊆i sP1 + P5 for s ≥ 1, and H2 = Kt for t ≥ 4 5. H1 ⊆i sP2 or H1 ⊆i sP1 + P5 for s ≥ 1, and H2 ⊆i P1 + P3 6. H1 ⊆i P1 + P4 or H1 ⊆i P5, and H2 ⊆i P1 + P4 7. H1 ⊆i P1 + P4 or H1 ⊆i P5, and H2 ⊆i P5 8. H1 ⊆i 2P1 + P2, and H2 ⊆i 2P1 + P3 or H2 ⊆i P2 + P3 9. H1 ⊆i 2P1 + P2, and H2 ⊆i 2P1 + P3 or H2 ⊆i P2 + P3 10. H1 ⊆i sP1 + P2 for s ≥ 0 or H1 = P5, and H2 ⊆i tP1 + P2 for t ≥ 0

11. H1 ⊆i 4P1 and H2 ⊆i 2P1 + P3 12. H1 ⊆i P5, and H2 ⊆i C4 or H2 ⊆i 2P1 + P3. The class of (H1, H2)-free graphs has bounded clique-width if: 1. H1 or H2 ⊆i P4;

2. H1 = sP1 and H2 = Kt for some s, t;

3. H1 ⊆i P1 + P3 and H2 ⊆i K1,3 + 3P1, K1,3 + P2, P1 + S1,1,2, P6 or S1,1,3;

4. H1 ⊆i 2P1 + P2 and H2 ⊆i 2P1 + P3, 3P1 + P2 or P2 + P3;

5. H1 ⊆i P1 + P4 and H2 ⊆i P1 + P4 or P5;

6. H1 ⊆i 4P1 and H2 ⊆i 2P1 + P3;

7. H1, H2 ⊆i K1,3. and it has unbounded clique-width if: 1. H1 6∈ S and H2 6∈ S;

2. H1 ∈/ S and H2 6∈ S;

3. H1 ⊇i K1,3 or 2P2 and H2 ⊇i 4P1 or 2P2;

4. H1 ⊇i 2P1 + P2 and H2 ⊇i K1,3, 5P1, P2 + P4 or P6; 5. H1 ⊇i 3P1 and H2 ⊇i 2P1 + 2P2, 2P1 + P4, 4P1 + P2, 3P2 or 2P3;

6. H1 ⊇i 4P1 and H2 ⊇i P1 + P4 or3 P1 + P2. Theorem (D., Paulusma 2015)

This leaves 13 cases where it is unknown if the clique-width of (H1, H2)-free graphs is bounded or not (up to some equivalence relation).

1. H1 = 3P1, H2 ∈ {P1 + P2 + P3, P1 + 2P2, P1 + P5, P1 + S1,1,3, P2 + P4, S1,2,2,S1,2,3};

2. H1 = 2P1 + P2, H2 ∈{P1 + P2 + P3, P1 + 2P2,P1 + P5};

3. H1 = P1 + P4, H2 ∈ {P1 + 2P2, P2 + P3} or

4. H1 = H2 = 2P1 + P3.

Working paper with François Dross and Daniël Paulusma: The 5 cases in orange have bounded clique-width. Theorem (D., Paulusma 2015)

This leaves 13 cases where it is unknown if the clique-width of (H1, H2)-free graphs is bounded or not (up to some equivalence relation).

1. H1 = 3P1, H2 ∈ {P1 + P2 + P3, P1 + 2P2, P1 + P5, P1 + S1,1,3, P2 + P4, S1,2,2,S1,2,3};

2. H1 = 2P1 + P2, H2 ∈{P1 + P2 + P3, P1 + 2P2,P1 + P5};

3. H1 = P1 + P4, H2 ∈ {P1 + 2P2, P2 + P3} or

4. H1 = H2 = 2P1 + P3.

Working paper with François Dross and Daniël Paulusma: The 5 cases in orange have bounded clique-width. Split Graphs

A graph is split if its vertices can be partitioned into an independent set and a clique.

Equivalently, split graphs are the (2P2, C4, C5)-free graphs.

2P2 C4 C5 H-free Split Graphs

F4 F5

Theorem (Brandstädt, D., Huang, Paulusma, 2015) Let H be a graph such that neither H nor H is in {F4, F5}. The class of H-free split graphs has bounded clique-width if and only if H or H is I isomorphic to rP1 for some r ≥ 1 or I an induced subgraph of one of:

K1,3 + 2P1 F1 F2 F3 bull +P1 Q Split Partitions A can have more than one way of partitioning the vertices into a clique and an independent set.

Can’t have two vertices both in the clique in one partition and both in the independent set in another partition.

So, if two partitions differ on two vertices, they must look like this:

These are the same! Can only differ on one vertex. Split Partitions A split graph can have more than one way of partitioning the vertices into a clique and an independent set.

Can’t have two vertices both in the clique in one partition and both in the independent set in another partition.

So, if two partitions differ on two vertices, they must look like this:

These are the same! Can only differ on one vertex. Split Partitions A split graph can have more than one way of partitioning the vertices into a clique and an independent set.

Can’t have two vertices both in the clique in one partition and both in the independent set in another partition.

So, if two partitions differ on two vertices, they must look like this:

These are the same! Can only differ on one vertex. Split Partitions A split graph can have more than one way of partitioning the vertices into a clique and an independent set.

Can’t have two vertices both in the clique in one partition and both in the independent set in another partition.

So, if two partitions differ on two vertices, they must look like this:

These are the same! Can only differ on one vertex. Labelled Bipartite Graphs

A labelled consists of a set W of white vertices and a set B of black vertices. Let H` be a labelled bipartite graph. A bipartite graph G is weakly H`-free if it has a bipartite partition such that H is not an induced subgraph of G in a way that respects the colours.

∗ H` H`

G Labelled Bipartite Graphs

A labelled bipartite graph consists of a set W of white vertices and a set B of black vertices. Let H` be a labelled bipartite graph. A bipartite graph G is weakly H`-free if it has a bipartite partition such that H is not an induced subgraph of G in a way that respects the colours.

∗ H` H`

G Labelled Bipartite Graphs

A labelled bipartite graph consists of a set W of white vertices and a set B of black vertices. Let H` be a labelled bipartite graph. A bipartite graph G is weakly H`-free if it has a bipartite partition such that H is not an induced subgraph of G in a way that respects the colours.

∗ H` H`

G Theorem (D., Paulusma (2014))

The class of weakly H`-free bipartite graphs has bounded clique-width if and only if H` or H` is a labelled induced subgraph of one of the following:

b b b b (kP1) for k = 5 (P2 + P4) P6 (P1 + P5) Corollary

The class of H-free split graphs has bounded clique-width if H is one of the following graphs:

Kr for R = 5 Q Q bull +P1 Theorem

The class of F3-free split graphs has bounded clique-width.

Proof.

I Let G be an F3-free split graph. Fix a split partition of G. We may assume it is prime, so no two vertices have the same neighbourhood.

I If G contains less than 19 copies of D, we can delete them and get a Q-free split graph, so done.

I Assume G contains at least 19 vertex-disjoint copies of D, say D1,..., D19. Theorem

The class of F3-free split graphs has bounded clique-width.

Proof.

I Let G be an F3-free split graph. Fix a split partition of G. We may assume it is prime, so no two vertices have the same neighbourhood.

I If G contains less than 19 copies of D, we can delete them and get a Q-free split graph, so done.

I Assume G contains at least 19 vertex-disjoint copies of D, say D1,..., D19. Theorem

The class of F3-free split graphs has bounded clique-width.

Proof.

I Let G be an F3-free split graph. Fix a split partition of G. We may assume it is prime, so no two vertices have the same neighbourhood.

I If G contains less than 19 copies of D, we can delete them and get a Q-free split graph, so done.

I Assume G contains at least 19 vertex-disjoint copies of D, say D1,..., D19. Theorem

The class of F3-free split graphs has bounded clique-width.

Proof.

I Let G be an F3-free split graph. Fix a split partition of G. We may assume it is prime, so no two vertices have the same neighbourhood.

I If G contains less than 19 copies of D, we can delete them and get a Q-free split graph, so done.

I Assume G contains at least 19 vertex-disjoint copies of D, say D1,..., D19. I Let i, j ∈ {1,..., 19}. I Every white vertex in Dj must have a black non-neighbour in every Di .

I Every white vertex in Dj must have a black neighbour in every Di . I Let i, j ∈ {1,..., 19}. I Every white vertex in Dj must have a black non-neighbour in every Di .

I Every white vertex in Dj must have a black neighbour in every Di . I Let i, j ∈ {1,..., 19}. I Every white vertex in Dj must have a black non-neighbour in every Di .

I Every white vertex in Dj must have a black neighbour in every Di . I Let i, j ∈ {1,..., 19}. I Every white vertex in Dj must have a black non-neighbour in every Di .

I Every white vertex in Dj must have a black neighbour in every Di . I Each white vertex in a Di must have one of the 6 × 6 = 36 possible neighbourhoods in D1 and D2. I There must be two white vertices with a common neighbour in D2, and common non-neighbours in D1 and D2.

I Since no two vertices have the same neighbourhood, there must be a black vertex that distinguishes them.

I Contradiction! I Each white vertex in a Di must have one of the 6 × 6 = 36 possible neighbourhoods in D1 and D2. I There must be two white vertices with a common neighbour in D2, and common non-neighbours in D1 and D2.

I Since no two vertices have the same neighbourhood, there must be a black vertex that distinguishes them.

I Contradiction! I Each white vertex in a Di must have one of the 6 × 6 = 36 possible neighbourhoods in D1 and D2. I There must be two white vertices with a common neighbour in D2, and common non-neighbours in D1 and D2.

I Since no two vertices have the same neighbourhood, there must be a black vertex that distinguishes them.

I Contradiction! I Each white vertex in a Di must have one of the 6 × 6 = 36 possible neighbourhoods in D1 and D2. I There must be two white vertices with a common neighbour in D2, and common non-neighbours in D1 and D2.

I Since no two vertices have the same neighbourhood, there must be a black vertex that distinguishes them.

I Contradiction! H-free Chordal Graphs

F1 F2 Theorem (Brandstädt, D., Huang, Paulusma 2015) Let H be a graph with H ∈/ {F1, F2}. The class of H-free chordal graphs has bounded clique-width if and only if H is a an induced subgraph of one of:

S1,1,2 K1,3 + 2P1 P1 + P1 + P3 P1 + 2P1 + P2

bull Kr for r = 5 P1 + P4 P1 + P4 H-free Weakly Chordal Graphs

Theorem (Brandstädt, D., Huang, Paulusma 2015) Let H be a graph. Then the class of H-free weakly chordal graphs has bounded clique-width if and only if H ⊆i P4. H-free Bipartite Graphs Theorem (D., Paulusma 2014)

The class of H-free bipartite graphs has bounded clique-width if and only if H is an induced subgraph one of:

sP1 for some s (s = 5 shown) K1,3 + 3P1 P1 + S1,1,3

K1,3 + P2 S1,2,3 Other Containment Relations

Theorem (D., Paulusma 2015)

Let {H1,..., Hp} be a finite set of graphs. Then the following statements hold:

(i) The class of (H1,..., Hp)-subgraph-free graphs has bounded clique-width if and only if Hi ∈ S for some 1 ≤ i ≤ p.

(ii) The class of (H1,..., Hp)-minor-free graphs has bounded clique-width if and only if Hi is planar for some 1 ≤ i ≤ p.

(iii) The class of (H1,..., Hp)-topological-minor-free graphs has bounded clique-width if and only if Hi is planar and has maximum degree at most 3 for some 1 ≤ i ≤ p. Summary of Open Problems

For which pairs of graphs (H1, H2) does the class of (H1, H2)-free graphs have bounded clique-width? (13 open cases: see also “Clique-width of Graph Classes Defined by Two Forbidden Induced Subgraphs” D. & Paulusma, CIAC 2015 and arXiv:1405.7092.) Upcoming result: (3P1, P1 + 2P2)-free graphs and four superclasses have bounded clique-width. For which graphs H does the class of H-free chordal graphs have bounded clique-width? (2 open cases: see also “Bounding the Clique-Width of H-free Chordal Graphs” Brandstädt, D., Huang, Paulusma, MFCS 2015 and arXiv:1502.06948.) For which graphs H does the class of H-free split graphs have bounded clique-width? (2 open cases: see also “Bounding the Clique-Width of H-free Split Graphs” Brandstädt, D., Huang, Paulusma, Eurocomb 2015) Summary of Open Problems For which pairs of graphs (H1, H2) does the class of (H1, H2)-free graphs have bounded clique-width? (13 open cases: see also “Clique-width of Graph Classes Defined by Two Forbidden Induced Subgraphs” D. & Paulusma, CIAC 2015 and arXiv:1405.7092.) Upcoming result: (3P1, P1 + 2P2)-free graphs and four superclasses have bounded clique-width. For which graphs H does the class of H-free chordal graphs have bounded clique-width? (2 open cases: see also “Bounding the Clique-Width of H-free Chordal Graphs” Brandstädt, D., Huang, Paulusma, MFCS 2015 and arXiv:1502.06948.) For which graphs H does the class of H-free split graphs have bounded clique-width? (2 open cases: see also “Bounding the Clique-Width of H-free Split Graphs” Brandstädt, D., Huang, Paulusma, Eurocomb 2015) Thank You!