Abstract 1 Introduction 2 Preliminaries 3 The Proof of Theorem 2 4 The Proof of the Polynomial Part of Theorem 3 5 The Proof of the NP-Completeness Part of Theorem 3 6 Additional Results and Concluding Remarks References

Colouring Probe H-Free Graphs

Daniël Paulusma ORCID Department of Computer Science, Durham University, UK Johannes Rauch ORCID Institute of Optimization and Operations Research, Ulm University, Germany Erik Jan van Leeuwen ORCID Department of Information and Computing Sciences, Utrecht University, The Netherlands
Abstract

The 𝖭𝖯-complete problems Colouring and k-Colouring (k≄3) are well studied on H-free graphs, i.e., graphs that do not contain some fixed graph H as an induced subgraph. We research to what extent the known polynomial-time algorithms for H-free graphs can be generalized if we only know some of the edges of the input graph. We do this by considering the classical probe graph model introduced in the early nineties. For a graph H, a partitioned probe H-free graph (G,P,N) consists of a graph G=(V,E), together with a set P⊆V of probes and an independent set N=V∖P of non-probes, such that G+F is H-free for some edge set F⊆(N2). We show the following:

  • ■

    We fully classify Colouring on partitioned probe H-free graphs and show that the obtained complexity dichotomy differs from the known dichotomy of Colouring for H-free graphs.

  • ■

    We fully classify 3-Colouring on partitioned probe Pt-free graphs: we prove polynomial-time solvability for t≀5 and 𝖭𝖯-completeness for t≄6. In contrast, 3-Colouring on Pt-free graphs is known to be polynomial-time solvable for t≀7 and quasi-polynomial-time solvable for t≄8.

Our main result is our polynomial-time algorithm for 3-Colouring on partitioned P5-free graphs. For this result, and also for all our other polynomial-time results, we do not need to know the edge set F; we only need to know its existence. Moreover, the class of probe P5-free graphs includes not only paths of arbitrary length but even all bipartite graphs and is much richer than the class of P5-free graphs. The latter is also evidenced by the fact that there exist graph problems, such as Matching Cut, that are known to be polynomial-time solvable for P5-free graphs but 𝖭𝖯-complete for partitioned probe P5-free graphs. In particular, unlike the class of 3-colourable P5-free graphs, the class of 3-colourable probe P5-free graphs has unbounded mim-width. Hence, our polynomial-time result for 3-Colouring for probe P5-free graphs suggests that there may be another, deeper overarching reason why 3-Colouring is polynomial-time solvable for P5-free graphs.

Keywords and phrases:
colouring, probe graph, forbidden induced subgraph, complexity dichotomy
Funding:
Johannes Rauch: Supported by the German Academic Scholarship Foundation (Studienstiftung des Deutschen Volkes).
Copyright and License:
[Uncaptioned image] © DaniĂ«l Paulusma, Johannes Rauch, and Erik Jan van Leeuwen; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing → Graph theory
; Theory of computation → Graph algorithms analysis ; Theory of computation → Problems, reductions and completeness
Related Version:
Full Version: https://arxiv.org/abs/2505.20784
Acknowledgements:
We thank Clément Dallard and Andrea Munaro for helpful discussions and ideas that ultimately led to the proof of Theorem 3.
Editors:
Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim TháșŻng

1 Introduction

Colouring is a classical graph problem. Given a graph G and a positive integer k, it asks whether it is possible to colour the vertices of G with k colours such that any two adjacent vertices receive different colours. The variant where k is fixed beforehand, and not part of the input anymore, is known as k-Colouring. It is well known that 3-Colouring, and thus Colouring, are 𝖭𝖯-complete problems [39]. This led to a rich body of literature that tries to understand what graph structure causes the computational hardness in Colouring. In our paper we extend this body of work by researching the computational complexity of Colouring and k-Colouring on classes of graphs that generalize the well-known H-free graphs (a graph G is H-free if G does not contain H as an induced subgraph) but for which we do not know all the edges. Before discussing our model of incomplete information, we first briefly survey some relevant known results for Colouring and k-Colouring.

𝐇-Free Graphs.

KrĂĄl et al. [54] showed that if H is a (not necessarily proper) induced subgraph of P4 or P3+P1, where Pt denotes the path on t vertices, then Colouring on H-free graphs is solvable in polynomial time; otherwise, it is 𝖭𝖯-complete. For k-Colouring, the complexity status on H-free graphs has not been resolved yet. For every k≄3, k-Colouring for H-free graphs is 𝖭𝖯-complete if H has a cycle [37] or an induced claw [50, 56]. However, the remaining case where H is a linear forest (disjoint union of paths) has not been settled yet. For Pt-free graphs, the cases k≀2, t≄1 (trivial), k≄3, t≀5 [49], k=3, 6≀t≀7 [9] and k=4, t=6 [28, 29] are polynomial-time solvable and the cases k=4, t≄7 [51] and k≄5, t≄6 [51] are 𝖭𝖯-complete. The cases k=3 and t≄8 are still open, despite some evidence that these cases are polynomial-time solvable due to a quasi-polynomial-time algorithm [60]. We refer to the survey [41] and some later articles [25, 26, 48, 53] for results on k-Colouring for H-free graphs if H is a disconnected linear forest, and to [52] for the most recent results on Colouring for (H1,H2)-free graphs, for which also still many cases remain open.

Probe 𝐇-Free Graphs.

In this article, we aim to further our understanding of the complexity of Colouring and k-Colouring by studying probe graphs. Probe graphs are used to model graphs for which the global structure is known (e.g. H-freeness). However, we only know the complete set of neighbours for some vertices of a probe graph G. These vertices are the probes of G. The other vertices are the non-probes of G and form an independent set in G, as we do not know which of them are adjacent to each other. We only know that there exists a “certifying” set F of edges on the non-probes such that G+F exhibits the global structure (e.g. being H-free). In particular, the subgraph of G induced by the set of probes already has this global structure (e.g. is H-free). The notion of probe graphs was introduced by Zhang et al. [64] in genome research to make a genome mapping process more efficient.

Formally, for a graph class 𝒱, the class 𝒱p consists of all graphs G that can be modified into a graph from 𝒱 by adding some edges between an independent set N of G. If for a graph in 𝒱p, the sets P and N=V∖P are given, then we speak of a partitioned probe graph. Hence, a partitioned probe H-free graph (G,P,N) consists of a graph G=(V,E), together with a set P⊆V of probes and an independent set N=V∖P of non-probes, such that G+F is H-free for some edge set F⊆(N2). We note that an H-free graph itself is also a (partitioned) probe H-free graph, namely with P=V and N=∅. Hence, for every graph H, the class of (partitioned) probe H-free graphs contains the class of H-free graphs. Consequently, any 𝖭𝖯-completeness results for H-free graphs immediately carry over to partitioned probe H-free graphs. However, it also leads to the following research question:
If an 𝖭𝖯-complete problem Π is polynomial-time solvable on H-free graphs for some graph H, is Π also polynomial-time solvable on (partitioned) probe H-free graphs?

Our Focus.

To investigate our research question, we consider Colouring and k-Colouring for (partitioned) probe H-free graphs. For some graphs H, such as H=P4 [22], probe H-free graphs can be recognized in polynomial time. However, for most graphs H, including H=P5, the recognition of probe H-free graphs and the distinction between probes and non-probes are open problems. Hence, we usually require the sets of probes P and non-probes N to be part of the input, i.e., we must consider partitioned probe H-free graphs. Note that we can colour a probe H-free graph G with one extra colour (assigned to each vertex in N) than the number of colours used for G⁹[P]. The challenge is to determine if we need that extra colour.

Related Work.

So far, most previous work on probe graphs focused on characterising and recognising classes of probe graphs [42, 22, 20, 4, 43, 5, 55]. However, recently, the first systematic studies of optimisation problems on partitioned probe H-free graphs were undertaken. Brettell et al. [15] considered Vertex Cover on partitioned probe H-free graphs and Dabrowski et al. [31] did the same for Matching Cut and some of its variants. A takeaway from [15, 31] is that determining the complexity of Vertex Cover for (partitioned) probe P5-free graphs seems challenging, whereas Matching Cut is 𝖭𝖯-complete on partitioned probe P5-free graphs, even though they are both polynomial-time solvable on P5-free graphs [58, 38].

Helpful for algorithmic studies as [15, 31] is that probe graphs inherit some properties from the graph class they are based on. This is also true when studying Colouring. For example, Golumbic and Lipshteyn [42] proved that probe chordal graphs are perfect. Hence, we obtain that Colouring is polynomial-time solvable for probe chordal graphs, as Colouring is so for perfect graphs [45, 46]. In 2012, Chandler et al. [21] conjectured that this holds even for Colouring on partitioned probe perfect graphs. Moreover, the following is known:

Proposition 1 ([22, 15]).

Let 𝒱 be a class of graphs and let w be a fixed integer.

  1. (i)

    If 𝒱 has clique-width at most w, then 𝒱p has clique-width at most 2ⁱw.

  2. (ii)

    If 𝒱 has mim-width at most w, then 𝒱p has mim-width at most 2ⁱw.

Hence, as 𝒱⊆𝒱p holds for every graph class 𝒱, we obtain that a graph class 𝒱 has bounded mim-width (clique-width) if and only if 𝒱p has bounded mim-width (clique-width). However, if the yes-instances for some problem Π in 𝒱 have bounded width, this may no longer hold for the yes-instances for Π in 𝒱p. If we can still solve Π on 𝒱p, this means there might be a deeper reason for the polynomial-time behaviour of Π on 𝒱. We will also research this.

Our Results.

As mentioned, we focus on Colouring and k-Colouring for probe H-free graphs. Our first result is a full dichotomy of Colouring on partitioned probe H-free graphs (for two graphs G1 and G2, we write G1⊆iG2 if G1 is an induced subgraph of G2).

Theorem 2.

For a graph H, Colouring is polynomial-time solvable for probe H-free graphs if H⊆iP4, and else it is 𝖭𝖯-complete even for partitioned probe H-free graphs.

By Theorem 2, Colouring is 𝖭𝖯-complete for partitioned probe 3ⁱP1-free graphs, while Colouring is even polynomial-time solvable on (P3+P1)-free graphs [54]. It is known that the class of H-free graphs has bounded mim-width [13] if and and only if it has bounded clique-width (see e.g. [33]) if and only if H is an induced subgraph of P4. Hence, Theorem 2 also implies, together with Proposition 1, that Colouring on (not necessarily partitioned) probe H-free graphs is solvable in polynomial time exactly when the mim-width or clique-width is bounded. In fact, we apply Proposition 1 to show the first part of Theorem 2, while for the second part we modify a known hardness reduction for Colouring [6]; see Section 3.

Our second result is a full dichotomy for 3-Colouring on partitioned probe Pt-free graphs:

Theorem 3.

For an integer t≄1, 3-Colouring on partitioned probe Pt-free graphs is polynomial-time solvable if t≀5 and 𝖭𝖯-complete if t≄6.

In Section 4 we prove the polynomial part of Theorem 3 by giving our main result: a polynomial-time algorithm for 3-Colouring for partitioned probe P5-free graphs. The class of P5-free graphs has been extensively studied for many well-known graph problems, yielding polynomial-time algorithms not only for k-Colouring for any k≄1 [49], but also Vertex Cover [58], Feedback Vertex Set [1], Independent Feedback Vertex Set [8] and very recently, Odd Cycle Transversal [2], or more generally, Maximum Partial List H-Coloring for every fixed graph H [57]. Our polynomial-time result for 3-Colouring on partitioned probe P5-free graphs is the first result that generalizes a known polynomial-time result for a (classical) graph problem on P5-free graphs to partitioned probe P5-free graphs.

In Section 5 we prove the second part of Theorem 3. In fact, we show that 3-Colouring is 𝖭𝖯-complete even on partitioned probe (P6,2⁹P3,3⁹P2)-free graphs. In contrast, 3-Colouring is polynomial-time solvable even on P7-free graphs [9] and s⁹P2-free graphs for all s≄1 [32].

In Section 6, we point out many natural directions for future research. In particular, we determine all (disconnected) graphs H for which 3-Colouring on probe partitioned H-free graphs is still open and solve one such open case, namely when H=P3+s⁹P1. Moreover, we consider k-Colouring for k≄4 and solve one open case, namely when H=P2+s⁹P1 for s≄1, by proving that for every s≄0, all probe (P2+s⁹P1)-free graphs are (s+1)⁹P2-free.

Proof Ideas behind Our Main Result.

As evidenced by the C5, there are P5-free graphs that are not perfect, and there exist three different proofs for showing that 3-Colouring is polynomial-time solvable on P5-free graphs. As discussed below, these proofs are not applicable to probe P5-free graphs, even though two of them provide good starting points.

First, in the proof of Brettell et al. [14], it was shown that k-colourable P5-free graphs have bounded mim-width for all k≄1, directly implying that k-Colouring becomes polynomial-time solvable [17]. However, bipartite graphs are even 2-colourable and readily seen to be even probe 2⁹P2-free (as shown below explicitly for paths) while already chordal bipartite graphs have not only unbounded mim-width [12] but even unbounded sim-width [10]. This also shows that probe 3-colourable P5-free graphs, which have bounded mim-width due to Proposition 1, are only a small subclass of the class of 3-colourable probe P5-free graphs.

Second, in the proof of Randerath, Schiermeyer and Tewes [62], a connected 3-colourable P5-free graph is shown to have a dominating set D of constant size. By precolouring D in every possible way, polynomially many instances of 2-List Colouring (i.e., where all lists of admissible colours have size 2) are obtained. As 2-List Colouring can be formulated as 2-SAT, it is polynomial-time solvable [36]. This approach fails for probe P5-free graphs. To see this, let G be a path u1ⁱu2ⁱ
ⁱu2ⁱn. Let P={u1,u3,
,u2ⁱn−1} and N={u2,u4,
,u2ⁱn}. Note that P and N are independent. Hence, making N a clique yields a split graph, which is 2ⁱP2-free, so G is even probe 2ⁱP2-free. However, for large n, G has no small dominating set.

Finally, in the proof of Woeginger and Sgall [63], it is first shown that every (C3,P5)-free graph G is 3-colourable. Next, the case where G contains at least one triangle C (which may not be dominating) is considered. After colouring C, the following rule is applied exhaustively: whenever a vertex v has two neighbours not coloured alike, give v the third colour. Afterwards, it is again shown that an instance of 2-List Colouring is obtained. Also this approach does not work for probe P5-free graphs due to their more intricate structure. By extending the arguments as in [63], we can show that even all C3-free probe P5-free graphs, which include all (probe) (C3,P5)-free graphs, are 3-colourable (see Section 4). However, C3-free probe P5-free graphs form only a small subclass of 3-colourable probe P5-free graphs.

As we explain below, our proof for partitioned probe P5-free graphs turns out to be substantially more involved than the second and third proofs for P5-free graphs and does not rely on the boundedness of some width parameter.

First, if all connected components of the subgraph induced by the probes are bipartite, we can colour the probes with colours 1 and 2 and use colour 3 for the non-probes (as the non-probes form an independent set). Next, we show that at most one connected component K of the subgraph induced by the set of probes can be non-bipartite. Then, by P5-freeness, we find that K has a short odd cycle C. The fact that in general, C is not a dominating cycle of the graph causes several complications. To overcome these complications, we branch on the colours of C and then just like [63], we try to extend the colouring as much as possible using propagation rules, with the aim to reduce eventually to polynomially many instances of 2-List Colouring. We show that the latter is possible via (i) a new decomposition of probe P5-free graphs, which carefully takes into account the fact that we do not know the missing edges between the non-probes that make the graph P5-free (as illustrated in Figure 3) and (ii) an adaptation of the standard 2-SAT formula for 2-List Colouring.

2 Preliminaries

Let G be a graph, and k be a positive integer. The order of G is its number of vertices, and the size of G is its number of edges. For a vertex v of G, we denote its (open) neighbourhood by NG⁹(v), and its closed neighbourhood by NG⁹[v]=NG⁹(v)âˆȘ{v}. For a set S of vertices of G, let NG⁹[S]=⋃v∈SNG⁹[v], and NG⁹(S)=NG⁹[S]∖S. A vertex v∉S is complete to a set of vertices S if v is adjacent to every vertex of S, and v is anticomplete to S if v is not adjacent to any vertex of S. Let Sâ€Č be another set of vertices of G that is disjoint to S. If every vertex of S is complete (anticomplete) to Sâ€Č, then S is complete (anticomplete) to Sâ€Č. We write G⁹[S] for the subgraph of G induced by S. For two vertex-disjoint graphs G1 and G2, we let G1+G2 denote their disjoint union, which is the graph (V⁹(G1)âˆȘV⁹(G2),E⁹(G1)âˆȘE⁹(G2)). For a graph G and integer s≄1, s⁹G denotes the disjoint union of s copies of G.

For a graph H, we say that G is H-free if there is no set of vertices S such that Gⁱ[S] is isomorphic to H. We say that G is probe H-free if there is a partition of the vertices of G into a set of probes P and a set of non-probes N, such that N is independent in G, and there is a set of edges F⊆(N2) such that G+F is H-free. Note that Gⁱ[P] is H-free if G is probe H-free. A partitioned probe H-free graph is a triple (G,P,N), where G is a probe H-free graph with P as the probes and N as the non-probes, that is, the sets of probes and non-probes are given. For a set {H1,
,Hr} of graphs, a graph G is (H1,
,Hr)-free if G is Hi-free for every i∈{1,
,r}. A graph G is probe (H1,H2,
)-free if there is an independent set N of non-probes in G and a set of edges F⊆(N2) such that G+F is (H1,H2,
)-free. In a partitioned probe (H1,H2,
)-free graph (G,P,N), the graph G is probe (H1,H2,
)-free with set of probes P and set of non-probes N.

We define [k]={1,
,k}. A partial k-colouring of G is a function ψ:V⁹(G)→[k]âˆȘ{⟂} such that, if u⁹v∈E⁹(G) with Ïˆâą(u),Ïˆâą(v)∈[k], then Ïˆâą(u)â‰ Ïˆâą(v). If v is a vertex of G with Ïˆâą(v)∈[k], then v is coloured (under ψ). Let ψâ€Č be another partial k-colouring of G. Then ψâ€Č is an extension of ψ if Ïˆâą(v)∈[k] implies that ψâ€Č⁹(v)=Ïˆâą(v). A k-colouring of G is a partial k-colouring under which every vertex of G is coloured. For S⊆V⁹(G), we define Ïˆâą(S)={Ïˆâą(v):v∈S}.

Algorithm 1 is a simple colour propagation algorithm that is essential to the proof of Theorem 3. The following properties of Algorithm 1 are easy and their proofs are omitted:

Algorithm 1 Simple colour propagation.
Lemma 4.

Let ψ be a partial k-colouring of a graph G.

  1. (i)

    If Algorithm 1 on (G,ψ) returns an extension ψâ€Č of ψ and v∈V⁹(G) is coloured under ψâ€Č, then v has the same colour under any k-colouring of G that is an extension of ψ (if any exist).

  2. (ii)

    If Algorithm 1 on (G,ψ) returns an error, then there is no k-colouring of G that is an extension of ψ.

  3. (iii)

    Algorithm 1 runs in polynomial time.

We use the following well-known lemma, which is due to Edwards [36]. We provide a proof to adapt it later.

Lemma 5.

Given a graph G and a partial k-colouring ψ of G, for every uncoloured vertex v∈V⁹(G), define the set of available colours of v as L⁹(v)=[k]âˆ–Ïˆâą(NG⁹(v)). If |L⁹(v)|≀2 for every uncoloured vertex v∈V⁹(G), then deciding if there is a k-colouring that is an extension of ψ is possible in polynomial time.

Proof.

Let the SAT formula ℱ in conjunctive normal form have variables xvi for every uncoloured vertex v∈V⁹(G) and every i∈L⁹(v), and clauses

  • ■

    ⋁i∈L⁹(v)xvi for every uncoloured vertex v (i.e., if L⁹(v)=∅, then ℱ is not satisfiable) and

  • ■

    x¯ui√x¯vi for every u⁹v∈E⁹(G) with uncoloured vertices u and v and i∈L⁹(u)∩L⁹(v).

According to the assumptions ℱ is a 2-SAT formula. By construction, there is a k-colouring of G that is an extension of ψ if and only if ℱ is satisfiable. This completes the proof since deciding the satisfiability of a 2-SAT formula is possible in polynomial time [3]. ◀

3 The Proof of Theorem 2

In this section we show Theorem 2. The proof of our next result is based on an existing construction from [6], and we omit the proof details.

Proposition 6.

Colouring is 𝖭𝖯-complete on partitioned probe 3ⁱP1-free graphs.

We combine Proposition 6 with the 𝖭𝖯-completeness part of the dichotomy of Král et al. [54], the fact that P4-free graphs have clique-width 2 [30] and Proposition 1 to obtain Theorem 2 (proof details omitted):

Theorem 2. [Restated, see original statement.]

For a graph H, Colouring is polynomial-time solvable for probe H-free graphs if H⊆iP4, and else it is 𝖭𝖯-complete even for partitioned probe H-free graphs.

4 The Proof of the Polynomial Part of Theorem 3

In this section we prove the main result of our paper, namely that 3-Colouring is polynomial-time solvable for partitioned probe P5-free graphs.

We first show the following independent result (Proposition 7) in more or less the same way as done in [63] for showing that (C3,P5)-free graphs are 3-colourable. The main difference is that we must take into account the probes and non-probes. As such, the proof of this result serves as warm-up exercise illustrating some of the arguments we will use in a more involved way in the proof of our main result. Note that probe (C3,P5)-free graphs form a subclass of C3-free probe P5-free graphs. This containment is proper, as

  1. (i)

    probe (C3,P5)-free graphs have bounded mim-width, due to (C3,P5)-free graphs having bounded mim-width [14] and Proposition 1, and

  2. (ii)

    chordal bipartite graphs, which are C3-free probe P5-free, have unbounded mim-width [12].

Proposition 7.

All C3-free probe P5-free graphs, and thus all probe (C3,P5)-free graphs, are 3-colourable.

Proof.

Let G=(V,E) be a C3-free probe P5-free graph. Let P be the set of probes and N=V∖P be the set of non-probes, so N is an independent set. By definition, there exists a set F of edges with both end-vertices in N such that G+F is P5-free. We may assume without loss of generality that G is connected, as otherwise we consider every connected component of G separately.

If Gⁱ[P] is bipartite, then we colour Gⁱ[P] with colours 1 and 2, and as N is independent, we can use colour 3 for the vertices of N. Now suppose that Gⁱ[P] is not bipartite. This means that Gⁱ[P] has an odd cycle C. As G is C3-free and probe P5-free, Gⁱ[P] must be (C3,P5)-free. Hence, C has length 5. Let Vⁱ(C)={v1,
,v5} in that order. We will now use, with a little bit of extra care, the same arguments as in [63].

We first claim that every vertex not on C has a neighbour on C. Else, as G is connected, there exists a vertex u∈V∖Vⁱ(C) that is anti-complete to C and that has a neighbour v that is adjacent to at least one vertex on C, say vⁱv1∈E. If uⁱvⁱv1ⁱv2ⁱv3 is an induced P5 in G, then uⁱvⁱv1ⁱv2ⁱv3 is also an induced P5 in G+F. The reason is that F contains no edge that is incident with a vertex from {v1,v2,v3}, because v1,v2,v3 all belong to P. As G is C3-free and G+F is P5-free, this means that v must be adjacent to v3 in G. By applying the same arguments on the path uⁱvⁱv3ⁱv4ⁱv5, we find that v must be adjacent to v5 in G as well. However, now v,v1,v5 form a triangle in G, contradicting the C3-freeness of G.

We now claim that every vertex not on C has exactly two neighbours vi and vi+2 on C for some i∈{1,
,5}, where we write v6:=v1 and v7:=v2. Let v∈V∖Vⁱ(C). By the above, v has a neighbour on C, say v is adjacent to v1. Recall that F does not contain any edges incident to vertices of C, as Vⁱ(C)⊆P. Hence, if vⁱv1ⁱv2ⁱv3ⁱv4 is an induced P5 in G, then vⁱv1ⁱv2ⁱv3ⁱv4 is also an induced P5 in G+F. As G is C3-free and G+F is P5-free, this means that v is either adjacent to v3 (take i=1) or to v4 (take i=4). Due to the above, we can decompose V as

V=V⁹(C)âˆȘV1,3âˆȘV2,4âˆȘV3,5âˆȘV4,1âˆȘV5,2,

where for i∈{1,
,5}, the set Vi,i+2 consist of all vertices of V∖C whose neighbours on C are exactly vi and vi+2. We give v1,v2,v3,v4,v5 colours 1,2,1,2,3, respectively. Moreover, we colour all the vertices of V1,3, V2,4, V3,5, V4,1 and V5,2 with colours 2,1,2,3,1, respectively. As G is C3-free, the five sets Vi,i+1 are all independent. Therefore, the only potential conflicts could be between vertices from V1,3 and V3,5, which are all coloured 2, or between vertices from V2,4 and V5,2, which are all coloured 1. However, the former vertices are all incident to v3, and thus form an independent set in G, and similarly, the latter vertices are all adjacent to v2, and thus als form an independent set in G. We conclude that we have indeed constructed a 3-colouring of G, completing the proof. ◀ We are now ready to show the main result of our paper, which we prove in the way as outlined at the end of Section 1.

Theorem 8.

3-Colouring is polynomial-time solvable for partitioned probe P5-free graphs.

Proof.

Let (G,P,N) be a partitioned probe P5-free graph. We may assume that G is connected; otherwise, we execute the given algorithm for every connected component of G. Let F⊆(N2) be such that G+F is P5-free. We define F only for verifying correctness; the polynomial-time algorithm does not use F. If G is P5-free, then it is possible in polynomial time to determine whether G is 3-colourable [49]. Therefore, we may assume that G is not P5-free and, in particular, |N|≄2 and |F|≄1. We may also assume that G does not contain a clique of order at least 4; otherwise, G is not 3-colourable. Let K1,
,Kt be the connected components of G⁹[P] that contain at least one edge. We may assume at least one such connected component exists; else G is bipartite with partite sets P and N, and thus clearly 3-colourable in polynomial time.

Getting initial structure.

We begin by proving two claims that describe the structure of edges between K1,
,Kt and N.

Figure 1: Left: Proof of Claim 9. The dashed lines indicate non-existing edges. Right: Proof of Claim 10. Note that u⁹v∈F.
Claim 9.

Every vertex of N that is neither complete nor anticomplete to Ki for some i∈[t] is complete or anticomplete to Kj for every j∈[t] with j≠i.

Proof.

Let v∈N be neither complete nor anticomplete to Ki. Suppose that v has a neighbour in Kj, where j≠i. It suffices to prove that v is complete to Kj. Assume, for a contradiction, that w∈V⁹(Kj) is not adjacent to v. By assumption, there exists u∈V⁹(Ki) that is not adjacent to v. A shortest u-v-path with internal vertices in Ki followed by a shortest v-w-path with internal vertices in Kj is induced in G+F and has length at least 4; see Figure 1. Since such a path exists, there is an induced P5 in G+F, a contradiction. âŠČ

If K1,
,Kt are all bipartite, then G is clearly 3-colourable, since N is independent in G. Therefore, we may assume that t≄1 and K1 is not bipartite. This implies that K1 contains an induced odd cycle and, since K1 is P5-free because of V⁹(K1)⊆P, such a cycle has length 3 or length 5. We now pick an induced odd cycle C in K1 as follows. If K1 contains an induced C5, then let C be any such C5. If K1 does not contain an induced C5, but contains an induced C3 that dominates K1, then let C be any such C3. Otherwise, we pick C to be an arbitrary C3. Note that computing C is possible in polynomial time.

If a single vertex of Vⁱ(G)∖C dominates C, then G is clearly not 3-colourable. Hence, we may assume from here that this is not the case. This fact (that we often use implicitly) has important implications. In particular, no vertex of N dominates K1. But also:

Claim 10.

Let u∈N be a vertex with no neighbour in K1. If u has a neighbour in Ki with i≄2, then a vertex of N with a neighbour in K1 is complete to Ki.

Proof.

Consider a shortest u-C-path Q in G+F. As u has no neighbour in K1, Q has length at least 2. Let w be the vertex of C where Q ends and let v be the vertex on Q preceding w. Using the observation preceding the claim, v is not complete to C. We may thus assume that Q was chosen such that there exists a vertex z∈NC⁹(w)∖NG+F⁹(v). If v∈K1, then as u does not neighbour K1, the path Q⁹z has length at least 4, a contradiction to the fact that G+F is P5-free. Hence, v∈N∖{u} and v is neither complete nor anticomplete to K1. If v is not a neighbour of u in G+F, then Q⁹z is an induced path in G+F of length at least 4, a contradiction. Let x be a neighbour of u in Ki. If x is not a neighbour of v in G+F, then the path x⁹u⁹v⁹w⁹z is an induced P5 in G+F, a contradiction; see Figure 1 right. Hence, v has a neighbour in Ki, and the claim follows from Claim 9. âŠČ

Claim 11.

The connected components K2,
,Kt are all bipartite or G is not 3-colourable.

Proof.

Assume (without loss of generality) K2 is not bipartite and G is 3-colourable. From our earlier observation, if some vertex is complete to K1 or to K2, then G is not 3-colourable, a contradiction. As G is connected, K2 has a neighbour u∈N. Hence, u is neither complete or anticomplete to K2. As u cannot be complete to K1, by Claim 9, u is anticomplete to K1. Then, by Claim 10, there is a vertex in N that is complete to K2, a contradiction. âŠČ We can check in linear time whether K2,
,Kt are all indeed bipartite.

Colouring đ‘Ș.

Let K=K1 for brevity and I=P∖V⁹(K). Note that G⁹[I] consists only of isolated vertices and bipartite connected components. We branch on all partial 3-colourings ψ that only colour every vertex of C. There are constantly many branches, as there are only constantly many such partial 3-colourings. We propagate the colours through K by executing Algorithm 1 on (K,ψ). If an error occurred, then there is no 3-colouring of G that is an extension of ψ by Lemma 4 (ii), and we backtrack. So we may assume that no error occurred, and for simplicity we denote the returned extension of ψ by ψ again.

We explicitly only propagated the colours through K. We now partition of V⁹(K). Let

  • ■

    Kci be the set of vertices of K with colour i for i∈[3],

  • ■

    Kc=⋃i∈[3]Kci,

  • ■

    Kui be the set of uncoloured vertices of K with a neighbour of colour i for i∈[3],

  • ■

    Ku=⋃i∈[3]Kui, and

  • ■

    Kr=V⁹(K)∖(KcâˆȘKu) consist of the remaining vertices of K.

Note that G⁹[Kc] is connected, because C is connected, and we assign colours to uncoloured vertices only with the Propagation Rule in Algorithm 1. Also note that the vertices of Kui have only neighbours of colour i∈[3] since they are uncoloured.

Our ultimate goal is to apply Lemma 5. So far we are not in a position to apply it, since there may be vertices (for example in Kr) that do not have a coloured neighbour. In the remaining proof, we distinguish two cases, depending on the length of C.

Case 1: đ‘Ș has length 5.

We show that all vertices already have a coloured neighbour.

Figure 2: Proof of Claim 12. Dashed lines indicate non-existing edges.
Claim 12.

Every vertex of Vⁱ(G)∖Kc has a neighbour in Kc.

Proof.

Assume, for a contradiction, that u∈V⁹(G)∖Kc has no neighbour in Kc. Consider a shortest u-C-path Q in G+F. Let v be the vertex of Q that has a neighbour in C. Note that v is not complete to C; otherwise, we would have concluded that G is not 3-colourable. If v is in Kc itself, then Q has length at least 3, and there would be an induced P5 in G+F with vertices in V⁹(Q)âˆȘV⁹(C); see Figure 2 left. Hence, v is not in Kc. Then v has at most two neighbours in C, and Q has length at least 2, and there would be an induced P5 in G+F with vertices in V⁹(Q)âˆȘV⁹(C), a contradiction; see Figure 2 right. âŠČ

Claim 12 implies that Lemma 5 is applicable in this case. Therefore, deciding if there is a 3-colouring of G that is an extension of ψ is possible in polynomial time. If there is no such 3-colouring of G, then we backtrack.

Case 2: đ‘Ș has length 3.

First, note that for every vertex v∈Kc, we have that v has two neighbours with two distinct colours in [3]∖{Ïˆâą(v)}, since C is a clique and we assign colours to uncoloured vertices only through the Propagation Rule in Algorithm 1. We now give a more precise partition of N; see Figure 3. Let M=NG⁹(I) and L=N∖M. Let

  • ■

    Mc and Lc be the set of vertices of M and L, respectively, that have two neighbours in Kc with two distinct colours,

  • ■

    Mui and Lui be the set of vertices of M∖Mc and L∖Lc, respectively, with a neighbour in Kci for i∈[3],

  • ■

    Mu=⋃i∈[3]Mui, Lu=⋃i∈[3]Lui,

  • ■

    Mr=M∖(McâˆȘMu), and Lr=L∖(LcâˆȘLu).

Let J be the set of vertices of I with no neighbour in Mc. Note that no vertex of Kr, Lr, Mr, and J has a coloured neighbour. We now show how in the end we can apply Lemma 5.

Figure 3: An illustration of the partition of K, L, and M. Note that P=V⁹(K)âˆȘI and N=MâˆȘL. Dashed lines indicate some of the non-existing edges.

Handling đ‘Č𝒓 and 𝑳𝒓.

Since L⊆N is independent in G and G is connected, every vertex of L has a neighbour in K. If, in G, a vertex v∈Lr has only neighbours in Kui for one i∈[3], then a 3-colouring of G−v that extends ψ can be extended to a 3-colouring of G by assigning colour i to v. We remove any such v from G and continue. Now, every vertex of Lr has neighbours in Kui for at least two distinct i∈[3], or has a neighbour in Kr. We prove two claims, one for each of the two described types of vertices in Lr.

Figure 4: Left: Proof of Claim 13. Right: Proof of Claim 14. Dashed lines indicate non-existing edges.
Claim 13.

For i,j∈[3] with i≠j, if u∈Lr has a neighbour in Kui, and v∈Lr has a neighbour in Kuj, then u and v have the same neighbours in KuiâˆȘKuj.

Proof.

Assume, for a contradiction, that x∈Kui is a neighbour of u, but not a neighbour of v. Let w∈Kuj be a neighbour of v. Consider a shortest x-w-path Q in G with internal vertices in Kc. As Q⁹v is not an induced P5 in G+F, we must have x⁹w∈E⁹(G). Let y be the neighbour of x in Q, and let z be a neighbour of y that is adjacent to neither x nor w. Note that z exists since every vertex of Kc has two neighbours of two distinct colours. Now, v⁹w⁹x⁹y⁹z is an induced P5 in G+F, a contradiction; see Figure 4 left. âŠČ

Let Lrâ€Č be the set of vertices of Lr with a neighbour in Kr.

Claim 14.

A single vertex of K dominates the vertices of KrâˆȘLrâ€Č.

Proof.

If Kr=∅, then Lrâ€Č=∅ and the statement is trivial. Hence, Kr≠∅. As K is a connected P5-free graph, K contains a connected dominating set D that induces a P3-free graph or a C5 [19]. As we are in Case 2, D cannot be a C5. Hence, D is a clique.

If |D|≄4, then G contains a clique of order at least 4, which we already excluded. If |D|=3, then K contains a C3 that dominates K. By the choice of C and the fact that we are in Case 2, C dominates K. Hence, our application of the Propagation Rule ensures that Kr=∅, a contradiction. If |D|=1 and the vertex of D is in C, then we arrive at a contradiction as before. If |D|=1 and the vertex of D is not in C, then this vertex and C form a clique of order at least 4, which we already excluded. It remains that |D|=2. In other words, K contains a dominating edge u⁹v.

We must have that NK⁹(u) and NK⁹(v) are disjoint; otherwise, there would be a dominating triangle in K, which we can exclude as before. Without loss of generality, let NG⁹(u) contain at least two vertices of C. This implies u∈Kc. As there is no edge between Kc and Kr by definition of Kr, v dominates Kr.

It remains to show that v is complete to Lrâ€Č. Suppose y∈Lrâ€Č∖NG⁹(v) exists. Let x∈Kr be a neighbour of y. As u neighbours two vertices of C and u∈Kc, vertex u is in a cycle Câ€Č of length 3, which is contained in Kc (possibly C=Câ€Č). Let z∈V⁹(Câ€Č)∖{u}. As NK⁹(u) and NK⁹(v) are disjoint, v is not adjacent to z. Also, z is not adjacent to x as x∈Kr and z∈Kc, and y is not adjacent to u, as y∈Lr and u∈Kc. As z⁹u⁹v⁹x⁹y is not an induced P5 in G+F, we obtain v⁹y∈E⁹(G), a contradiction; see Figure 4 right. Hence, v dominates Lrâ€Č. âŠČ

Claim 13 and Claim 14 together imply that:

Claim 15.

KrâˆȘLr is dominated by a set D of at most two vertices of K.

Handling 𝑮𝒓 and đ‘±.

We now describe the structure of the edges between K and M=NG⁹(I).

Figure 5: Left: Proof of Claim 16 (i). Right: Proof of Claim 16 (ii).
Claim 16.

(i) Every vertex of Mr has no neighbour in K, and (ii) For every i∈[3], Mui is complete to Kci.

Proof.

We first prove (i). Suppose, for the sake of contradiction, that there exists a vertex v∈Mr that has a neighbour in K. Since v∈Mr⊆M, v has a neighbour u∈I. By definition of Mr, v has no neighbour in Kc. Let Q be a shortest v-C-path in G with internal vertices in K. The path Q must contain a vertex of Kui for some i∈[3] by assumption and therefore has length at least 2. Then there is an induced P5 in G+F with vertices in {u}âˆȘV⁹(Q)âˆȘV⁹(C), a contradiction; see Figure 5 left.

We continue with (ii). For some i∈[3], let v∈Mui such that v is not complete to Kci. Since v∈M, v has a neighbour u∈I. Since v∈Mui, v has a neighbour in Kci. Let x∈Kci be a non-neighbour of v. Let w∈Kci be a neighbour of v that is closest to x in G⁹[Kc]. Let Q be a shortest w-x-path in G⁹[Kc], which exists since G⁹[Kc] is connected. As w,x∈Kci, they are not adjacent. Thus, Q has length at least 2, and u⁹v⁹Q contains an induced P5 in G+F, a contradiction; see Figure 5 right. Hence, for every i∈[3], Mui is complete to Kci. âŠČ

We continue with two claims describing the structure of the edges between I and McâˆȘMu.

Figure 6: Left: Proof of Claim 17. Right: Proof of Claim 18. Dashed lines indicate non-existing edges.
Claim 17.

Every vertex of I has a neighbour in McâˆȘMu.

Proof.

Assume, for a contradiction, that the vertex u∈I only has neighbours in Mr. Since every vertex of Mr has no neighbours in K by Claim 16 (i), a shortest u-C-path Q in G+F has length at least 3. This implies that there is an induced P5 in G+F with vertices in V⁹(Q)âˆȘV⁹(C), a contradiction; see Figure 6 left. The claim follows. âŠČ

Claim 18.

If u∈Mr, then every vertex of NG⁹(u) has the same neighbours in McâˆȘMu.

Proof.

Note that NG⁹(u)⊆I by Claim 16 (i) and since Mr⊆N is independent. Let v,w∈NG⁹(u). Assume, for a contradiction, that the vertex x∈McâˆȘMu is a neighbour of v, but not a neighbour of w. By considering a shortest u-C-path in G+F containing the vertices v and x, we see that u⁹x∈F. Let z∈Kc be a vertex that is not adjacent to x in G, which exists, or G would not be 3-colourable. Therefore, w⁹u⁹x together with a shortest x-z-path with internal vertices in Kc contains an induced P5 in G+F, a contradiction; see Figure 6 right. As v,w∈NG⁹(u) were arbitrary, the proof is complete. âŠČ

Claim 19 is an important consequence of Claims 17 and 18.

Claim 19.

If there is 3-colouring ψâ€Č of G−Mr that is an extension of ψ, then there is a 3-colouring of G that is an extension of ψâ€Č.

Proof.

Assume, for a contradiction, that for a vertex u∈Mr, there exist vertices vi∈NG⁹(u) with ψâ€Č⁹(vi)=i for every i∈[3]. Note that v1,v2,v3∈I by Claim 16 (i). By Claim 17 and Claim 18, there exists a vertex w∈McâˆȘMu that is adjacent to v1, v2, and v3, a contradiction to the fact that ψâ€Č is a 3-colouring of G−Mr. Therefore, for every vertex u∈Mr, there is a colour i∈[3] such that no neighbour of u in G has colour i under ψâ€Č. At this point, choosing any such colour for every vertex of Mr gives a 3-colouring of G that is an extension of ψâ€Č. âŠČ Claim 19 implies that it suffices to decide if there is a 3-colouring G−Mr that is an extension of ψ. Hence, from now on, assume that Mr=∅. Recall that J is the set of vertices of I with no neighbour in Mc. Consequently, by Claim 17, every vertex of J has a neighbour in Mu. Claim 9 implies that every vertex of McâˆȘMu is either complete or anticomplete to each connected component of G⁹[I]. It follows that, if u∈J, then J contains all vertices of the connected component of u in G⁹[I]. We prove one more claim about the structure of the edges between Mu and J.

Figure 7: Proof of Claim 20. Dashed lines indicate non-existing edges.
Claim 20.

If Mui is nonempty for at least two i∈[3], then the bipartite subgraph of G spanned by the edges of G with one end in Mu and the other end in J is complete.

Proof.

Let Kâ€Č be an arbitrary connected component of G⁹[J]. Keep in mind that Kâ€Č is a connected component of G⁹[I] too. Let i,j∈[3] with i≠j be such that Mui is nonempty, and Kâ€Č has a neighbour v in Muj. Note that such i and j exist by assumption and Claim 17, and v is complete to Kâ€Č by Claim 9. We prove that Mui is complete to Kâ€Č.

Assume, for a contradiction, that w∈Mui has no neighbour in Kâ€Č. Let u be an arbitrary neighbour of v in Kâ€Č. Consider a shortest v-w-path Q with internal vertices in Kc, which exists since G⁹[Kc] is connected. As i≠j, the path Q has length at least 3, and, by Claim 16 (ii), the path Q has length exactly 3. Since u⁹Q is not an induced P5 in G+F, we have v⁹w∈F. Let x be the neighbour of w in Q, let k∈[3]∖{i,j}, and let y be a neighbour of x in Kc with colour k. Note that y exists since every vertex of Kc has two neighbours in Kc with two distinct colours. Now u⁹v⁹w⁹x⁹y is an induced P5 in G+F, a contradiction; see Figure 7. So w has a neighbour in Kâ€Č. Claim 9 implies that w is complete to Kâ€Č. Since w∈Mui was chosen arbitrarily, this proves that Mui is complete to Kâ€Č.

A similar argument shows that for k∈[3]∖{i,j}, if Muk is nonempty, then Muk is complete to Kâ€Č too. By interchanging the roles of i and j, we see that Muj is complete to Kâ€Č. Since Kâ€Č was chosen arbitrarily, and since every such connected component of G⁹[J] has a neighbour in Mu by Claim 17, this completes the proof. âŠČ

Colouring 𝑼.

At this point, we are in a position to decide if there is a 3-colouring of G that is an extension of ψ. First, Claim 15 implies that KrâˆȘLr is dominated by a set D of at most two vertices of K. We branch on the (constantly many) consistent extensions of ψ into 3-colourings that additionally colour every vertex of D, which we call ψ again for simplicity.

Observe that every vertex of KrâˆȘLr has a coloured neighbour now. As Mr=∅, we now only need to achieve the same for J in order to apply Lemma 5. If J=∅, then Lemma 5 is directly applicable. Therefore, we decide in polynomial time if there is a 3-colouring of G that is an extension of ψ. If there is no such 3-colouring, then we backtrack.

We now assume that J≠∅. Since vertices in J are not adjacent to Mc by definition and Mr=∅, Mu≠∅. If Mui is nonempty for at least two i∈[3], then we choose a vertex v∈Mu. We branch on the extensions ψâ€Č of ψ that additionally colour v. Observe that now every vertex of I has a coloured neighbour under ψâ€Č by the definition of J and Claim 20. Now, Lemma 5 is applicable. Therefore, we decide in polynomial time if there is a 3-colouring of G that is an extension of ψâ€Č. If there is no such 3-colouring, then we backtrack.

It remains the case that there is exactly one i∈[3] such that Mui is nonempty. Every vertex in J has neighbours only in JâˆȘMui. In particular, for each connected component Kâ€Č of G⁹[J], which is a connected component of G⁹[I], the colour i may be used without creating conflicts outside of Kâ€Č. Recall that Kâ€Č is bipartite by Claim 11. Hence, we wish to extend ψ by, for each connected component Kâ€Č of G⁹[J], colouring one of its partite set by colour i. However, we cannot immediately decide which partite set, and make a small detour.

Let Kâ€Č be a connected component of G⁹[J] that contains an edge. Let u be a neighbour of Kâ€Č in Mui. Since u∈Mui, it is adjacent to K, and thus neither complete nor anticomplete to K. Hence, u is complete to Kâ€Č by Claim 9. Thus, NG⁹(Kâ€Č) is complete to Kâ€Č. Therefore, all vertices of NG⁹(Kâ€Č) must receive the same colour in any 3-colouring of G that extends ψ. We ensure this first, for each such connected component Kâ€Č, and then extend the colouring to J.

We apply the formula ℱ of Lemma 5 to G−J, adapted as follows. For every connected component Kâ€Č in G⁹[J] that contains an edge, and for every two distinct vertices u,v∈NG⁹(Kâ€Č), we add the clauses (xÂŻuk√xvk)∧(xuk√xÂŻvk) to ℱ for every k∈[3]∖{i}. These clauses ensure that two such vertices u and v receive the same colour. (Alternatively we could identify these vertices. At this point it does not matter that this does not preserve probe P5-freeness.) After that, we resolve the satisfiability of the 2-SAT formula ℱ in polynomial time [3]. If ℱ is not satisfiable, then there is no 3-colouring of G that is an extension of ψ, and we backtrack. Otherwise, let ψâ€Č be a 3-colouring of G−J obtained from a satisfying assignment of ℱ. We can extend ψâ€Č to a 3-colouring of G by assigning colour i to isolated vertices in G⁹[J], and by assigning the remaining two colours to the nontrivial bipartite connected components of G⁹[J], which is possible due to the extra clauses we added to ℱ. This completes the proof of Theorem 8. ◀

5 The Proof of the NP-Completeness Part of Theorem 3

Theorem 3 states that for t≄1, 3-Colouring on partitioned probe Pt-free graphs is polynomial-time solvable if t≀5 and 𝖭𝖯-complete if t≄6. In Section 4 we showed the polynomial part of Theorem 3. We now show the 𝖭𝖯-completeness part by reducing from 1-Precolouring Extension, which has as input: an integer k≄3, a graph G with at least k vertices, and a partial k-colouring ψ of G that assigns k vertices v1,
,vk colours 1,
,k, respectively. Can ψ be extended to a k-colouring of G? Bodlaender et al. [7] proved that this problem is 𝖭𝖯-complete, even if k=3, G is bipartite and the precoloured vertices all belong to the same partition set of G. Cai [18] used this result to prove that 3-Colouring is 𝖭𝖯-complete for graphs that become bipartite by deleting three edges. We use the gadget of [18] to show the following, which implies the 𝖭𝖯-completeness part of Theorem 3.

Theorem 21.

3-Colouring is 𝖭𝖯-complete on partitioned probe (P6,3ⁱP2,2ⁱP3)-free graphs.

Proof.

We reduce an instance (3,G,ψ,{v1,v2,v3}) of 1-Precolouring Extension, where G is a bipartite graph with bipartition A and B, and the precoloured vertices v1,v2,v3 belong to A without loss of generality, to an instance of 3-Colouring. As mentioned, this variant of 1-Precolouring Extension is still 𝖭𝖯-complete [7]. The bipartition of G can be computed in polynomial time. Let Gâ€Č be the graph from [18], which is obtained in polynomial-time from G by turning {v1,v2,v3} into a clique. The graph Gâ€Č is probe (P6,2⁹P3,3⁹P2)-free, which is witnessed by the fact that the graph obtained from Gâ€Č by turning the independent set B into a clique is (P6,2⁹P3,3⁹P2)-free. It is easy to see that (3,G,ψ,{v1,v2,v3}) is a yes-instance of 1-Precolouring Extension if and only if (Gâ€Č,A,B) is a yes-instance of 3-Colouring. This proves that 3-Colouring is 𝖭𝖯-hard on partitioned probe (P6,2⁹P3,3⁹P2)-free graphs. ◀

6 Additional Results and Concluding Remarks

In our paper, we considered the probe graph model introduced by Zhang et al. [64]. Our aim was to research to what extent polynomial-time results for H-free graphs can be extended to probe H-free graphs. We first gave a dichotomy for Colouring restricted to (partitioned) probe H-free graphs and then showed our main result, which states that the known polynomial-time result for 3-Colouring for P5-free graphs (whose yes-instances all have bounded mim-width) can be extended to partitioned probe P5-free graphs (whose yes-instances even have unbounded sim-width). We also proved that this result cannot be generalized to partitioned probe P6-free graphs unless 𝖯=𝖭𝖯 by showing 𝖭𝖯-completeness even for partitioned (P6,3⁹P2,2⁹P3)-free graphs. As 3-Colouring is polynomial-time solvable even for P7-free graphs [9] and s⁹P2-free graphs for all s≄1 [32], our results give a clear indication of the difference in computational complexity if not all edges of the input graph are known, under the probe graph model. They also lead to a range of natural directions for future work, as we discuss below.

First, the dichotomy for 3-Colouring for partitioned probe H-free graphs has not been fully settled. We are able to prove the following additional result (proof omitted):

Theorem 22.

For every s≄0, 3-Colouring is polynomial-time solvable on partitioned probe (P3+s⁹P1)-free graphs.

Theorem 3, Theorems 21–22 and the result that 3-Colouring is 𝖭𝖯-complete on H-free graphs if H is not a linear forest [37, 50] leave only the following open cases:

Problem 23.

Determine the complexity of 3-Colouring on partitioned probe H-free graphs when H is 2⁹P2+s⁹P1 (s≄1), P3+P2+s⁹P1 (s≄0), P4+s⁹P1 (s≄1), P4+P2+s⁹P1 (s≄0), or P5+s⁹P1 (s≄1).

Second, since k-Colouring is polynomial on P5-free graphs [49] even for all k≄3, we ask:

Problem 24.

For k≄4, determine the complexity of k-Colouring on partitioned probe P5-free graphs.

Crucial properties in our proof for 3-Colouring on partitioned probe P5-free graphs, such as the fact that there is a single non-bipartite connected component and that no vertex is complete to the cycle C we pick in it, no longer hold if k≄4. We do note that probe (Ks,P5)-free graphs have bounded mim-width for every s≄1, due to (Ks,P5)-free graphs having bounded mim-width for every k≄1 [14] and Proposition 1. Hence, as we may assume that an input graph for 4-Colouring is K5-free, a good starting point is to consider 4-Colouring for K5-free partitioned probe P5-free graphs, or even for K5-free partitioned probe 2⁹P2-free graphs.

We recall that for solving 3-Colouring on probe P5-free graphs, we only need the partition into P and N. To solve Problem 24, it would also be interesting to research if the problem becomes easier under the assumption that we also know the set of edges F.

As another starting point for solving Problem 24, we can show the following result (proof omitted):

Theorem 25.

For every s≄0 and k≄1, k-Colouring is polynomial-time solvable on (not necessarily partitioned) probe (P2+s⁹P1)-free graphs.

We note that for k=3, Theorem 25 does not need the partition V=PâˆȘN, whereas Theorem 22 does, so the two theorems are not comparable.

We could prove Theorem 25 by showing that for all s≄1, every probe (P2+s⁹P1)-free graphs is (s+1)⁹P2-free, and we ask:

Problem 26.

Are there other sets ℋ, for which there exists a finite set ℋâ€Č such that every probe ℋ-free graph is ℋâ€Č-free?

An inclusion as in Problem 26 is in general strict, e.g., probe P5-free graphs form a hereditary graph class that is not finitely defined. To explain this, as probe P5-free graphs are closed under vertex deletion, there is a unique minimal set of graphs ℱP5 such that a graph is probe P5-free if and only if it is ℱP5-free. We can show that {C7,C9,C11,
}⊊ℱP5 (proof omitted). So, in particular, probe P5-free graphs form a proper subclass of (C7,C9,C11,
)-free graphs, that is, graphs with no odd hole of length at least 7. This leads to the following natural question:

Problem 27.

Determine the complexity of 3-Colouring for (C7,C9,C11,
)-free graphs.

It is known that 3-Colouring is polynomial-time solvable for odd-hole free graphs, i.e., (C5,C7,C9,
)-free graphs (see [59]) and (K4,C7,C9,C11,
)-free graphs are χ-bounded [27].

Knowing more about ℱP5 would help solving the following open problem, which is solved for H=P4 in polynomial time [22] and which in turn might help solving 3-Colouring on probe P5-free graphs without a given partition (P,N) of their vertex set.

Problem 28.

Determine the complexity of recognizing probe P5-free graphs.

We also ask for which other graph classes 𝒱, are Colouring and k-Colouring polynomially solvable on the class of (partitioned) probe graphs 𝒱p? Recall from Section 1 that Colouring is polynomial-time solvable for probe chordal graphs (as these graphs are perfect) and that in 2012, Chandler et al. [21] conjectured the same for partitioned probe perfect graphs.

We finish with two other, broader directions for future work. First, we recall our result (Proposition 7) that C3-free probe P5-free graphs (and thus all probe (C3,P5)-free graphs) are 3-colourable, which generalizes the same result for (C3,P5)-free graphs [63]. There is a long history for obtaining constant (tight) bounds on the chromatic number of (H1,H2)-free graphs; see also the recent survey [24]. In particular, for all r,t≄1, every (Kr,Pt)-free graph can be coloured with at most (t−2)r−2 colours [44], improving an older result in [47]. It is also known e.g. that every (C3,s⁹P2)-free graph is (2⁹s−2)-colourable for all s≄3 [11], and that every (C3,2⁹P3)-free graph [61], every (C3,P2+P4)-free graph [16] and every (K4,2⁹P2)-free graph [40] is 4-colourable. In particular, subclasses of P5-free graphs are well studied; see [23, 34, 35] for several of such results. To what extent can all these results be extended to the probe version? Proposition 7 illustrates there exist graph classes with a positive answer.

Second, our results indicate that the reason for polynomial-time solvability of 3-Colouring for P5-free graphs goes beyond boundedness of mim-width. The question, which may also be asked for other problems, is if we can push further in this direction. So far, we assumed that the set of non-probes N is an independent set. This is an extreme case in a more general model in which we assume that we do know some of the edges in G⁹[N].

Problem 29.

Determine if 3-Colouring is polynomially solvable on graphs (G,P,N) that can be made P5-free by adding new edges to G⁹[N], which may have some initial edges.

If we allow an arbitrary initial set of edges in Gⁱ[N], then the problem is already 𝖭𝖯-complete on graphs that can be made 2ⁱP1-free: take the graph G=(V,E) used in any 𝖭𝖯-hardness reduction for 3-Colouring; set N:=V; and let F be the set of all edges that are not already in G (so G+F is complete, that is, G+F is 2ⁱP1-free).

References

  • [1] Tara Abrishami, Maria Chudnovsky, Marcin Pilipczuk, Pawel Rzazewski, and Paul D. Seymour. Induced subgraphs of bounded treewidth and the container method. SIAM J. Comput., 53(3):624–647, 2024. doi:10.1137/20M1383732.
  • [2] Akanksha Agrawal, Paloma T. Lima, Daniel Lokshtanov, PaweƂ RzÄ…ĆŒewski, Saket Saurabh, and Roohani Sharma. Odd cycle transversal on P5-free graphs in polynomial time. ACM Transactions on Algorithms, 21:16:1–14, 2025. doi:10.1145/3708544.
  • [3] Bengt Aspvall, Michael F. Plass, and Robert E. Tarjan. A linear-time algorithm for testing the truth of certain quantified boolean formulas. Information Processing Letters, 8(3):121–123, 1979. doi:10.1016/0020-0190(79)90002-4.
  • [4] Daniel Bayer, Van Bang Le, and H. N. de Ridder. Probe threshold and probe trivially perfect graphs. Theor. Comput. Sci., 410(47-49):4812–4822, 2009. doi:10.1016/J.TCS.2009.06.029.
  • [5] Anne Berry, Martin Charles Golumbic, and Marina Lipshteyn. Recognizing chordal probe graphs and cycle-bicolorable graphs. SIAM J. Discret. Math., 21(3):573–591, 2007. doi:10.1137/050637091.
  • [6] Alexandre BlanchĂ©, Konrad K. Dabrowski, Matthew Johnson, and DaniĂ«l Paulusma. Hereditary graph classes: When the complexities of coloring and clique cover coincide. J. Graph Theory, 91(3):267–289, 2019. doi:10.1002/JGT.22431.
  • [7] Hans L. Bodlaender, Klaus Jansen, and Gerhard J. Woeginger. Scheduling with incompatible jobs. Discret. Appl. Math., 55(3):219–232, 1994. doi:10.1016/0166-218X(94)90009-4.
  • [8] Marthe Bonamy, Konrad K. Dabrowski, Carl Feghali, Matthew Johnson, and DaniĂ«l Paulusma. Independent Feedback Vertex Set for P5-free graphs. Algorithmica, 81(4):1342–1369, 2019. doi:10.1007/S00453-018-0474-X.
  • [9] Flavia Bonomo, Maria Chudnovsky, Peter Maceli, Oliver Schaudt, Maya Stein, and Mingxian Zhong. Three-coloring and list three-coloring of graphs without induced paths on seven vertices. Comb., 38(4):779–801, 2018. doi:10.1007/S00493-017-3553-8.
  • [10] Flavia Bonomo-Braberman, Nick Brettell, Andrea Munaro, and DaniĂ«l Paulusma. Solving problems on generalized convex graphs via mim-width. J. Comput. Syst. Sci., 140:103493, 2024. doi:10.1016/J.JCSS.2023.103493.
  • [11] Stephan Brandt. Triangle-free graphs and forbidden subgraphs. Discret. Appl. Math., 120(1-3):25–33, 2002. doi:10.1016/S0166-218X(01)00277-3.
  • [12] Johann Brault-Baron, Florent Capelli, and Stefan Mengel. Understanding model counting for beta-acyclic CNF-formulas. In Ernst W. Mayr and Nicolas Ollinger, editors, 32nd International Symposium on Theoretical Aspects of Computer Science, STACS 2015, March 4-7, 2015, Garching, Germany, volume 30 of LIPIcs, pages 143–156. Schloss Dagstuhl – Leibniz-Zentrum fĂŒr Informatik, 2015. doi:10.4230/LIPIcs.STACS.2015.143.
  • [13] Nick Brettell, Jake Horsfield, Andrea Munaro, Giacomo Paesani, and DaniĂ«l Paulusma. Bounding the mim-width of hereditary graph classes. J. Graph Theory, 99(1):117–151, 2022. doi:10.1002/JGT.22730.
  • [14] Nick Brettell, Jake Horsfield, Andrea Munaro, and DaniĂ«l Paulusma. List k-Colouring Pt-free graphs: A mim-width perspective. Inf. Process. Lett., 173:106168, 2022. doi:10.1016/J.IPL.2021.106168.
  • [15] Nick Brettell, Jelle J. Oostveen, Sukanya Pandey, DaniĂ«l Paulusma, Johannes Rauch, and Erik Jan van Leeuwen. Computing subset vertex covers in H-free graphs. Theor. Comput. Sci., 1032:115088, 2025. doi:10.1016/J.TCS.2025.115088.
  • [16] Hajo Broersma, Petr A. Golovach, DaniĂ«l Paulusma, and Jian Song. Updating the complexity status of coloring graphs without a fixed induced linear forest. Theor. Comput. Sci., 414(1):9–19, 2012. doi:10.1016/J.TCS.2011.10.005.
  • [17] Binh-Minh Bui-Xuan, Jan Arne Telle, and Martin Vatshelle. Fast dynamic programming for locally checkable vertex subset and vertex partitioning problems. Theor. Comput. Sci., 511:66–76, 2013. doi:10.1016/J.TCS.2013.01.009.
  • [18] Leizhen Cai. Parameterized complexity of vertex colouring. Discret. Appl. Math., 127(3):415–429, 2003. doi:10.1016/S0166-218X(02)00242-1.
  • [19] Eglantine Camby and Oliver Schaudt. A new characterization of Pk-free graphs. Algorithmica, 75(1):205–217, 2016. doi:10.1007/S00453-015-9989-6.
  • [20] David B. Chandler, Maw-Shang Chang, Ton Kloks, Jiping Liu, and Sheng-Lung Peng. On probe permutation graphs. Discret. Appl. Math., 157(12):2611–2619, 2009. doi:10.1016/J.DAM.2008.08.017.
  • [21] David B. Chandler, Maw-Shang Chang, Ton Kloks, Jiping Liu, and Sheng-Lung Peng. Probe graph classes, 2012. Unpublished. URL: https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=a0f280169bb1c7ec80fcfd142bf7982448ed4e3b.
  • [22] Maw-Shang Chang, Ton Kloks, Dieter Kratsch, Jiping Liu, and Sheng-Lung Peng. On the recognition of probe graphs of some self-complementary classes of perfect graphs. In Lusheng Wang, editor, Computing and Combinatorics, 11th Annual International Conference, COCOON 2005, Kunming, China, August 16-29, 2005, Proceedings, volume 3595 of Lecture Notes in Computer Science, pages 808–817. Springer, 2005. doi:10.1007/11533719_82.
  • [23] Arnab Char and T. Karthick. Improved bounds on the chromatic number of (P5,flag)-free graphs. Discret. Math., 346(9):113501, 2023. doi:10.1016/J.DISC.2023.113501.
  • [24] Arnab Char and T. Karthick. χ-boundedness and related problems on graphs without long induced paths: A survey. Discret. Appl. Math., 364:99–119, 2025. doi:10.1016/J.DAM.2024.12.014.
  • [25] Maria Chudnovsky, Sepehr Hajebi, and Sophie Spirkl. List-k-coloring H-free graphs for all k≄4. Comb., 44(5):1063–1068, 2024. doi:10.1007/S00493-024-00106-2.
  • [26] Maria Chudnovsky, Shenwei Huang, Sophie Spirkl, and Mingxian Zhong. List 3-coloring graphs with no induced P6+r⁹P3. Algorithmica, 83(1):216–251, 2021. doi:10.1007/S00453-020-00754-Y.
  • [27] Maria Chudnovsky, Alex Scott, Paul D. Seymour, and Sophie Spirkl. Induced subgraphs of graphs with large chromatic number. VIII. long odd holes. J. Comb. Theory, Ser. B, 140:84–97, 2020. doi:10.1016/J.JCTB.2019.05.001.
  • [28] Maria Chudnovsky, Sophie Spirkl, and Mingxian Zhong. Four-coloring P6-free graphs. I. extending an excellent precoloring. SIAM J. Comput., 53(1):111–145, 2024. doi:10.1137/18M1234837.
  • [29] Maria Chudnovsky, Sophie Spirkl, and Mingxian Zhong. Four-coloring P6-free graphs. II. finding an excellent precoloring. SIAM J. Comput., 53(1):146–187, 2024. doi:10.1137/18M1234849.
  • [30] Bruno Courcelle and Stephan Olariu. Upper bounds to the clique width of graphs. Discret. Appl. Math., 101(1-3):77–114, 2000. doi:10.1016/S0166-218X(99)00184-5.
  • [31] Konrad K. Dabrowski, Tala Eagling-Vose, Matthew Johnson, Giacomo Paesani, and DaniĂ«l Paulusma. Finding d-cuts in probe H-free graphs. Proc. FCT 2025, Lecture Notes in Computer Science, to appear, 2025.
  • [32] Konrad K. Dabrowski, Vadim V. Lozin, Rajiv Raman, and Bernard Ries. Colouring vertices of triangle-free graphs without forests. Discret. Math., 312(7):1372–1385, 2012. doi:10.1016/J.DISC.2011.12.012.
  • [33] Konrad K. Dabrowski and DaniĂ«l Paulusma. Clique-width of graph classes defined by two forbidden induced subgraphs. Comput. J., 59(5):650–666, 2016. doi:10.1093/COMJNL/BXV096.
  • [34] Wei Dong, Baogang Xu, and Yian Xu. On the chromatic number of some P5-free graphs. Discret. Math., 345(10):113004, 2022. doi:10.1016/J.DISC.2022.113004.
  • [35] Wei Dong, Baogang Xu, and Yian Xu. A tight linear bound to the chromatic number of (P5,K1+K3)-free graphs. Graphs Comb., 39(3):43, 2023. doi:10.1007/S00373-023-02642-Y.
  • [36] Keith Edwards. The complexity of colouring problems on dense graphs. Theor. Comput. Sci., 43:337–343, 1986. doi:10.1016/0304-3975(86)90184-2.
  • [37] Thomas Emden-Weinert, Stefan Hougardy, and Bernd Kreuter. Uniquely colourable graphs and the hardness of colouring graphs of large girth. Comb. Probab. Comput., 7(4):375–386, 1998. URL: http://journals.cambridge.org/action/displayAbstract?aid=46667.
  • [38] Carl Feghali. A note on matching-cut in Pt-free graphs. Inf. Process. Lett., 179:106294, 2023. doi:10.1016/J.IPL.2022.106294.
  • [39] M. R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979.
  • [40] Serge Gaspers and Shenwei Huang. (2⁹P2,K4)-free graphs are 4-colorable. SIAM J. Discret. Math., 33(2):1095–1120, 2019. doi:10.1137/18M1205832.
  • [41] Petr A. Golovach, Matthew Johnson, DaniĂ«l Paulusma, and Jian Song. A survey on the computational complexity of coloring graphs with forbidden subgraphs. J. Graph Theory, 84(4):331–363, 2017. doi:10.1002/JGT.22028.
  • [42] Martin Charles Golumbic and Marina Lipshteyn. Chordal probe graphs. Discret. Appl. Math., 143(1-3):221–237, 2004. doi:10.1016/J.DAM.2003.12.009.
  • [43] Martin Charles Golumbic, FrĂ©dĂ©ric Maffray, and GrĂ©gory Morel. A characterization of chain probe graphs. Ann. Oper. Res., 188(1):175–183, 2011. doi:10.1007/S10479-009-0584-6.
  • [44] Sylvain Gravier, ChĂ­nh T. HoĂ ng, and FrĂ©dĂ©ric Maffray. Coloring the hypergraph of maximal cliques of a graph with no long path. Discret. Math., 272(2-3):285–290, 2003. doi:10.1016/S0012-365X(03)00197-3.
  • [45] Martin Grötschel, LĂĄszlĂł LovĂĄsz, and Alexander Schrijver. The ellipsoid method and its consequences in combinatorial optimization. Comb., 1(2):169–197, 1981. doi:10.1007/BF02579273.
  • [46] Martin Grötschel, LĂĄszlĂł LovĂĄsz, and Alexander Schrijver. Corrigendum to our paper "the ellipsoid method and its consequences in combinatorial optimization". Comb., 4(4):291–295, 1984. doi:10.1007/BF02579139.
  • [47] AndrĂĄs GyĂĄrfĂĄs. Problems from the world surrounding perfect graphs. Zastosowania Matematyki Applicationes Mathematicae, XIX:413–441, 1987.
  • [48] Sepehr Hajebi, Yanjia Li, and Sophie Spirkl. Complexity dichotomy for List-5-Coloring with a forbidden induced subgraph. SIAM J. Discret. Math., 36(3):2004–2027, 2022. doi:10.1137/21M1443352.
  • [49] ChĂ­nh T. HoĂ ng, Marcin KamiƄski, Vadim V. Lozin, Joe Sawada, and Xiao Shu. Deciding k-Colorability of P5-free graphs in polynomial time. Algorithmica, 57(1):74–81, 2010. doi:10.1007/S00453-008-9197-8.
  • [50] Ian Holyer. The NP-completeness of Edge-Coloring. SIAM J. Comput., 10(4):718–720, 1981. doi:10.1137/0210055.
  • [51] Shenwei Huang. Improved complexity results on k-coloring Pt-free graphs. Eur. J. Comb., 51:336–346, 2016. doi:10.1016/J.EJC.2015.06.005.
  • [52] Justyna Jaworska, BartƂomiej Kielak, TomĂĄĆĄ Masaƙík, and Jana MasaƙíkovĂĄ. Constricting the computational complexity gap of the 4-Coloring problem in (Pt,C3)-free graphs. CoRR, abs/2509.02423, 2025. doi:10.48550/arXiv.2509.02423.
  • [53] Tereza KlimosovĂĄ, Josef MalĂ­k, TomĂĄs MasarĂ­k, Jana NovotnĂĄ, DaniĂ«l Paulusma, and Veronika SlĂ­vovĂĄ. Colouring (Pr+Ps)-free graphs. Algorithmica, 82(7):1833–1858, 2020. doi:10.1007/S00453-020-00675-W.
  • [54] Daniel KrĂĄl, Jan KratochvĂ­l, Zsolt Tuza, and Gerhard J. Woeginger. Complexity of coloring graphs without forbidden induced subgraphs. In Andreas BrandstĂ€dt and Van Bang Le, editors, Graph-Theoretic Concepts in Computer Science, 27th International Workshop, WG 2001, Boltenhagen, Germany, June 14-16, 2001, Proceedings, volume 2204 of Lecture Notes in Computer Science, pages 254–262. Springer, 2001. doi:10.1007/3-540-45477-2_23.
  • [55] Van Bang Le and Sheng-Lung Peng. Characterizing and recognizing probe block graphs. Theor. Comput. Sci., 568:97–102, 2015. doi:10.1016/J.TCS.2014.12.014.
  • [56] Daniel Leven and Zvi Galil. NP completeness of finding the chromatic index of regular graphs. J. Algorithms, 4(1):35–44, 1983. doi:10.1016/0196-6774(83)90032-9.
  • [57] Daniel Lokshtanov, PaweƂ RzÄ…ĆŒewski, Saket Saurabh, Roohani Sharma, and Meirav Zehavi. Maximum partial list H-coloring on P5-free graphs in polynomial time. CoRR, abs/2410.21569, 2024. doi:10.48550/arXiv.2410.21569.
  • [58] Daniel Lokshtanov, Martin Vatshelle, and Yngve Villanger. Independent set in P5-free graphs in polynomial time. In Chandra Chekuri, editor, Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014, Portland, Oregon, USA, January 5-7, 2014, pages 570–581. SIAM, 2014. doi:10.1137/1.9781611973402.43.
  • [59] Pascal Ochem. URL: https://www.graphclasses.org/classes/refs1700.html#ref_1744.
  • [60] Marcin Pilipczuk, Michal Pilipczuk, and PaweƂ RzÄ…ĆŒewski. Quasi-polynomial-time algorithm for independent set in Pt-free graphs via shrinking the space of induced paths. In Hung Viet Le and Valerie King, editors, 4th Symposium on Simplicity in Algorithms, SOSA 2021, Virtual Conference, January 11-12, 2021, pages 204–209. SIAM, 2021. doi:10.1137/1.9781611976496.23.
  • [61] Artem V. Pyatkin. Triangle-free 2⁹P3-free graphs are 4-colorable. Discret. Math., 313(5):715–720, 2013. doi:10.1016/J.DISC.2012.10.019.
  • [62] Bert Randerath, Ingo Schiermeyer, and Meike Tewes. Three-colourability and forbidden subgraphs. II: Polynomial algorithms. Discret. Math., 251(1-3):137–153, 2002. doi:10.1016/S0012-365X(01)00335-1.
  • [63] Gerhard J. Woeginger and JirĂ­ Sgall. The complexity of coloring graphs without long induced paths. Acta Cybern., 15(1):107–117, 2001. URL: https://cyber.bibl.u-szeged.hu/index.php/actcybern/article/view/3566.
  • [64] Peisen Zhang, Eric A. Schon, Stuart G. Fischer, Eftihia Cayanis, Janie Weiss, Susan Kistler, and Philip E. Bourne. An algorithm based on graph theory for the assembly of contigs in physical mapping of DNA. Comput. Appl. Biosci., 10(3):309–317, 1994. doi:10.1093/BIOINFORMATICS/10.3.309.