# Redicolouring digraphs: directed treewidth and cycle-degeneracy

Nicolas Nisse, Lucas Picasarri-Arrieta, Ignasi Sau

► To cite this version:

Nicolas Nisse, Lucas Picasarri-Arrieta, Ignasi Sau. Redicolouring digraphs: directed treewidth and cycle-degeneracy. Discrete Applied Mathematics, 2024, 356, pp.191-208. 10.1016/j.dam.2024.05.042. hal-04271445

HAL Id: hal-04271445

https://hal.science/hal-04271445v1

Submitted on 6 Nov 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Redicolouring digraphs: directed treewidth and cycle-degeneracy*

Nicolas Nisse¹, Lucas Picasarri-Arrieta¹, and Ignasi Sau²

¹ Université Côte d'Azur, CNRS, Inria, I3S, Sophia-Antipolis, France

²LIRMM, Université de Montpellier, CNRS, France

{nicolas.nisse, lucas.picasarri-arrieta}@inria.fr
ignasi.sau@lirmm.fr

## Abstract

Given a digraph $D = (V, A)$ on $n$ vertices and a vertex $v \in V$, the cycle-degree of $v$ is the minimum size of a set $S \subseteq V(D) \setminus \{v\}$ intersecting every directed cycle of $D$ containing $v$. From this definition of cycle-degree, we define the *c-degeneracy* (or *cycle-degeneracy*) of $D$, which we denote by $\delta_c^*(D)$. It appears to be a nice generalisation of the undirected degeneracy. For instance, the dichromatic number $\bar{\chi}(D)$ of $D$ is bounded above by $\delta_c^*(D) + 1$, where $\bar{\chi}(D)$ is the minimum integer $k$ such that $D$ admits a *k*-dicolouring, i.e., a partition of its vertices into $k$ acyclic subdigraphs.

In this work, using this new definition of cycle-degeneracy, we extend several evidences for Cereceda's conjecture [12] to digraphs. The *k*-dicolouring graph of $D$, denoted by $\mathcal{D}_k(D)$, is the undirected graph whose vertices are the *k*-dicolourings of $D$ and in which two *k*-dicolourings are adjacent if they differ on the colour of exactly one vertex. This is a generalisation of the *k*-colouring graph of an undirected graph $G$, in which the vertices are the proper *k*-colourings of $G$.

We show that $\mathcal{D}_k(D)$ has diameter at most $O_{\delta_c^*(D)}(n^{\delta_c^*(D)+1})$ (respectively $O(n^2)$ and $(\delta_c^*(D)+1)$) when $k$ is at least $\delta_c^*(D)+2$ (respectively $\frac{3}{2}(\delta_c^*(D)+1)$ and $2(\delta_c^*(D)+1)$). This improves known results on digraph redicolouring (Bousquet et al. [9]). Next, we extend a result due to Feghali [18] to digraphs, showing that $\mathcal{D}_{d+1}(D)$ has diameter at most $O_{d,\epsilon}(n(\log n)^{d-1})$ when $D$ has maximum average cycle-degree at most $d-\epsilon$.

We then show that two proofs of Bonamy and Bousquet [6] for undirected graphs can be extended to digraphs. The first one uses the digrundy number of a digraph $\bar{\chi}_g(D)$, which is the worst number of colours used in a greedy dicolouring. If $k \ge \bar{\chi}_g(D)+1$, we show that $\mathcal{D}_k(D)$ has diameter at most $4 \cdot \bar{\chi}(D) \cdot n$. The second one uses the *P*-width of a digraph, denoted by $\mathcal{P}w(D)$, which is a generalisation of the treewidth to digraphs. If $k \ge \mathcal{P}w(D)+2$, we show that $\mathcal{D}_k(D)$ has diameter at most $2(n^2+n)$.

Finally, we give a general theorem which makes a connection between the recolourability of a digraph $D$ and the recolourability of its underlying graph $UG(D)$. Assume that $\mathcal{G}$ is a class of undirected graphs, closed under edge-deletion and with bounded chromatic number, and let $k \ge \chi(\mathcal{G})$ (i.e., $k \ge \chi(G)$ for every $G \in \mathcal{G}$) be such that, for every $n$-vertex graph $G \in \mathcal{G}$, the diameter of the *k*-colouring graph of $G$ is bounded by $f(n)$ for some function $f$. We show that, for every $n$-vertex digraph $D$ such that $UG(D) \in \mathcal{G}$, the diameter of $\mathcal{D}_k(D)$ is bounded by $2f(n)$. For instance, this result directly extends a number of results on planar graph recolouring to planar digraph redicolouring.

# 1 Introduction to graph recolouring

Given an undirected graph $G = (V, E)$ and a positive integer $k$, a *k*-colouring of $G$ is a function $\alpha: V \to [k]$. It is proper if, for every edge $xy \in E$, we have $\alpha(x) \neq \alpha(y)$. So, for every $i \in [k]$, $\alpha^{-1}(i)$ induces an

<footnote>*Research supported by research grant DIGRAPHS ANR-19-CE48-0013 and by the French government, through the EUR DS4H Investments in the Future project managed by the National Research Agency (ANR) with the reference number ANR-17-EURE-0004.</footnote>
independent set on $G$. The chromatic number of $G$, denoted by $\chi(G)$, is the smallest $k$ such that $G$ admits a proper $k$-colouring.

For any $k \ge \chi(G)$, the $k$-colouring graph of $G$, denoted by $C_k(G)$, is the graph whose vertices are the proper $k$-colourings of $G$ and in which two $k$-colourings are adjacent if they differ on the colour of exactly one vertex. A path between two given colourings in $C_k(G)$ corresponds to a sequence of recolourings, that is, a sequence of pairs composed of a vertex of $G$, which is going to receive a new colour, and a new colour for this vertex. If $C_k(G)$ is connected, we say that $G$ is $k$-mixing. In the last fifteen years, since the papers of Bonsma, Cereceda, van den Heuvel and Johnson [8, 13, 14], graph recolouring has been studied by many researchers in graph theory. We refer the reader to the PhD thesis of Bartier [3] for a complete overview on graph recolouring and to the surveys of van Heuvel [20] and Nishimura [24] for reconfiguration problems in general.

A famous open conjecture on graph recolouring is due to Cereceda [12] and makes a connection between the degeneracy of a graph and the diameter of $C_k(G)$. The degeneracy of a graph $G$, denoted by $\delta^*(G)$, is the largest minimum degree of any subgraph of $G$. Bonsma and Cereceda [8] and Dyer et al. [17] independently proved the following.

**Theorem 1** (Bonsma and Cereceda [8] ; Dyer et al. [17]). Let $k \in \mathbb{N}$ and $G$ be a graph. If $k \ge \delta^*(G) + 2$, then $G$ is $k$-mixing.

The diameter of $G$, denoted by $\text{diam}(G)$, is the length of a longest shortest path of $G$. The original proof of Theorem 1 also implies that $C_k$ has diameter at most $2^n$, where $n = |V(G)|$. Cereceda's conjecture states that the diameter of $C_k$ is actually quadratic in $n$.

**Conjecture 2** (Cereceda [12]). Let $k \in \mathbb{N}$ and $G$ be a graph. If $k \ge \delta^*(G) + 2$, then $\text{diam}(C_k(G)) = O(n^2)$.

In the remainder of this section, we recall several results approaching this conjecture, which can be seen as evidences for the general conjecture. The following are the best existing bounds approaching Conjecture 2 in the general case<fnref n="1" />.

**Theorem 3** (Bousquet and Heinrich [10]). Let $k \in \mathbb{N}$ and $G$ be a graph. Then $C_k(G)$ has diameter at most:

(i) $O(n^2)$ if $k \ge \frac{3}{2}(\delta^*(G) + 1)$,

(ii) $O_\epsilon(n^{\lceil \frac{1}{\epsilon} \rceil})$ if $k \ge (1 + \epsilon)(\delta^*(G) + 1)$, and

(iii) $O_d(n^{d+1})$ if $k \ge \delta^*(G) + 2$.

Bousquet and Perarnau [11] also proved the following.

**Theorem 4** (Bousquet and Perarnau [11]). Let $k \in \mathbb{N}$ and $G$ be a graph. If $k \ge 2\delta^*(G)+2$, then $\text{diam}(C_k(G)) \le (\delta^*(G) + 1)n$.

In order to obtain possibly simpler versions of Conjecture 2, one can restrict to graphs with bounded maximum average degree. The maximum average degree of a graph $G$ is $\text{mad}(G) = \max\{\frac{2|E(H)|}{|V(H)|} \mid H \text{ subgraph of } G\}$. It is easy to see that every graph $G$ satisfies $|\text{mad}(G)| \ge \delta^*(G)$. Hence Conjecture 2 would imply that every graph $G$ with $\text{mad}(G) \le d - \epsilon$, where $d \in \mathbb{N}$ and $\epsilon > 0$, satisfies $\text{diam}(C_k(G)) = O(n^2)$ for every $k \ge d + 1$. Feghali showed the following analogue result.

**Theorem 5** (Feghali [18]). Let $d, k$ be integers such that $k \ge d + 1$. For every $\epsilon > 0$ and every graph $G$ with $n$ vertices and maximum average degree at most $d - \epsilon$, $\text{diam}(C_k(G)) = O_{d,\epsilon}(n(\log n)^{d-1})$.

<footnote n="1">¹Given two computable functions $f, g$ and a parameter $\Gamma$, $f(n) = O_\Gamma(g(n))$ means that there exists a computable function $h$ such that $f(n) = O(h(\Gamma) \cdot g(n))$. Also $\Gamma$ can be a list of parameters $\Gamma_1, \dots, \Gamma_r$ in which case $f(n) = O_\Gamma(g(n))$ means that $f(n) = O(h(\Gamma_1, \dots, \Gamma_r) \cdot g(n))$.</footnote>
Another approach toward Conjecture 2 consists of considering the maximum degree of a graph instead of its degeneracy. Cereceda has shown (see [12, Proposition 5.23]) that, for every graph $G$ on $n$ vertices and integer $k \ge \Delta(G) + 2$, $C_k(G)$ has diameter at most $(\Delta(G) + 1)n$, where $\Delta(G)$ denotes the maximum degree of $G$. In order to get a more precise bound, Bonamy and Bousquet considered the grundy number. Let $G$ be a graph and $O = (x_1, \dots, x_n)$ be an ordering of $V(G)$. The greedy colouring $\alpha_g(O, G)$ is the proper colouring in which every vertex $x_i$ receives the smallest colour that does not appear in $N(x_i) \cap \{x_1, \dots, x_{i-1}\}$. The grundy number of $G$, denoted by $\chi_g(G)$, is the maximum, over all orderings $O$, of the number of colours used in $\alpha_g(O, G)$.

**Theorem 6 (Bonamy and Bousquet [6]).** For any graph $G$ on $n$ vertices, if $k \ge \chi_g(G) + 1$, then $G$ is $k$-mixing and $\text{diam}(C_k(G)) \le 4 \cdot \chi(G) \cdot n$.

A last result approaching Conjecture 2 is due to Bonamy and Bousquet, and makes a connection between the treewidth of a graph and its recolourability. A tree-decomposition of a graph $G = (V, E)$ is a pair $(T, \mathcal{X})$ where $T = (I, F)$ is a tree, and $\mathcal{X} = (B_i)_{i \in I}$ is a family of subsets of $V(G)$, called *bags* and indexed by the vertices of $T$, such that:

1. each vertex $v \in V$ appears in at least one bag, i.e. $\bigcup_{i \in I} B_i = V$,

2. for each edge $e = xy \in E$, there is an $i \in I$ such that $x, y \in B_i$, and

3. for each $v \in V$, the set of nodes indexed by $\{i \mid i \in I, v \in B_i\}$ forms a subtree of $T$.

The width of a tree decomposition is defined as $\max_{i \in I}\{|B_i| - 1\}$. The treewidth of $G$, denoted by $\text{tw}(G)$, is the minimum width of a tree-decomposition of $G$. It is easy to see that, for any graph $G$, $\text{tw}(G) \ge \delta^*(G)$. Hence the following result is a weaker version of Conjecture 2.

**Theorem 7 (Bonamy and Bousquet [6]).** Let $k \in \mathbb{N}$ and $G$ be an $n$-vertex graph. If $k \ge \text{tw}(G) + 2$, then $\text{diam}(C_k(G)) \le 2(n^2 + n)$.

Bonamy et al. [7] have shown that the bound of Theorem 7 is asymptotically sharp (up to a constant factor).

**Organization of the paper.** In this work, we extend every result mentioned above to digraphs and dicolourings. A $k$-dicolouring of a digraph $D$ is a partition of its vertices into at most $k$ acyclic subdigraphs. Every graph can be seen as a digraph in which every edge is actually two arcs, between the same vertices, in opposite directions. By extending a result, we mean showing that the result is actually true for every digraph and not only for symmetric digraphs. Note that a $k$-dicolouring of a symmetric digraph is indeed a proper $k$-colouring of its underlying graph. More precisely, in Section 2, we present the notations and the definitions used throughout the paper. In particular, we introduce the notion of cycle-degeneracy of a digraph which appears to be useful to play in directed graphs the role that the degeneracy plays in graphs. Then, we formally state our results, which are summarized in Table 1.

<table><caption>Table 1: Bounds on the diameter of the $k$-dicolouring graph $D_k(D)$ where $D$ is a digraph on $n$ vertices, with cycle-degeneracy $d$, maximum average cycle-degree $\text{mad}_c$, $\epsilon = [\text{mad}_c] - \text{mad}_c$, grundy number $\vec{\chi}_g$, dichromatic number $\vec{\chi}$ and $\mathcal{D}$-width $\mathcal{D}w$. The notions above respectively extend the ones of $k$-colouring graph, degeneracy, maximum average degree, grundy number, chromatic number and treewidth to digraphs.</caption><thead><tr><th>k &ge;</th><th>d + 2</th><th>3/2(d + 1)</th><th>2(d + 1)</th><th>[mad<sub>c</sub>] + 1</th><th>x&#773;<sub>g</sub> + 1</th><th>&#8474;w + 2</th></tr></thead><tbody><tr><td>diam(D<sub>k</sub>(D))</td><td>O<sub>d</sub>(n<sup>d+1</sup>)</td><td>O(n<sup>2</sup>)</td><td>&le; (d + 1)n</td><td>O<sub>mad<sub>c</sub>,&epsilon;</sub>(n(log n)<sup>[mad<sub>c</sub>]</sup>)</td><td>&le; 4 &middot; x&#773; &middot; n</td><td>O(n<sup>2</sup>)</td></tr><tr><td>Theorem</td><td>12</td><td>11(ii)</td><td>11(iii)</td><td>13</td><td>15</td><td>22</td></tr></tbody></table>
Section 3 is devoted to the proof of Theorem 11, which extends Theorem 1, item (i) of Theorem 3 and Theorem 4 in the case of digraphs when the degeneracy is replaced by the cycle-degeneracy. In Section 4, we prove Theorems 12 and 13, which extend to digraphs item (iii) of Theorem 3 and Theorem 5 respectively. In Section 5 we prove Theorem 15, which generalises Theorem 6 to digraphs. In Section 6, we prove Theorem 17 which establishes a relationship between the diameter of the *k*-dicolouring graph of a digraph *D* and the diameter of the *k*-colouring graph of its underlying graph *UG(*D*), when *D* belongs to a number of digraph classes (e.g., including planar digraphs). Finally, in Section 7 we prove Theorem 22 which extends Theorem 7 to digraphs replacing the treewidth by the *D*-width. We conclude in Section 8 by discussing the consequences of our results, especially on planar digraph redicolouring, and detail a few related open questions.

## 2 Digraph redicolouring and main results

We refer the reader to [2] for notation and terminology not explicitly defined in this paper. Let $D = (V, A)$ be a digraph. A *digon* is a pair of arcs in opposite directions between the same vertices. A *simple arc* is an arc which is not in a digon. An *oriented graph* is a digraph with no digon. The *bidirected graph* associated with a graph *G*, denoted by $\overleftrightarrow{G}$, is the digraph obtained from *G* by replacing every edge by a digon. The *underlying graph* of *D*, denoted by UG(*D*), is the undirected graph *G* with vertex set *V*(*D*) in which *uv* is an edge if and only if *uv* or *vu* is an arc of *D*. Let *v* be a vertex of a digraph *D*. The *out-degree* (resp. *in-degree*) of *v*, denoted by $d^+(v)$ (resp. $d^-(v)$), is the number of arcs leaving (resp. entering) *v*. We define the *maximum degree* of *v* as $d_{\max}(v) = \max\{d^+(v), d^-(v)\}$, and the *minimum degree* of *v* as $d_{\min}(v) = \min\{d^+(v), d^-(v)\}$. We also introduce the notion of cycle-degree. The *cycle-degree* of *v*, denoted by $d_c(v)$, is the minimum size of a set $S \subseteq (V \setminus \{v\})$ such that *S* intersects every directed cycle of *D* containing *v*.

For each parameter $\Gamma \in \{\max, \min, c\}$ we define the corresponding *maximum degree* of $D$ as $\Delta_{\Gamma}(D) = \max_{v \in V(D)}(d_{\Gamma}(v))$. Analogously, we define the corresponding *minimum degree* of $D$ as $\delta_{\Gamma}(D) = \min_{v \in V(D)}(d_{\Gamma}(v))$. Finally, we define the $\Gamma$-degeneracy of $D$, denoted by $\delta_{\Gamma}^{*}(D)$, as $\max_{H \subseteq D}(\delta_{\Gamma}(H))$, where $H \subseteq D$ denotes that $H$ is a (not necessarily induced) subdigraph of $D$. An equivalent characterisation of the degeneracy is the following. For each parameter $\Gamma$, $\delta_{\Gamma}^{*}(D) \le k$ if and only if there exists an ordering $v_1, \dots, v_n$ of $V(D)$ such that, for each $i \in [n]$, then $d_{\Gamma}(v_i) \le k$ in $D[\{v_i, \dots, v_n\}]$.

Observe that we have $d_c(v) \le d_{\min}(v) \le d_{\max}(v)$. The first inequality holds because each of the sets $N^+(v)$ and $N^-(v)$ intersects every directed cycle of $D$ containing $v$, and the second inequality holds by definition. This implies $\Delta_c(D) \le \Delta_{\min}(D) \le \Delta_{\max}(D)$ and $\delta_c^*(D) \le \delta_{\min}^*(D) \le \delta_{\max}^*(D)$. Moreover, if $N^+(v) = N^-(v)$ (meaning that $v$ is not incident to a simple arc) then we have $d_c(v) = d_{\min}(v) = d_{\max}(v)$. Hence, if $D$ is a bidirected graph $\overleftrightarrow{G}$, for each parameter $\Gamma \in \{c, \min, \max\}$, we have $\Delta(G) = \Delta_{\Gamma}(\overleftrightarrow{G})$ and $\delta^*(G) = \delta_{\Gamma}^*(\overleftrightarrow{G})$. As we will show later, the notion of *c*-degeneracy appears to be a natural generalisation of the undirected degeneracy when dealing with the directed treewidth. To the best of the authors' knowledge, this extension of the classical degeneracy has not been considered before.

In 1982, Neumann-Lara [23] introduced the notions of dicolouring and dichromatic number, which generalize the ones of proper colouring and chromatic number. For a positive integer $k$, a *k-colouring* of $D = (V, A)$ is a function $\alpha: V \to [k]$. It is a *k-dicolouring* if $\alpha^{-1}(i)$ induces an acyclic subdigraph in $D$ for each $i \in [k]$. The *dichromatic number* of $D$, denoted by $\tilde{\chi}(D)$, is the smallest $k$ such that $D$ admits a *k*-dicolouring. There is a one-to-one correspondence between the proper *k*-colourings of a graph $G$ and the *k*-dicolourings of its associated bidirected graph $\overleftrightarrow{G}$, and in particular $\chi(G) = \tilde{\chi}(\overleftrightarrow{G})$. Hence every result on graph proper colourings can be seen as a result on dicolourings of bidirected graphs, and it is natural to study whether the result can be extended to all digraphs.

Let us show that $\tilde{\chi}(D) \le \delta_c^*(D) + 1$. By definition of *c*-degeneracy, we can find an ordering $v_1, \dots, v_n$ of $V(D)$ such that, for every $i \in [n]$, there exists $S_i \subseteq \{v_{i+1}, \dots, v_n\}$ of size at most $\delta_c^*(D)$, and such that $S_i \cup \{v_1, \dots, v_{i-1}\}$ intersects every directed cycle of $D$ containing $v_i$. Hence, considering the vertices from $v_n$ to $v_1$, one can greedily find a $(\delta_c^*(D)+1)$-dicolouring of $D$ by colouring each $v_i$ with a colour that has not been chosen in $S_i$. Indeed, suppose for contradiction that, for some $i \in [\delta_c^*(D)+1]$, the subdigraph of $D$ induced by
the set of vertices assigned colour $i$ contains a directed cycle $C$. Let $v_j$ be the leftmost vertex in $C$ according to the considered ordering. Then, by definition of $c$-degeneracy we have that $(V(C) \setminus \{v_j\}) \cap S_j \neq \emptyset$, but this contradicts the fact that, by construction of the colouring, the colour of $v_j$ is different from all the colours of the vertices in $S_j$.

The notion of digraph redicolouring was first introduced by Bousquet et al. in [9]. For any $k \ge \vec{\chi}(D)$, the $k$-dicolouring graph of $D$, denoted by $\mathcal{D}_k(D)$, is the graph whose vertices are the $k$-dicolourings of $D$ and in which two $k$-dicolourings are adjacent if they differ by the colour of exactly one vertex. Observe that $C_k(G) = \mathcal{D}_k(\vec{G})$ for any graph $G$. A redicolouring sequence between two dicolourings is a path between these dicolourings in $\mathcal{D}_k(D)$. The digraph $D$ is $k$-mixing if $\mathcal{D}_k(D)$ is connected. In [9], the authors mainly study the $k$-dicolouring graph of digraphs with bounded min-degeneracy or bounded maximum average degree, and they show that finding a redicolouring sequence between two given $k$-dicolouring of a digraph is PSPACE-complete. Dealing with the min-degeneracy of digraphs, they extended Theorems 1, 3(i) and 4:

**Theorem 8** (Bousquet et al. [9]). Let $k \in \mathbb{N}$ and $D$ be a digraph on $n$ vertices. Then:

(i) if $k \ge \delta_{\min}^*(D) + 2$ then $D$ is $k$-mixing,

(ii) if $k \ge \frac{3}{2}(\delta_{\min}^*(D) + 1)$ then $\text{diam}(\mathcal{D}_k(D)) = O(n^2)$, and

(iii) if $k \ge 2(\delta_{\min}^*(D) + 1)$ then $\text{diam}(\mathcal{D}_k(D)) \le (\delta_{\min}^*(D) + 1)n$.

They also proposed a stronger version of Conjecture 2 for digraphs:

**Conjecture 9** (Bousquet et al. [9]). Let $k \in \mathbb{N}$ and $D$ be a digraph. If $k \ge \delta_{\min}^*(D) + 2$, then $\text{diam}(\mathcal{D}_k(D)) = O(n^2)$.

Digraph redicolouring was also investigated in [25], where the author deals with the maximum degrees of a digraph instead of its degeneracies. In particular, he shows the following extension of a result of Feghali et al. [19] to digraphs.

**Theorem 10** (Picasarri-Arrieta [25]). Let $D = (V, A)$ be a connected digraph with $\Delta_{\max}(D) = \Delta \ge 3$, $k \ge \Delta + 1$, and $\alpha, \beta$ be two $k$-dicolourings of $D$. Then one of the following holds:

* $\alpha$ or $\beta$ is an isolated vertex in $\mathcal{D}_k(D)$, or

* there is a redicolouring sequence of length at most $O(\Delta^2|V|^2)$ between $\alpha$ and $\beta$.

In Section 3, we show that each of the proofs of the statements of Theorem 8 can be adapted to show the following stronger result.

**Theorem 11.** Let $k \in \mathbb{N}$ and $D$ be a digraph on $n$ vertices. Then:

(i) if $k \ge \delta_c^*(D) + 2$ then $D$ is $k$-mixing,

(ii) if $k \ge \frac{3}{2}(\delta_c^*(D) + 1)$ then $\text{diam}(\mathcal{D}_k(D)) = O(n^2)$, and

(iii) if $k \ge 2(\delta_c^*(D) + 1)$ then $\text{diam}(\mathcal{D}_k(D)) \le (\delta_c^*(D) + 1)n$.

The maximum average degree of $D$ is $\text{mad}(D) = \max\{\frac{2|A(H)|}{|V(H)|} \mid H \text{ subdigraph of } D\}$. The average cycle-degree of a digraph $D = (V, A)$ is $\text{ad}_c(D) = \frac{1}{|V|} \sum_{v \in V} d_c(v)$. The maximum average cycle-degree of $D$ is $\text{mad}_c(D) = \max\{\text{ad}_c(H) \mid H \text{ subdigraph of } D\}$. For every undirected graph $G$, we have $\text{mad}_c(\vec{G}) = \text{mad}(G)$.

In Section 4, we prove, based on the proofs of [18], the following two extensions of Theorem 3(iii) and Theorem 5, respectively.

**Theorem 12.** Let $D$ be a digraph and $k \ge \delta_c^*(D) + 2 = d + 2$. Then $\text{diam}(\mathcal{D}_k(D)) = O_d(n^{d+1})$.
**Theorem 13.** Let $d \ge 1$ and $k \ge d+1$ be two integers, and let $\epsilon > 0$. If $D$ is a digraph satisfying $\mathrm{mad}_c(D) \le d - \epsilon$, then $\mathrm{diam}(\mathcal{D}_k(D)) = O_{d,\epsilon}(n(\log n)^{d-1})$.

Observe that every digraph $D$ satisfies $\mathrm{mad}_c(D) \le \frac{1}{2}\mathrm{mad}(D)$. This holds because, for every vertex $v \in V(D)$, $d_c(v) \le \frac{1}{2}(d^+(v) + d^-(v))$. Hence, for every subdigraph $H$ of $D$, we have:

$$2|A(H)| = \sum_{v \in V(H)} (d^+(v) + d^-(v)) \ge 2 \sum_{v \in V(H)} d_c(v) = 2 \cdot \mathrm{ad}_c(H) \cdot |V(H)|.$$

Hence, the following is a direct consequence of Theorem 13.

**Corollary 14.** Let $d \ge 1, k \ge \lfloor \frac{d+3}{2} \rfloor$ be two integers, and let $\epsilon > 0$. If $D$ is a digraph satisfying $\mathrm{mad}(D) \le d - \epsilon$, then $\mathcal{D}_k(D)$ has diameter at most:

(i) $O_d(n(\log n)^{\frac{d-1}{2}})$ if $d$ is odd, and

(ii) $O_{d,\epsilon}(n(\log n)^{\frac{d-2}{2}})$ otherwise.

The *digrundy number* of a digraph $D = (V, A)$, introduced in [1], is the natural analogue of the grundy number for digraphs. If $\phi$ is a dicolouring of $D$, then $\phi$ is a *greedy dicolouring* if there is an ordering $v_1, \dots, v_n$ of $V$ such that, for each vertex $v_i$ and each colour $c$ smaller than $\phi(v_i)$, the set of vertices ($\{v_1, \dots, v_{i-1}\} \cap \phi^{-1}(c)\} \cup \{v_i\}$ contains a directed cycle. The *digrundy number* of $D$, denoted by $\vec{\chi}_g(D)$, corresponds to the maximum number of colours used in a greedy dicolouring of $D$. The following result generalises Theorem 6.

**Theorem 15.** For any digraph $D$, if $k \ge \vec{\chi}_g(D) + 1$, then $\mathrm{diam}(\mathcal{D}_k(D)) \le 4 \cdot \vec{\chi}_g(D) \cdot n$.

Analogously to the undirected case, we always have $\vec{\chi}_g(D) \le \vec{\chi}_g(D) \le \Delta_c(D) + 1$. Thus, the following is a direct consequence of Theorem 15. Note also that this is an improvement of the case $k \ge \Delta_{\max}(D) + 2$ of Theorem 10.

**Corollary 16.** For any digraph $D$, if $k \ge \Delta_c(D) + 2$, then $\mathrm{diam}(\mathcal{D}_k(D)) \le 4 \cdot \vec{\chi}_g(D) \cdot n$.

In Section 6 we show the following general result which makes a connection between the recolourability of a digraph and the recolourability of its underlying graph.

**Theorem 17.** Let $\mathcal{G}$ be a family of undirected graphs, closed under edge-deletion and with bounded chromatic number, and let $k \ge \chi(\mathcal{G})$ (i.e. $k \ge \chi(\mathcal{G})$ for every $G \in \mathcal{G}$) be such that, for every $n$-vertex graph $G \in \mathcal{G}$, the diameter of $\mathcal{C}_k(\mathcal{G})$ is bounded by $f(n)$ for some function $f$. Then for any $n$-vertex digraph $D$ such that $\mathrm{UG}(D) \in \mathcal{G}$, the diameter of $\mathcal{D}_k(D)$ is bounded by $2f(n)$.

In particular, since removing edges does not increase the treewidth of a graph, the following is a consequence of Theorems 7 and 17 (by taking $\mathcal{G} = \{G \mid \mathrm{tw}(G) \le \ell\}$ for some constant $\ell$).

**Corollary 18.** Let $k \in \mathbb{N}$ and $D$ be a digraph. If $k \ge \mathrm{tw}(\mathrm{UG}(D)) + 2$, then $\mathrm{diam}(\mathcal{D}_k(D)) = O(n^2)$.

However, the treewidth of the underlying graph of $D$ is not a satisfying extension of treewidth to digraphs, since it does not take under consideration the orientations in $D$. There exist, at least, four well known generalisations of treewidth to digraphs: the directed treewidth (introduced in [22], see also [26]), the $\mathcal{D}$-width (introduced in [27], see also [28]), the DAG-width (introduced in [5]) and the Kelly-width (introduced in [21]).

An *out-arborescence* is a rooted tree in which every edge is oriented away from the root. A *directed tree-decomposition* $(T, W, \mathcal{X})$ of a digraph $D = (V, A)$ consists of an *out-arborescence* $T = (I, F)$ rooted in $r \in I$, a partition $W = (W_t)_{t \in I}$ of $V$ into non-empty parts, and a family $\mathcal{X} = (X_e)_{e \in F}$ of subsets of vertices of $D$ such that, for every $tt' \in F$ we have:

$$1. X_{tt'} \cap (\bigcup_{t'' \in T_{t'}} W_{t''}) = \emptyset \quad (\text{where } T_{t'} \text{ denotes the subtree of } T \text{ rooted in } t'), \text{ and}$$
2. for every directed walk $P$ with both ends in $\bigcup_{t'' \in T_t'} W_{t''}$ and some internal vertex not in $\bigcup_{t'' \in T_t'} W_{t''}$, it holds that $V(P) \cap X_{tt'} \neq \emptyset$.

The width of $(T, \mathcal{W}, \mathcal{X})$ equals $\max_{t \in I} |H_t| - 1$, where $H_t = W_t \cup \bigcup_{e \in F, t \in e} X_e$, and the directed treewidth of $D$, denoted by $\mathrm{dtw}(D)$, is the minimum width of its directed tree-decompositions. Recall that the treewidth of an undirected graph is always at least its degeneracy. However it is well known that there exist digraphs with arbitrary large min-degeneracy and directed tree-width exactly one. We include a proof for completeness.

**Proposition 19 (Folklore).** For every integer $d$, there exists a digraph $D = (V, A)$ such that every vertex $v \in V$ satisfies $d^+(v) \ge d$, $d^-(v) \ge d$, and $\mathrm{dtw}(D) = 1$.

*Proof.* Let $T$ be a tree rooted in $r \in V(T)$ with depth at least $d$ (that is, all leaves are at distance at least $d$ from the root), such that every non-leaf vertex has at least $d$ children. We orient each edge $uv$ of $T$ from the parent to its child. Then we add every arc $uv$ such that $v$ is an ancestor of $u$. In the obtained digraph $D$, every vertex has out-degree at least $d$.

Then we add a disjoint copy $\tilde{D}$ of $D$ in which we reverse every arc, so in $\tilde{D}$ every vertex has in-degree at least $d$. We finally add every arc from $\tilde{D}$ to $D$.

In the resulting digraph, every vertex has out-degree and in-degree at least $d$. Moreover, the directed treewidth of a digraph is equal to the maximum directed treewidth of its strongly connected components. For each edge $uv$ of $T$, such that $u$ is the parent of $v$, we label $uv$ with $u$. Then $T$, together with this labelling, is a directed tree-decomposition of both $D$ and $\tilde{D}$ and has width 1. This follows from the fact that every directed cycle of $D$ containing a vertex must also contain its father in $T$. $\square$

The following proposition shows that, dealing with directed treewidth, c-degeneracy, compared to min-degeneracy, appears to be a better generalisation of the undirected one.

**Proposition 20.** For every digraph $D$, it holds that $\mathrm{dtw}(D) \ge \delta_c^*(D)$.

*Proof.* Consider an optimal directed tree-decomposition $(T, \mathcal{W}, \mathcal{X})$ of $D$. If $t$ is a leaf of $T$ and $v$ is a vertex in $W_t$, then $H_t \setminus \{v\}$ intersects every directed cycle of $D$ containing $v$. Thus, $d_c(v) \le \mathrm{dtw}(D)$. Moreover, since $t$ is a leaf of $T$, it is easy to verify that removing $v$ from $D$ does not increase its directed treewidth, and we can repeat the same argument in $D \setminus \{v\}$. $\square$

Proposition 20 implies that $\tilde{\chi}(D) \le \mathrm{dtw}(D) + 1$ for every digraph $D$ and, together with Theorems 11 and 12, implies the following.

**Corollary 21.** Let $k \in \mathbb{N}$ and $D$ be a digraph on $n$ vertices.

(i) if $k \ge \mathrm{dtw}(D) + 2$ then $D$ is $k$-mixing and $\mathrm{diam}(\mathcal{D}_k(D)) = O_{\mathrm{dtw}}(n^{\mathrm{dtw}+1})$,

(ii) if $k \ge \frac{3}{2}(\mathrm{dtw}(D) + 1)$ then $\mathrm{diam}(\mathcal{D}_k(D)) = O(n^2)$, and

(iii) if $k \ge 2(\mathrm{dtw}(D) + 1)$ then $\mathrm{diam}(\mathcal{D}_k(D)) \le (\mathrm{dtw}(D) + 1)n$.

The interested reader may have a look at [5] (respectively [21]) and see that DAG-width (respectively Kelly-width) is bounded below by min-degeneracy (respectively by min-degeneracy plus one). Thus, Corollary 21 also holds for DAG-width (respectively Kelly-width minus one).

Finally, in Section 7, we show that the proof of Theorem 7 extends to digraphs using $\mathcal{D}$-width. A $\mathcal{D}$-decomposition of a digraph $D = (V, A)$ is a pair $(T, \mathcal{X})$ such that $T = (I, F)$ is an undirected tree and $\mathcal{X} = (X_v)_{v \in I}$ is a family of subsets (called *bags*) of $V$ indexed by the nodes of $T$, which satisfies Property (*) stated below, for which we first need a definition. For a vertex subset $S \subseteq V$, let the *support* of $S$ in $(T, \mathcal{X})$, denoted by $T_S$, be the subgraph of $T$ with vertex-set $\{t \in I \mid X_t \cap S \neq \emptyset\}$ and edge-set $\{tt' \in F \mid \exists u \in S \cap X_t \cap X_{t'}\}$. A $\mathcal{D}$-decomposition must ensure the following property:

<footnote>(*) for every subset $S \subseteq V$, if $D[S]$ is strongly connected then $T_S$ is a non-empty subtree of $T$.</footnote>
Similarly to undirected tree-decompositions, the width of $(T, \mathcal{X})$ is the maximum size of its bags minus one, and the $\mathcal{D}$-width of $D$, denoted by $\mathcal{D}w(D)$, is the minimum width of its $\mathcal{D}$-decompositions. Note that, for every $v \in V$, $D[\{v\}]$ is strongly connected, and therefore Property (*) can be seen as a generalization of the basic properties of undirected tree-decompositions that state that the set of bags containing some vertex $v$ must induce a (connected) subtree and that every vertex must belong to at least one bag. Note also that, if $\{u, v\}$ is a digon of $D$, Property (*) implies that $u$ and $v$ must belong to a common bag of $(T, \mathcal{X})$. Hence, every bidirected graph $G$ satisfies $\mathrm{tw}(G) = \mathcal{D}w(\overrightarrow{G})$, and the following is actually a generalisation of Theorem 7. Our proof is strongly based on the proof of Theorem 7.

**Theorem 22.** If $D = (V, A)$ is an $n$-vertex digraph with $\mathcal{D}w(D) \le k-1$, then $\mathrm{diam}(\mathcal{D}_{k+1}(D)) \le 2(n^2+n)$.

Note that the bound of Theorem 22 is asymptotically sharp (up to a constant factor) since Theorem 7 is already known to be sharp. Finally, observe that the digraph $D$ built in the proof of Proposition 19 also satisfies $\mathcal{D}w(D) = 1$ but $\delta_{\min}^*(D) \ge d$. Again, the following easy proposition shows that, dealing with the $\mathcal{D}$-width, $c$-degeneracy, compared to min-degeneracy, appears to be a better generalisation of the undirected one.

**Proposition 23.** For every digraph $D$, it holds that $\mathcal{D}w(D) \ge \delta_c^*(D)$.

*Proof.* Consider an optimal directed $\mathcal{D}$-decomposition $(T, \mathcal{X} = (X_t)_{t \in V(T)})$ of $D$. Let $t$ be a leaf of $T$ and $v$ be a vertex in $X_t$ that belongs to no other bag $X_{t'}$ (this is possible unless $X_t \subseteq X_{t'}$, $tt' \in E(T)$, in which case we just remove the bag $t$ from the decomposition). We claim that $X_t \setminus \{v\}$ intersects every directed cycle of $D$ containing $v$ (which directly implies $d_c(v) \le \mathcal{D}w(D)$). Assume not, and let $C$ be a directed cycle such that $X_t \cap V(C) = \{v\}$. Then, since $D[V(C)]$ is strongly connected, $T_{V(C)}$ must be connected. This is a contradiction since $t$ is an isolated vertex in $T_{V(C)}$. $\square$

Analogously to the directed treewidth, Proposition 23, together with Theorems 11 and 12, implies the following (note that the two first items are also implied by Theorem 22, but the third one is not).

**Corollary 24.** Let $k \in \mathbb{N}$ and $D$ be a digraph on $n$ vertices.

(i) if $k \ge \mathcal{D}w(D) + 2$ then $D$ is $k$-mixing and $\mathrm{diam}(\mathcal{D}_k(D)) = O_{\mathcal{D}w}(n^{\mathcal{D}w+1})$,

(ii) if $k \ge \frac{3}{2}(\mathcal{D}w(D) + 1)$ then $\mathrm{diam}(\mathcal{D}_k(D)) = O(n^2)$, and

(iii) if $k \ge 2(\mathcal{D}w(D) + 1)$ then $\mathrm{diam}(\mathcal{D}_k(D)) \le (\mathcal{D}w(D) + 1)n$.

**3 Bounds on the diameter of $\mathcal{D}_k(D)$ when $k \ge \frac{3}{2}(\delta_c^*(D) + 1)$**

This section is devoted to the proof of Theorem 11, and we will prove each item of its statement independently. Let us restate it.

**Theorem 11.** Let $k \in \mathbb{N}$ and $D$ be a digraph on $n$ vertices. Then:

(i) if $k \ge \delta_c^*(D) + 2$ then $D$ is $k$-mixing,

(ii) if $k \ge \frac{3}{2}(\delta_c^*(D) + 1)$ then $\mathrm{diam}(\mathcal{D}_k(D)) = O(n^2)$, and

(iii) if $k \ge 2(\delta_c^*(D) + 1)$ then $\mathrm{diam}(\mathcal{D}_k(D)) \le (\delta_c^*(D) + 1)n$.

*Proof of Theorem 11(i).* The proof is by induction on $n = |V(D)|$. The result clearly holds for $n \le 1$. Let us assume that $n > 1$ and that the result holds for $n-1$. Let $\alpha, \beta$ be any two $k$-dicolourings of $D$ and let $v \in V$ be a vertex satisfying $d_c(v) \le \delta_c^*(D)$. Let $\alpha', \beta'$ be the two $k$-dicolourings induced, respectively, by $\alpha$ and $\beta$ on $D - \{v\}$. By induction, there exists a redicolouring sequence $\alpha' = \alpha'_1, \dots, \alpha'_q = \beta'$ where $\alpha'_i$ and $\alpha'_{i-1}$ differ by the colour of exactly one vertex $v_i \in V - \{v\}$, for every $1 < i \le q$.
Now, we build the following redicolouring sequence from $\alpha$ to $\beta$. At step $i$, if $v_i$ can be recoloured as from $\alpha'_{i-1}$ to $\alpha'_i$, then recolour $v_i$ accordingly. Otherwise, this implies that there exists a directed cycle containing $v$ and $v_i$ whose all vertices (but $v_i$) have colour $\alpha'_i(v_i)$. By definition of cycle-degree, there exists a transversal $X$ of the directed cycles containing $v$, with $|X| \le \delta_c^*(D)$ and $v \notin X$. Let $c \ne \alpha'_i(v_i)$ be a colour that does not appear in $X$ (it exists since $k \ge \delta_c^*(D) + 2$). Colour $v$ with $c$ and then $v_i$ with $\alpha'_i(v_i)$. Finally (after step $q$), recolour $v$ with its final colour $\beta(v)$. $\square$

A k-list assignment in an undirected graph $G$ is a function $L: V(D) \to 2^{[k]}$ on $V(D)$ such that $L(v) \subseteq [k]$ for each vertex $v \in V(D)$. An L-colouring of $G$ is a proper colouring $\alpha$ of $G$ such that $\alpha(v) \in L(v)$ for every vertex $v$. Given such a list assignment $L$, $C(G, L)$ is the graph whose vertices are the L-colourings of $G$ and in which two colourings are adjacent if they differ by the colour of exactly one vertex. An L-recolouring sequence is a path in $C(G, L)$. Also, we say that $L$ is a-feasible if, for some ordering $v_1, \dots, v_n$ of $V$, $|L(v_i)| \ge |N(v) \cap \{v_{i+1}, \dots, v_n\}| + 1 + a$ for every $i \in [n]$. Also we say that an L-colouring $c$ avoids a set of colours $S$ if for every vertex $v \in V(G)$, $c(v)$ does not belong to $S$. We need the following lemma from [9, Lemma 20], which was indirectly proved first in [10].

**Lemma 25 ([9, 10]).** Let $G = (V, E)$ be an undirected graph on $n$ vertices, $L$ be a k-list assignment of $G$ that is $\lceil \frac{k}{3} \rceil$-feasible and $\alpha$ an L-colouring of $G$ that avoids a set $S$ of $\lceil \frac{k}{3} \rceil$ colours. Then for any set of $\lceil \frac{k}{3} \rceil$ colours $S'$, there is an L-colouring $\beta$ of $G$ that avoids $S'$ and such that there is an L-recolouring sequence from $\alpha$ to $\beta$ of length at most $\frac{4k+12}{3}n$.

*Proof of Theorem 11(ii).* Let $D = (V, A)$ be a digraph on $n$ vertices and $k \ge \frac{3}{2}(\delta_c^*(D) + 1)$. Let $(v_1, \dots, v_n)$ be a cycle-degeneracy-ordering of $D$, that is, an ordering such that for each $i \in [n]$, there exists $X_i \subseteq \{v_{i+1}, \dots, v_n\}$, $|X_i| \le \delta_c^*(D)$, such that every directed cycle of $D$ containing $v_i$ must intersect $\{v_1, \dots, v_{i-1}\} \cup X_i$.

Let $G = (V, E)$ be the undirected graph where $E = \{v_i v_j \mid v_j \in X_i, i \in [n]\}$. We first prove that each proper colouring of $G$ is a dicolouring of $D$. Assume that this is not the case, and there exists a proper colouring $\alpha$ of $G$ such that $D$, coloured with $\alpha$, contains a monochromatic directed cycle $C$. Let $v_i$ be the least vertex of $C$ in the ordering $(v_1, \dots, v_n)$. Then $C$ must contain a vertex $v_j$ in $X_i$. This is a contradiction, since $\alpha$ is a proper colouring of $G$ and $v_i v_j \in E$.

By construction, $G$ has degeneracy at most $\delta_c^*(D)$. Using Theorem 3(i), we get that $C_k(G)$ has diameter at most $C_0 n^2$ for some constant $C_0$.

Let $\alpha$ be any k-dicolouring of $D$. We will now show that there exists a dicolouring $\alpha'$ of $D$ that is also a proper colouring of $G$, and such that there exists a redicolouring sequence between $\alpha$ and $\alpha'$ of length at most $C_1 n^2$ for some constant $C_1$. Set $\delta^* = \delta_c^*(D) \ge \delta^*(G)$, $Y_i = \{v_{i+1}, \dots, v_n\}$, and $H_i = G - Y_i$ for all $i \in [n]$. Let $L_i$ be the k-list assignment of $H_i$ defined by

$$L_i(v_j) = [k] \setminus \{\alpha(v) \mid v \in X_j \cap Y_i\} \text{ for all } j \in [i].$$

Since $k$, the total number of colours, is at least $\frac{3}{2}(\delta^* + 1)$, for every $j \in [i]$ we have:

$$ \begin{aligned} |L_i(v_j)| &\ge k - |X_j \cap Y_i| \\ &\ge \frac{k}{3} + \frac{2}{3} \frac{3}{2}(\delta^* + 1) - |X_j \cap Y_i| \\ &\ge |X_j \cap \{v_{j+1}, \dots, v_i\}| + 1 + \frac{k}{3}. \end{aligned} $$

Hence, since $|L_i(v_j)|$ is an integer, $L_i$ is a $\lceil \frac{k}{3} \rceil$-feasible k-list assignment of $H_i$.

**Remark 26.** Let $\gamma$ be a dicolouring of $D$ such that for some $i$, $\gamma$ agrees with $\alpha$ on $\{v_{i+1}, \dots, v_n\}$ and $\gamma|_{H_i}$ (the restriction of $\gamma$ to $H_i$) is an $L_i$-colouring of $H_i$. Then any $L_i$-recolouring sequence starting from $\gamma|_{H_i}$ on $H_i$ is a redicolouring sequence in $D$. Indeed, assume this is not the case and at one step, we get to an $L_i$-colouring $\zeta$ of $H_i$ but $\zeta_D$ contains a monochromatic cycle $C$, where $\zeta_D(v) = \zeta(v)$ when $v$ belongs to $H_i$ and $\zeta_D(v) = \gamma(v)$
<figure><img src="image_2.png" /><figcaption>Figure 1: The redicolouring sequence between $\gamma_i$ and $\gamma_{i+\lfloor \frac{k}{3} \rfloor}$.</figcaption></figure>

otherwise. Let $v_j$ be the vertex of $C$ such that $j$ is minimum in the cycle-degeneracy-ordering of $D$. Then $C$ must intersect $X_j$ in some vertex $v_q$. Thus either $q \le i$ and then $v_q v_j$ is a monochromatic edge in $H_i$ or $q \ge i+1$ but then $\zeta(v_q) = \gamma(v_q) = \alpha(v_q)$ does not belong to $L_i(v_j)$. In both cases, we get a contradiction.

**Claim 27.** Let $\gamma_i$ be a $k$-dicolouring of $D$, agreeing with $\alpha$ on $Y_{i+1}$, which induces an $L_i$-colouring of $H_i$ avoiding at least $\lfloor \frac{k}{3} \rfloor$ colours in $H_i$. Then there is a redicolouring sequence of length at most $\frac{8k+24}{3}n + \lfloor \frac{k}{3} \rfloor$ from $\gamma_i$ to a dicolouring $\gamma_{i+\lfloor \frac{k}{3} \rfloor}$ which induces an $L_{i+\lfloor \frac{k}{3} \rfloor}$-colouring of $H_{i+\lfloor \frac{k}{3} \rfloor}$ avoiding at least $\lfloor \frac{k}{3} \rfloor$ colours in $H_{i+\lfloor \frac{k}{3} \rfloor}$. Moreover, $\gamma_{i+\lfloor \frac{k}{3} \rfloor}$ agrees with $\alpha$ on $Y_{i+\lfloor \frac{k}{3} \rfloor}$.

*Proof of the claim.* Figure 1 illustrates the different steps of the proof of the claim. The main steps are first to remove the colours of a set $S'$ in $H_i$ which then allows to remove the colours of a set $S''$ for vertices $v_{i+1}$ to $v_{i+\lfloor \frac{k}{3} \rfloor}$ and finally reach a colouring where no colour of $S''$ appears in $H_{i+\lfloor \frac{k}{3} \rfloor}$ (see the definitions of $S'$ and $S''$ below).

Let $S$ be a set of colours of size exactly $\lfloor \frac{k}{3} \rfloor$ avoided by $\gamma_i$ on $H_i$. For each vertex $v_j$ in $\{v_{i+1}, \dots, v_{i+\lfloor \frac{k}{3} \rfloor}\}$, we choose a colour $c_j$ so that each of the following holds:

* $c_j$ belongs to $L_j(v_j)$, and

* for each $\ell \in \{i+1, \dots, j-1\}$, $c_\ell$ is different from $c_j$.

Note that this is possible because $L_j$ is $\lfloor \frac{k}{3} \rfloor$-feasible. Now let $S'$ be the set $\{c_{i+1}, \dots, c_{i+\lfloor \frac{k}{3} \rfloor}\}$. Observe that $|S'| = \lfloor \frac{k}{3} \rfloor$. By Lemma 25, there is, in $H_i$, an $L_i$-recolouring sequence of length at most $\frac{4k+12}{3}n$ from $\gamma_i$ to some $\gamma'_i$ that avoids $S'$. This recolouring sequence extends to a redicolouring sequence in $D$ by Remark 26. In the obtained dicolouring, since $\gamma'_i$ avoids $S'$ on $H_i$, we can recolour successively $v_j$ with $c_j$ for all $i+1 \le j \le i+\lfloor \frac{k}{3} \rfloor$ (starting from $v_{i+1}$ and moving forward to $v_{i+\lfloor \frac{k}{3} \rfloor}$). This does not create any monochromatic cycle by choice of $c_j$. Let $\eta_i$ be the resulting dicolouring of $D$. Now we define a list assignment $\tilde{L}_i$ of $H_i$ as follows:

$$ \tilde{L}_i(v_j) = [k] \setminus \{\eta_i(v) \mid v \in N(v_j) \cap \{v_{i+1}, \dots, v_n\})\} \text{ for all } j \in [i]. $$
Using the same arguments as we did for $L_i$, we get that $\tilde{L}_i$ is $\lfloor \frac{k}{3} \rfloor$-feasible for $H_i$. Note that $\eta_i$ is an $\tilde{L}_i$-colouring of $H_i$ that avoids $S'$. Let $S''$ be any set of $\lfloor \frac{k}{3} \rfloor$ colours disjoint from $S'$. By Lemma 25, there is, in $H_i$, an $\tilde{L}_i$-recolouring sequence of length at most $\frac{4k+12}{3}n$ from $\eta_i$ to some $\eta'_i$ that avoids $S''$. This recolouring sequence extends directly to a redicolouring sequence in $D$. Since $S'$ is disjoint from $S''$, the obtained dicolouring is an $L_{i+\lfloor \frac{k}{3} \rfloor}$-colouring of $H_{i+\lfloor \frac{k}{3} \rfloor}$ that avoids at least $\lfloor \frac{k}{3} \rfloor$ colours in $H_{i+\lfloor \frac{k}{3} \rfloor}$. Hence we get a redicolouring sequence from $\gamma_i$ to the desired $\gamma_{i+\lfloor \frac{k}{3} \rfloor}$, in at most $\frac{8k+24}{3}n + \lfloor \frac{k}{3} \rfloor$ steps. ◇

Note that $\gamma_{\lfloor \frac{k}{3} \rfloor}$ (a dicolouring satisfying the assumptions of Claim 27 for $i = \lfloor \frac{k}{3} \rfloor$) can be reached from $\alpha$ in less than $n$ steps: for all $j \in [\lfloor \frac{k}{3} \rfloor]$, choose a colour $c_j$ so that each of the following holds:

* $c_j$ belongs to $L_j(v_j)$, and

* for each $\ell \in [j-1]$, $c_\ell$ is different from $c_j$.

Now we can recolour successively $v_1, \dots, v_{\lfloor \frac{k}{3} \rfloor}$ (in this order) to their corresponding colour in $\{c_1, \dots, c_{\lfloor \frac{k}{3} \rfloor}\}$. Then applying Claim 27 iteratively at most $\lfloor \frac{n}{\lfloor \frac{k}{3} \rfloor} \rfloor \le \frac{3n}{k}$ times, we get that there is a redicolouring sequence of length at most $n + \frac{3n}{k} \left(\frac{8k+24}{3}n + \frac{k}{3}\right)$ from $\alpha$ to a dicolouring $\alpha'$ of $D$ that is also a proper colouring of $G$. Note that there exists a constant $C_1$, independent of $k$, such that $n + \frac{3n}{k} \left(\frac{8k+24}{3}n + \frac{k}{3}\right) \le C_1 n^2$.

Let $\alpha$ and $\beta$ be two $k$-dicolourings of $D$. As proved above, there is a redicolouring sequence of length at most $C_1 n^2$ from $\alpha$ (resp. $\beta$) to a dicolouring $\alpha'$ (resp. $\beta'$) of $D$ that is also a proper colouring of $G$. Since $C_k(G)$ has diameter at most $C_0 n^2$, there is a recolouring sequence of $G$ of length at most $C_0 n^2$ from $\alpha'$ to $\beta'$, which is also a redicolouring sequence of $D$ (since every proper colouring of $G$ is a dicolouring of $D$). The union of those three sequences yields a redicolouring sequence from $\alpha$ to $\beta$ of length at most $(2C_1 + C_0)n^2$. □

*Proof of Theorem 11(iii).* Let $\alpha$ and $\beta$ be two $k$-dicolourings. Let us show by induction on the number of vertices that there exists a redicolouring sequence from $\alpha$ to $\beta$ where every vertex is recoloured at most $\delta_c^*(D)+1$ times.

If $n=1$ the result is obviously true. Let $D$ be a digraph on at least two vertices, let $u$ be a vertex such that $d_c(u) \le \delta_c^*(D)$ and let $D' = D - u$. We denote by $\alpha'$ and $\beta'$ the dicolourings of $D'$ induced, respectively, by $\alpha$ and $\beta$. By induction and since $\delta_c^*(D') \le \delta_c^*(D)$, there exists a redicolouring sequence from $\alpha'$ to $\beta'$ such that each vertex is recoloured at most $\delta_c^*(D) + 1$ times. Now we consider the same recolouring steps to recolour $D$, starting from $\alpha$. If for some step $i$, it is not possible to recolour $v_i$ to $c_i$, this must be because $u$ is currently coloured $c_i$ and recolouring $v_i$ to $c_i$ would create a monochromatic directed cycle. By definition of cycle-degree, there exists a transversal $X$ of the directed cycles containing $u$, with $|X| \le \delta_c^*(D)$ and $u \notin X$. Since $k \ge 2\delta_c^*(D) + 2$, there are at least $\delta_c^*(D) + 2$ colours that do not appear in $X$. We choose $c$ among these colours so that $c$ does not appear in the next $\delta_c^*(D) + 1$ recolourings of $X$, and we recolour $u$ with $c$.

Since $|X| \le \delta_c^*(D)$ and since each vertex in $D'$ is recoloured at most $\delta_c^*(D) + 1$ times, the total number of recolourings in $X$ is at most $\delta_c^*(D)(\delta_c^*(D) + 1)$ in the redicolouring sequence obtained by induction. Hence, in this new redicolouring sequence, $u$ is recoloured at most $\delta_c^*(D)$ times. We finally have to set $u$ to its colour in $\beta$. Doing so $u$ is recoloured at most $\delta_c^*(D) + 1$ times. This concludes the proof. □

# 4 Bounds on the diameter of $\mathcal{D}_k(D)$ when $k \ge \delta_c^*(D) + 2$

This section is devoted to the proofs of Theorems 12 and 13, which are based on the proofs of [18].

In all the section, $f, g: \mathbb{N}^2 \to \mathbb{N}$ are the functions defined as $f(s,t) = (s+1)!(2t)^s$ and $g(s,t) = 2sf(s,t) + 2s + 1$ respectively. The following is straightforward.
**Proposition 28.** For every $s, t \in \mathbb{N}$, $s \neq 0$, the following inequalities hold:

$$f(s,t) \geq \sum_{q=1}^{t} (2(s+1)f(s-1,q)). \qquad (1)$$

$$g(s,t) \geq 2f(s,t) + 2 + g(s-1,t). \qquad (2)$$

$$g(s,t) = O_s(t^s). \qquad (3)$$

We now prove the following main lemma<fnref n="2" />.

**Lemma 29.** Let $D = (V, A)$ be a digraph, $(V_1, \dots, V_t)$ be a partition of $V$, and $s \geq 0$, $k \geq s+2$ be two integers. Let $h \in [t]$ be such that, for every $p \leq h$ and every $u \in V_p$, there exists $X_u \subseteq \bigcup_{i=p+1}^{t} V_i$ such that $|X_u| \leq s$ and $X_u$ intersects every directed cycle containing $u$ in $D - \bigcup_{i=1}^{p-1} V_i$.

Then, for every k-dicolouring $\alpha$ of $D$ and for any colour $c \in [s+2]$, there exists a redicolouring sequence between $\alpha$ and some k-dicolouring $\beta$ such that:

* for every $v \in \bigcup_{i=1}^{h} V_i$, $\beta(v) \neq c$ and $\beta(v) \leq s+2$,

* no vertex of $\bigcup_{i=h+1}^{t} V_i$ is recoloured, and

* each vertex in $\bigcup_{i=1}^{h} V_i$ is recoloured at most $f(s, h)$ times.

*Proof.* We proceed by induction on $s$. Assume first that $s=0$ and let $H$ the subdigraph of $D$ induced by $\bigcup_{i=1}^{h} V_i$. We claim that $D$ does not contain any directed cycle which intersects $V(H)$. Indeed, if $D$ contains such a directed cycle $C$, let $q \in [h]$ be the smallest index such that $V(C) \cap V_q \neq \emptyset$, and let $u \in V(C) \cap V_q$. Then $C$ is a directed cycle containing $u$ in $D - \bigcup_{i=1}^{q-1} V_i$, so $X_u$ must intersect $C$. This yields a contradiction because $X_u = \emptyset$ (since $|X_u| = 0$). Thus, since no directed cycle of $D$ intersects $V(H)$, in $\alpha$ we can recolour each vertex of $H$ with the colour $c' \in [2]$ different from $c$. Since $f(0, h) = 1$, we get the result.

Assume now that $s > 0$. Let $\mathscr{C}$ be the set of colours greater than $s+2$ and let $W$ be the set of vertices with colour $c$ or any colour $c' \in \mathscr{C}$ in $\alpha$. Formally, $\mathscr{C} = [s+3, k]$ and $W = \{v \in V(D) \mid \alpha(v) = c \lor \alpha(v) \in \mathscr{C}\}$. If $k=s+2$, $\mathscr{C}$ is empty and $W$ is the set of vertices coloured $c$.

Let $q \in [h]$ be the smallest index such that $V_q \cap W \neq \emptyset$. If such an index does not exist, then we take $\alpha = \beta$ and we are done. Let $U_{q-1} = \bigcup_{i=1}^{q-1} V_i$ (when $q=1$ we let $U_0$ be the empty set). For each colour $a \in [s+2]$ different from $c$, we define $W_a$ as follows:

$$W_a = \{u \in W \cap V_q \mid \forall v \in X_u, \alpha(v) \neq a\}$$

Observe that every vertex in $W_a$ is recolourable to colour $a$ in $D - U_{q-1}$ since $X_u$ intersects every directed cycle containing $u$ in $D - U_{q-1}$. Note also that every vertex $u \in W$ belongs to some $W_a$ (maybe to several) because $|X_u| \leq s$. Whenever a vertex belongs to several sets $W_a$, we remove it from one, so at the end the collection $(W_a)_{a \in [s+2], a \neq c}$ is a partition of $W$. Figure 2 illustrates the structure of $D$ dicoloured with $\alpha$.

**Claim 30.** Let $\phi$ be a k-dicolouring of $D$ such that:

* $\phi$ and $\alpha$ agree on $\bigcup_{i=q+1}^{t} V_i$ and $V_q \setminus W$,

* $(\{c\} \cup \mathscr{C}) \cap \phi(U_{q-1}) = \emptyset$, and

* $\forall a \in [s+2], a \neq c$, either $\phi(W_a) = \{a\}$ or $\phi(W_a) \subseteq (\{c\} \cup \mathscr{C})$.

<footnote n="2">²In his original proof, Feghali claims to obtain, in the statement corresponding to the third item of Lemma 29 for undirected graphs, a multiplicative factor $(s+1)$ instead of $(s+1)!$ (in the function $f$). Since we are not able to understand how the smaller factor is obtained in the original proof, we state our result with the larger factor of which we are sure of the correctness, which anyway is hidden in the asymptotic notation.</footnote>
<figure><img src="image_3.png" /></figure>

<figure><img src="image_4.png" /><figcaption>Figure 2: The structure of the digraph *D* dicoloured with $\alpha$, which we assume to be an (*s* + 2)-dicolouring for clarity. Note that $W_c$ does not exist and $X_u$ may intersect $V_{q+1} \cup \cdots \cup V_{h-1}$.</figcaption></figure>

Then for every $a \in [s+2]$, $a \neq c$ such that $\phi(W_a) \subseteq (\{c\} \cup \mathcal{C})$, there exists a redicolouring sequence between $\phi$ and a $k$-dicolouring $\psi$ such that:

* each vertex in $U_{q-1}$ is recoloured at most $2f(s-1, q-1)$ times,

* each vertex in $W_a$ is recoloured exactly once (to colour $a$),

* no vertex of $D - (U_{q-1} \cup W_a)$ is recoloured, and

* $(\{c\} \cup \mathcal{C}) \cap \psi(U_{q-1}) = \emptyset$.

*Proof of the claim.* By definition of $W_a$ and because $\phi$ and $\alpha$ agree on $\cup_{i=q+1}^t V_i$, note that every vertex $u \in W_a$ is recolourable to colour $a$ if $a \notin \phi(U_{q-1})$. Hence the key idea is to remove colour $a$ from $U_{q-1}$, then recolour every vertex in $W_a$ with $a$, and finally remove the colour $c$ from $U_{q-1}$ that we may have introduced. Along this process, we will never introduce any colour of $\mathcal{C}$. When $q=1$, note that we can just recolour every vertex in $W_a$ with $a$.

Let $u_1, \dots, u_r$ be an ordering of $U_{q-1}$ such that the vertices in $V_p$ appear before the vertices in $V_{p'}$ for every $1 \le p' < p \le q-1$. Whenever it is possible, in $\phi$, we recolour every vertex $u_1, \dots, u_r$ (in this order) with colour $c$. Let $\eta$ be the obtained dicolouring of $D$, and let $S$ be the set of vertices coloured $c$ in $\eta$. We define $D' = D - S$, $h' = q-1$ and $s' = s-1$. Also for every $p \in [t]$ we define $V_p' = V_p \setminus S$. Finally we define $\eta'$ as the induced dicolouring $\eta$ on $D'$.

Let us prove that, for every $p \le h'$ and every $u \in V_p'$, the set of vertices $X_u' = X_u \setminus S$ satisfies $|X_u'| \le |X_u| - 1 \le s'$ and intersects every directed cycle containing $u$ in $D' - \cup_{i=1}^{p-1} V_i'$.

First, since $u \in V_p'$, we know that $u$ has not been recoloured to $c$ in the previous process. It means that recolouring $u$ with $c$ creates a monochromatic directed cycle $C$. Moreover, since $c \notin \phi(U_{q-1})$ and by choice of the ordering $u_1, \dots, u_r$, we know that such a directed cycle $C$ is included in $\cup_{i=p}^t V_i$. By assumption on $X_u$, we have $X_u \cap V(C) \neq \emptyset$. Since $X_u \subseteq \cup_{i=p+1}^t V_i$ and $\phi(V(C) \setminus \{u\}) = \{c\}$ we deduce that $X_u \cap S \neq \emptyset$, which shows $|X_u'| \le |X_u| - 1 \le s'$.

We now prove that $X_u'$ intersects every directed cycle containing $u$ in $D' - \cup_{i=1}^{p-1} V_i'$. Let $C$ be such a directed cycle. Since $C$ is also a directed cycle in $D - \cup_{i=1}^{p-1} V_i$, we know that $C$ intersects $X_u$. We also know that $V(C) \cap S = \emptyset$ because $C$ is a directed cycle in $D'$. Hence, $C$ intersects $X_u \setminus S = X_u'$ as desired.
By the remark above, we can apply the induction on Lemma 29 with $D'$, $(V'_1, \dots, V'_t)$, $h'$, $s'$, $\eta'$ and $a$ playing the roles of $D$, $(V_1, \dots, V_t)$, $h$, $s$, $\alpha$ and $c$ respectively. Hence, by induction, there exists a redicolouring sequence (which does not use colour $c$) in $D'$ from $\eta'$ to some dicolouring $\zeta'$ such that:

* for every $v \in \bigcup_{i=1}^{q-1} V'_i$, $\zeta'(v) \notin (\{a\} \cup \mathcal{C})$,

* no vertex of $\bigcup_{i=q}^{t} V'_i$ is recoloured, and

* each vertex of $\bigcup_{i=1}^{q-1} V'_i$ is recoloured at most $f(s-1, q-1)$ times.

Since this redicolouring sequence does not use colour $c$, and because $\eta(S) = \{c\}$, it extends into a redicolouring sequence in $D$ between $\eta$ and $\zeta$, where $\zeta(u) = \zeta'(u)$ when $u \in (U_{q-1} \setminus S)$, $\zeta(u) = c$ when $u \in S$ and $\zeta(u) = \phi(u)$ otherwise. Since $\zeta(v) \neq a$ for every vertex $v \in U_{q-1}$ and by choice of $W_a$, in $\zeta$ we can recolour every vertex in $W_a$ to colour $a$. Note that the vertices in $S \cap U_{q-1}$ have been recoloured exactly once (to colour $c$), which is less than $f(s-1, q-1)$.

We will now remove the colour $c$ we introduced in $U_{q-1}$. We use exactly the same process as before, swapping the roles of $c$ and $a$. So, whenever it is possible, starting with $u_1$ and moving forwards towards $u_r$, we recolour each vertex of $U_{q-1}$ with colour $a$. Let $\xi$ be the obtained dicolouring of $D$. We define $R = \{v \in V(D) \mid \xi(v) = a\}$, $\tilde{D} = D - R$, and $\tilde{V}_i = V_i \setminus R$ for every $i \in [t]$. Finally let $\tilde{\xi}$ be the induced dicolouring $\xi$ on $\tilde{D}$. By induction, there exists a redicolouring sequence (which does not use colour $a$) in $\tilde{D}$ from $\tilde{\xi}$ to some dicolouring $\tilde{\psi}$ such that:

* for every $v \in \bigcup_{i=1}^{q-1} \tilde{V}_i$, $\tilde{\psi}(v) \neq c$,

* no vertex of $\bigcup_{i=q}^{t} \tilde{V}_i$ is recoloured, and

* each vertex of $\bigcup_{i=1}^{q-1} \tilde{V}_i$ is recoloured at most $f(s-1, q-1)$ times.

This gives, in $D$, a redicolouring sequence from $\xi$ to some dicolouring $\psi$ which does not use colour $c$ on $U_{q-1}$.

Concatenating the redicolouring sequences we built, we conclude the existence of the desired redicolouring sequence from $\phi$ to $\psi$ in which every vertex in $U_{q-1}$ is recoloured at most $2f(s-1, q-1)$ times, vertices in $W_a$ are recoloured exactly once to colour $a$, and the other vertices of $D$ are not recoloured. $\diamond$

Now we may apply Claim 30 on $\alpha$ (playing the role of $\phi$) to obtain a redicolouring sequence from $\alpha$ to a dicolouring $\alpha'$ (corresponding to $\psi$) in which $W_a$ has been recoloured to $a$ (for some fixed $a \in [s+2]$, $a \neq c$), and colours $\{c\} \cup \mathcal{C}$ do not appear in $\alpha'(U_{q-1})$. Note that, in Claim 30, the obtained dicolouring $\psi$ satisfies the assumptions on $\phi$. Thus, we may repeat this argument on $\alpha'$ to recolour $W_{a'}$ for some $a' \in [s+2]$, $a' \notin \{c, a\}$.

Repeating this process for each colour $a \in [s+2]$ different from $c$, we obtain a redicolouring sequence between $\alpha$ and some dicolouring in which colours $\{c\} \cup \mathcal{C}$ do not appear in $U_{q-1} \cup V_q$ and such that each vertex of $U_{q-1}$ is recoloured at most $(s+1) \cdot 2f(s-1, q-1)$ times and every vertex in $V_q$ is recoloured at most once. Since $f(s-1, q) \ge 1$ and $f(x, y)$ is non-decreasing in $y$, a fortiori every vertex of $\bigcup_{i=1}^q V_i$ is recoloured at most $2(s+1)f(s-1, q)$ times.

We have shown above that, if colours $\{c\} \cup \mathcal{C}$ are not appearing in $\bigcup_{i=1}^{q-1} V_i$, then in at most $2(s+1)f(s-1, q)$ recolourings per vertex, we can also remove them from $V_q$ (and we do not recolour vertices in $\bigcup_{i=q+1}^t V_i$). Thus we can repeat this argument at most $h$ times to find a redicolouring sequence between $\alpha$ and a dicolouring $\beta$ in which colours $\{c\} \cup \mathcal{C}$ do not appear in $\bigcup_{i=1}^h V_i$. In this redicolouring sequence, the number of recolourings per vertex of $\bigcup_{i=1}^h V_i$ is at most

$$ \sum_{q=1}^{h} (2(s+1)f(s-1, q)) \leq f(s, h) \quad \text{by Inequality (1),} $$

which concludes the proof. $\square$
**Lemma 31.** Let $D = (V, A)$ be a digraph on $n$ vertices and let $(V_1, \dots, V_t)$ be a partition of $V$ such that for every $p \in [t]$ and $u \in V_p$, there exists $X_u \subseteq \bigcup_{i=p+1}^t V_i$ such that $|X_u| \le s$ and $X_u$ intersects every directed cycle containing $u$ in $D - \bigcup_{i=1}^{p-1} V_i$. Then, for any $k \ge s+2$, $\mathcal{D}_k(D)$ has diameter at most $g(s,t) \cdot n$.

*Proof.* We will show that, for any two $k$-dicolourings $\alpha, \beta$ of $D$, there exists a redicolouring sequence between them where each vertex is recoloured at most $g(s,t)$ times, showing the result. We proceed by induction on $s$. When $s=0$, $D$ is acyclic so we can directly recolour every vertex $v$ from $\alpha(v)$ to $\beta(v)$. Since $g(0,t)=1$, we get the result.

Assume now that $s > 0$. By Lemma 29, there is a redicolouring sequence from $\alpha$ to an $(s+1)$-dicolouring $\tilde{\alpha}$ in which each vertex of $D$ is recoloured at most $f(s,t)$ times (by taking $h=t$ and $c=s+2$). Symmetrically, we have a redicolouring sequence from $\beta$ to an $(s+1)$-dicolouring $\tilde{\beta}$ in which each vertex of $D$ is recoloured at most $f(s,t)$ times. We will now find a redicolouring sequence between $\tilde{\alpha}$ and $\tilde{\beta}$.

Let $v_1, \dots, v_n$ be an ordering of $V$ such that the vertices in $V_p$ appear before the vertices in $V_{p'}$ for every $1 \le p' < p \le t$. In both $\tilde{\alpha}$ and $\tilde{\beta}$, starting with $v_1$ and moving forwards towards $v_n$, we recolour, whenever it is possible, each vertex of $V$ with colour $s+2$. This is done in at most two recolourings per vertex (one in both dicolourings). Let $\hat{\alpha}$ and $\hat{\beta}$ be the two obtained dicolourings. Observe that the vertices coloured $s+2$ in $\hat{\alpha}$ are exactly the vertices coloured $s+2$ in $\hat{\beta}$. We define $S = \{v \in V \mid \hat{\alpha}(v) = s+2\}$ and $H = D-S$. Let $\hat{\alpha}_{|H}$ and $\hat{\beta}_{|H}$ be the dicolourings induced by $\hat{\alpha}$ and $\hat{\beta}$ on $H$, respectively. For each $p \in [t]$, let $V'_p = V_p \setminus S$. Observe that $(V'_1, \dots, V'_{t'})$ is a partition of $V(H)$ such that for every $p \in [t]$ and $u \in V'_p$, $X'_u = X_u \setminus S$ has size at most $s-1$ and intersects every directed cycle containing $u$ in $D - \bigcup_{i=1}^{p-1} V_i$ (the arguments are the same as in the proof of Lemma 29). Thus, by induction, there exists in $H$ a redicolouring sequence between $\hat{\alpha}_{|H}$ and $\hat{\beta}_{|H}$, using only colours in $[s+1]$ in which every vertex is recoloured at most $g(s-1, t)$ times. Since the vertices in $S$ are coloured $s+2$, this redicolouring sequence extends to $D$ and gives a redicolouring sequence between $\hat{\alpha}$ and $\hat{\beta}$. Thus, we have obtained a redicolouring sequence between $\alpha$ and $\beta$ in which the number of recolourings per vertex is at most $2f(s,t) + 2 + g(s-1,t) \le g(s,t)$ by Inequality (2). $\square$

We will now prove Theorems 12 and 13 with Lemma 31.

**Theorem 12.** Let $D$ be a digraph and $k \ge \delta_c^*(D) + 2 = d + 2$. Then $\text{diam}(\mathcal{D}_k(D)) = O_d(n^{d+1})$.

*Proof.* Take any cycle-degeneracy ordering $v_1, \dots, v_n$ of $D$, and set $V_i = \{v_i\}$ for every $i \in [n]$. Set $s=d$ and $t=n$, and the result follows directly from Lemma 31 and Inequality (3). $\square$

**Theorem 13.** Let $d \ge 1$ and $k \ge d+1$ be two integers, and let $\epsilon > 0$. If $D$ is a digraph satisfying $\text{mad}_c(D) \le d - \epsilon$, then $\text{diam}(\mathcal{D}_k(D)) = O_{d,\epsilon}(n(\log n)^{d-1})$.

*Proof.* Our goal is to find a partition $(V_1, \dots, V_{t(n)})$ of $V(D)$ such that $t(n) = O_{d,\epsilon}(\log n)$. Moreover, we need for every $p \in [t(n)]$ and every $u \in V_p$, that there exists $X_u \subseteq \bigcup_{i=p+1}^{t(n)} V_i$, $|X_u| \le d-1$, that intersects every directed cycle containing $u$ in $D - \bigcup_{i=1}^{p-1} V_i$. If we find such a partition, then by Lemma 31, applied for $s=d-1$ and $t=t(n)$, we get that $\text{diam}(\mathcal{D}_k(D)) \le g(d-1, t(n)) \cdot n$, implying that $\text{diam}(\mathcal{D}_k(D)) = O_{d,\epsilon}(n(\log n)^{d-1})$ since $t(n) = O_{d,\epsilon}(\log n)$ and by Inequality (3).

Let us guarantee the existence of such a partition. Let $H$ be any subdigraph of $D$ on $n_H$ vertices. For every vertex $u \in V(H)$, we let $X_u \subseteq V(H) \setminus \{u\}$ be a set of $d_c^H(u)$ vertices intersecting every directed cycle containing $u$ in $H$ (where $d_c^H(u)$ denotes the cycle-degree of $u$ in $H$). The existence of $X_u$ is guaranteed by definition of the cycle-degree.

Then let $J = (V(H), F)$ be an auxiliary digraph, built from $H$, where $F = \{uv \mid v \in X_u\}$. Let $S \subseteq V(H)$ be the set of all vertices $v$ with $d_J^+(v) \le d-1$ (where $d_J^+(v)$ denotes the out-degree of $v$ in $J$). Then $|S| \ge \frac{\epsilon}{d} n_H$,
for otherwise we have the following contradiction:

$$
\begin{align*}
\mathrm{mad}_c(D) \ge \mathrm{mad}_c(H) &\ge \frac{1}{n_H} \sum_{v \in V(H)} d_c^H(v) = \frac{1}{n_H} \sum_{v \in V(H)} d_J^+(v) \\
&\ge \frac{1}{n_H} \sum_{v \in V(H) \setminus S} d_J^+(v) \\
&\ge \frac{1}{n_H} (n_H - |S|)d > \left(1 - \frac{\epsilon}{d}\right)d = d - \epsilon,
\end{align*}
$$

where in the last inequality we have used that $|S| < \frac{\epsilon n_H}{d}$. Now let us prove that $J[S]$ has an independent set $I$ of size at least $\frac{|S|}{2d-1}$. By choice of $S$, every subdigraph $J'$ of $J[S]$ satisfies $\Delta^+(J') \le d-1$. Hence, for every such $J'$, we have $\sum_{v \in V(J')} (d_{J'}^+(v) + d_{J'}^-(v)) = 2|A(J')| \le 2(d-1)|V(J')|$. In particular, this implies that $\mathrm{UG}(J[S])$ is $(2d-2)$-degenerate, and $\chi(\mathrm{UG}(J[S])) \le 2d-1$. Take any proper $(2d-1)$-colouring of $\mathrm{UG}(J[S])$, its largest colour class is the desired $I$.

Hence, we have shown that $H$ admits a set of vertices $I \subseteq V(H)$, of size at least $\frac{\epsilon}{(2d-1)d}n_H$, such that for every vertex $u \in I$ there exists $X_u \subseteq (V(H) \setminus I)$, $|X_u| \le d-1$, that intersects every directed cycle of $H$ containing $u$.

Since the remark above holds for every subdigraph $H$ of $D$, we can greedily construct the desired partition $(V_1, \dots, V_{t(n)})$ by picking successively such a set $I$ in the digraph induced by the non-picked vertices. By construction, we get that $t$ satisfies the following recurrence:

$$t(i) \le t \left( i - \frac{\epsilon i}{(2d-1)d} \right) + 1.$$

Thus we have $t(n) \le \log_b(n)$ where $b = \frac{1}{1 - \frac{\epsilon}{(2d-1)d}}$, implying that

$$t(n) \le \frac{1}{-\log\left(1 - \frac{\epsilon}{(2d-1)d}\right)} \cdot \log(n) = O_{d,\epsilon}(\log(n)),$$

which concludes the proof. $\square$

**5 Bound on the diameter of $\mathcal{D}_k(D)$ when $k \ge \vec{\chi}_g(D) + 1$**

This section is devoted to the proof of Theorem 15.

**Theorem 15.** For any digraph $D$, if $k \ge \vec{\chi}_g(D) + 1$, then $\mathrm{diam}(\mathcal{D}_k(D)) \le 4 \cdot \vec{\chi}(D) \cdot n$.

*Proof.* Let $\alpha$ be any $k$-dicolouring of $D$ and $\beta$ be any $\vec{\chi}(D)$-dicolouring of $D$. We will show by induction on $\vec{\chi}(D)$ that there exists a redicolouring sequence of length at most $2 \cdot \vec{\chi}(D) \cdot n$ between $\alpha$ and $\beta$. The claimed result will then follow. If $\vec{\chi}(D) = 1$, the result is clear since $D$ is acyclic.

Starting from $\alpha$, whenever a vertex can be recoloured to colour $k$, we recolour it. Then we try to recolour the remaining vertices with colour $k-1$, and we repeat this process for every colour $k-1, \dots, 2$. At the end, the obtained dicolouring $\gamma$ is greedy (with colours ordered from $k$ to $1$). Actually, $\gamma$ is exactly the greedy dicolouring obtained from any ordering $v_1, \dots, v_n$ of $V(D)$ where $i < j$ whenever $\gamma(v_i) > \gamma(v_j)$.

Since $\gamma$ is a greedy dicolouring, and because $k \ge \vec{\chi}_g(D) + 1$, colour 1 is not used in $\gamma$. This allows us to recolour every vertex of $V_1 = \{v \in V(D) \mid \beta(v) = 1\}$ to colour 1 ($V_1 \ne \emptyset$ since $\beta$ uses colours $[\vec{\chi}(D)]$). If $\eta$ is the obtained dicolouring, then $\eta$ and $\beta$ agree on colour 1. Note also that, starting from $\alpha$, we reached $\eta$ by recolouring each vertex at most twice. Thus, the distance between $\alpha$ and $\eta$ in $\mathcal{D}_k(D)$ is at most $2n$.

Consider $H = D - V_1$. Since $\beta$ is an optimal dicolouring of $D$, $\vec{\chi}(H) = \vec{\chi}(D) - 1$. Thus, by induction, there exists a redicolouring sequence between $\eta|_H$ and $\beta|_H$ (that is, the restrictions of $\eta$ and $\beta$, respectively, to $H$) of length at most $2(\vec{\chi}(D) - 1)n$, that does not use colour 1. This directly extends to a redicolouring sequence between $\eta$ and $\beta$ in $D$, which together with the redicolouring sequence between $\alpha$ and $\eta$ gives a redicolouring sequence between $\alpha$ and $\beta$ of length $2 \cdot \vec{\chi}(D) \cdot n$. $\square$
# 6 Using the underlying graph to bound the diameter of $\mathcal{D}_k(D)$

This section is devoted to the proof of Theorem 17.

**Theorem 17.** Let $\mathcal{G}$ be a family of undirected graphs, closed under edge-deletion and with bounded chromatic number, and let $k \ge \chi(\mathcal{G})$ (i.e. $k \ge \chi(G)$ for every $G \in \mathcal{G}$) be such that, for every $n$-vertex graph $G \in \mathcal{G}$, the diameter of $\mathcal{C}_k(G)$ is bounded by $f(n)$ for some function $f$. Then for any $n$-vertex digraph $D$ such that $\text{UG}(D) \in \mathcal{G}$, the diameter of $\mathcal{D}_k(D)$ is bounded by $2f(n)$.

*Proof.* Let $D = (V, A)$ be such a digraph, and let $\gamma$ be any proper $k$-colouring of $\text{UG}(D)$. We will show, for any $k$-dicolouring $\alpha$ of $D$, that there is a redicolouring sequence between $\alpha$ and $\gamma$ of length at most $f(n)$, showing the result. Let $G_\alpha = (V, E)$ be the undirected graph where $E = \{uv \mid uv \in A, \alpha(u) \ne \alpha(v)\}$.

First observe that $\alpha$ is a proper $k$-colouring of $G_\alpha$ by construction of $G_\alpha$. Note also that $\gamma$ is a proper $k$-colouring of $G_\alpha$ because $G_\alpha$ is a subgraph of $\text{UG}(D)$. Moreover, since $G_\alpha$ is a subgraph of $\text{UG}(D)$, by assumption on $\mathcal{G}$, we know that there exists a recolouring sequence between $\alpha$ and $\gamma$ in $G_\alpha$ of length at most $f(n)$.

Next we show that every proper $k$-colouring of $G_\alpha$ is a dicolouring of $D$, implying that the recolouring sequence between $\alpha$ and $\gamma$ in $G_\alpha$ is also a redicolouring sequence between $\alpha$ and $\gamma$ in $D$. For purpose of contradiction, let us assume that $\beta$ is a proper $k$-colouring of $G_\alpha$ but $D$, coloured with $\beta$, contains a monochromatic directed cycle $C$. Then, by construction of $G_\alpha$, for each arc $xy$ of $C$, we must have $\alpha(x) = \alpha(y)$, for otherwise $xy$ would be a monochromatic edge in $G_\alpha$. This shows that $C$ is monochromatic in $D$ coloured with $\alpha$, a contradiction. $\square$

Theorem 17 directly extends to digraphs a number of known results about recolouring planar graphs. We discuss further these applications in Section 8.

# 7 Case of digraphs with bounded $\mathcal{D}$-width

This section is devoted to the proof of Theorem 22.

**Theorem 22.** If $D = (V, A)$ is an $n$-vertex digraph with $\mathcal{D}w(D) \le k-1$, then $\text{diam}(\mathcal{D}_{k+1}(D)) \le 2(n^2+n)$.

The following claim can be easily deduced from the definition of a $\mathcal{D}$-decomposition.

**Claim 32.** Let $(T, \mathcal{X}) = (X_v)_{v \in V(T)}$ be a $\mathcal{D}$-decomposition of a digraph $D = (V, A)$ and $tt' \in E(T)$ such that $v \in X_{t'} \setminus X_t$. Then, $(T, \mathcal{X}') = (X'_v)_{v \in V(T)}$ such that $X'_u = X_u$ for all $u \ne t$ and $X'_t = X_t \cup \{v\}$ is a $\mathcal{D}$-decomposition of $D = (V, A)$. Moreover, if $|X_t| < |X_{t'}|$, $(T, \mathcal{X}')$ has the same width as $(T, \mathcal{X})$.

A $\mathcal{D}$-decomposition $(T, \mathcal{X})$ is reduced if, for every $tt' \in E(T)$, $X_t \setminus X_{t'}$ and $X_{t'} \setminus X_t$ are non-empty. It is easy to see that any digraph $D$ admits an optimal (i.e., of width $\mathcal{D}w(D)$) $\mathcal{D}$-decomposition which is reduced (indeed, if $X_t \subseteq X_{t'}$ for some edge $tt' \in E(T)$, then contract this edge and remove $X_t$ from $\mathcal{X}$).

A $\mathcal{D}$-decomposition $(T, \mathcal{X})$ of $\mathcal{D}$-width $k \ge 0$ is full if every bag has size exactly $k+1$. A $\mathcal{D}$-decomposition $(T, \mathcal{X})$ is valid if $|X_t \setminus X_{t'}| = |X_{t'} \setminus X_t| = 1$ for every $tt' \in E(T)$. Note that any valid $\mathcal{D}$-decomposition is full and reduced. Note also that, if $(T, \mathcal{X})$ is valid and $t \in V(T)$ is a leaf of $T$, then there exists a (unique) vertex $v \in V$ that belongs only to the bag $X_t$. Such a vertex $v$ is called a *baby*.

**Lemma 33.** Every digraph $D = (V, A)$ admits a valid $\mathcal{D}$-decomposition of width $\mathcal{D}w(D)$.

*Proof.* Let $(T, \mathcal{X})$ be an optimal reduced $\mathcal{D}$-decomposition of $D = (V, A)$, which exists by the remark above the lemma. We will progressively modify $(T, \mathcal{X})$ in order to make it first full and then valid.

While the current decomposition is not full, let $tt' \in E(T)$ such that $|X_t| < |X_{t'}| = \mathcal{D}w(D) + 1$ and let $v \in X_{t'} \setminus X_t$. Add $v$ to $X_t$. The obtained decomposition is still a $\mathcal{D}$-decomposition of width $\mathcal{D}w(D)$ by Claim 32. Moreover, the updated decomposition remains reduced all along the process, as since $|X_t| < |X_{t'}|$
and the initial decomposition is reduced, $X_{t'}$ must contain another vertex $u \neq v$ with $u \notin X_t$. Eventually, the obtained decomposition $(T, \mathcal{X})$ becomes an optimal full $\mathcal{D}$-decomposition.

Now, while $(T, \mathcal{X})$ is not valid, let $tt' \in E(T)$, $x, y \in X_t \setminus X_{t'}$ and $u, v \in X_{t'} \setminus X_t$ (such an edge of $T$ and four distinct vertices of $V$ must exist since $(T, \mathcal{X})$ is full and reduced but not valid). Then, add a new node $t''$ to $T$, with corresponding bag $X_{t''} = (X_{t'} \setminus \{u\}) \cup \{x\}$ and replace the edge $tt'$ in $T$ by the two edges $tt''$ and $t''t'$. Clearly, subdividing the edge $tt'$ by adding a bag $X_{t''} = X_{t'}$ still leads to an optimal full (but not reduced) $\mathcal{D}$-decomposition of the same width. Then, adding $x$ to $X_{t''}$ makes that $(T, \mathcal{X})$ remains a $\mathcal{D}$-decomposition (by the first statement of Claim 32). Finally, we must prove that removing $u$ from $X_{t''}$ preserves the fact that we still have a $\mathcal{D}$-decomposition. Indeed, let $S$ be a strong subset whose support $T_S$ (before the subdivision) contains $tt'$ (clearly, the other strong subsets are not affected by the change in the decomposition). It must be because of some vertex in $z \in X_t \cap X_{t'}$ and so $z \in X_{t''}$. Therefore, the support $T_S$, obtained after the subdivision and the modifications to $X_{t''}$, contains both edges $tt''$ and $t''t'$, and therefore it remains connected. Note that, after the modifications, $(T, \mathcal{X})$ is still full and reduced.

Note that, after the application of each step as described above, either the maximum of $|X_t \setminus X_{t'}|$ over all edges $tt' \in E(T)$, or the number of edges $tt' \in E(T)$ that maximize $|X_t \setminus X_{t'}|$, strictly decreases, and none of these two quantities increases. Therefore, the process terminates, and eventually $(T, \mathcal{X})$ becomes an optimal valid $\mathcal{D}$-decomposition. $\square$

Given a valid $\mathcal{D}$-decomposition $(T, \mathcal{X})$ of a digraph $D = (V, A)$, two vertices $u, v \in V$ are parents, denoted by $u \sim_p v$, if their supports $T_u$ and $T_v$ (we use $T_v$ instead of $T_{\{v\}}$ for denoting the support of a single vertex $\{v\}$) are vertex-disjoint and there is an edge $tt' \in E(T)$ with $t \in V(T_v)$ and $t' \in V(T_u)$. Let $\sim_{(T, \mathcal{X})}$ be the transitive closure of $\sim_p$.

**Lemma 34.** Let $(T, \mathcal{X})$ be an optimal valid $\mathcal{D}$-decomposition of a digraph $D = (V, A)$. Then, $\sim_{(T, \mathcal{X})}$ defines an equivalence relation on $V$ which has exactly $\mathcal{D}w(D) + 1$ classes. Moreover, the vertices of each class induce an acyclic subdigraph of $D$.

*Proof.* The facts that $\sim_{(T, \mathcal{X})}$ is well-defined and that there are $\mathcal{D}w(D) + 1$ classes follow from the fact that $(T, \mathcal{X})$ is valid. Now, let $C$ be any equivalence class of $\sim_{(T, \mathcal{X})}$. For purpose of contradiction, let us assume that $D[C]$ contains a directed cycle $Q$. By definition of a $\mathcal{D}$-decomposition, the support $T_Q$ must induce a subtree of $T$. Since, by definition of $\sim_{(T, \mathcal{X})}$, the supports of the vertices of $Q$ are pairwise vertex-disjoint, the support $T_Q$ must consist precisely of the disjoint union of the supports of the vertices of $Q$, and hence $T_Q$ is not connected, a contradiction. $\square$

Given a valid $\mathcal{D}$-decomposition $(T, \mathcal{X})$ of $D = (V, A)$, the corresponding equivalence relation $\sim_{(T, \mathcal{X})}$, and a subset $X \subseteq V$, a $k$-colouring $\alpha$ of $D$ (which is not necessarily a dicolouring) is $X$-coherent with respect to $(T, \mathcal{X})$ if, for every $u, v \in X$ such that $u \sim_p v$, and for every $t \in V(T_v)$, $v$ is the unique vertex coloured $\alpha(v)$ in $X_t$, and $\alpha(u) = \alpha(v)$. In what follows, we will just say $X$-coherent, as the $\mathcal{D}$-decomposition will always be clear from the context.

**Claim 35.** Let $(T, \mathcal{X})$ be a valid $\mathcal{D}$-decomposition of a digraph $D = (V, A)$ of width $k-1 \geq 0$. Then, $D$ admits a $k$-colouring that is $V$-coherent.

*Proof of the claim.* Consider any ordering $C_1, \dots, C_{k+1}$ of the classes of $\sim_{(T, \mathcal{X})}$. Let $\alpha$ be the colouring associating with each vertex $v$ the index $i$ such that $v \in C_i$. Then $\alpha$ is $V$-coherent. $\diamond$

The following claim is straightforward, so we skip its proof.

**Claim 36.** Let $(T, \mathcal{X})$ be a valid $\mathcal{D}$-decomposition of a digraph $D = (V, A)$ of width $k-1 \geq 0$ and let $\alpha$ be a $k$-colouring of $D$ that is $V$-coherent. Then, the equivalence classes of $\sim_{(T, \mathcal{X})}$ are precisely $\alpha_1, \dots, \alpha_k$ (the colours classes of $\alpha$). In particular, by Lemma 34, $\alpha$ is a $k$-dicolouring.

**Lemma 37.** Let $D = (V, A)$ be an $n$-vertex digraph and let $(T, \mathcal{X})$ be a valid $\mathcal{D}$-decomposition of $D = (V, A)$ of width $k-1 = \mathcal{D}w(D)$. Let $\alpha$ and $\beta$ be two $(k+1)$-dicolourings of $D$ that are $V$-coherent. Then, $\alpha$ and $\beta$ are at distance at most $2n$ in $\mathcal{D}_{k+1}(D)$.
**Proof.** We prove the existence of a redicolouring sequence from $\alpha$ to $\beta$ in $\mathcal{D}_{k+1}(D)$ that recolours each vertex at most twice.

Let $S_1, \dots, S_k$ be the equivalence classes of $\sim_{(T, \mathcal{X})}$. By Claim 36, each $S_i$ corresponds exactly to one colour class of $\alpha$ and exactly one colour class of $\beta$. In particular, both $\alpha$ and $\beta$ use indeed $k$ colours (not necessarily the same). Consider the undirected complete graph $H$ on $k$ vertices $x_1, \dots, x_k$, and the two colourings $\alpha_H, \beta_H$ of $H$ defined as $\{\alpha_H(x_i)\} = \alpha(S_i)$ and $\{\beta_H(x_i)\} = \beta(S_i)$. It is known (see [6, Lemma 5]) that there is a redicolouring sequence in $H$ between $\alpha_H$ and $\beta_H$ in which every vertex is recoloured at most twice. This directly extends to a redicolouring sequence between $\alpha$ and $\beta$ (when $x_i$ is recoloured with colour $c$ in $H$, we recolour every vertex in $S_i$ with $c$ in $D$). Note that this is indeed a redicolouring sequence because at each step of the sequence, in the corresponding colouring, every colour class is a subset of some $S_i$, which induces an acyclic subdigraph by Lemma 34. $\square$

Given a tree $T$ rooted in $r \in V(T)$ and two vertices $u, v$ of $T$, we say that $v$ is a *descendant* of $u$ if $u$ belongs to the path between $r$ and $v$ in $T$.

**Lemma 38.** Let $D = (V, A)$ be an $n$-vertex digraph and $(T, \mathcal{X})$ be a valid $\mathcal{D}$-decomposition of $D = (V, A)$ of width $k-1 \ge 0$. Let $T$ be rooted in $r \in V(T)$. Let $\alpha$ be a $(k+1)$-colouring of $D$ that is $(V \setminus X_r)$-coherent and let $c \in [k+1]$ such that $\alpha(v) \ne c$ for all $v \in X_r$. Then, for every $t, t' \in V(T)$ with $t'$ being a descendant of $t$, if there exists $v \in X_t$ with $\alpha(v) = c$, then $v$ is the unique vertex of $X_t$ coloured with $c$ and there exists a unique $u \in X_{t'}$ with $\alpha(u) = c$.

**Proof.** For purpose of contradiction, let us assume that there exist $t, t' \in V(T)$ such that $t'$ is a descendant of $t$, a vertex in $X_t$ is coloured with $c$, and no vertex in $X_{t'}$ is coloured with $c$. Over all possible such pairs $\{t, t'\}$, we choose one such that the distance between $t$ and $t'$ in $T$ is minimum. Then $t'$ is a child of $t$.

Let $v \in X_t$ such that $\alpha(v) = c$ and let $\{u\} = X_{t'} \setminus X_t$, where we have used that $(T, \mathcal{X})$ is valid. Note that $u \sim_{(T, \mathcal{X})} v$ and that, since $T_u$ is connected, $u \notin X_r$. Since $\alpha$ is $(V \setminus X_r)$-coherent, we must have $\alpha(u) = \alpha(v) = c$, a contradiction.

The uniqueness of $u$ and $v$ comes from the fact that $u, v \notin X_r$ since $\alpha(v) = \alpha(u) = c$, and because by hypothesis $\alpha$ is $(V \setminus X_r)$-coherent. $\square$

**Lemma 39.** Let $D = (V, A)$ be an $n$-vertex digraph, let $(T, \mathcal{X})$ be a valid $\mathcal{D}$-decomposition of $D = (V, A)$ of width $k-1$, and let $T$ be rooted in $r \in V(T)$. Let $y \in X_r$ and let $\alpha$ be a $(k+1)$-dicolouring of $D$ that is $(V \setminus (X_r \setminus \{y\}))$-coherent. Let $D'$ be the digraph obtained by identifying $y$ and all vertices $v$ such that $y \sim_{(T, \mathcal{X})} v$ and let $\alpha'$ be the dicolouring of $D$ arising from $\alpha$. If there exists a $(k+1)$-dicolouring $\beta'$ of $D'$ that can be reached from $\alpha'$ by recolouring each vertex at most once, then the $(k+1)$-dicolouring $\beta$ that naturally extends $\beta'$ to $D$ (i.e., $\beta(v) = \beta'(y)$ for all $v \sim_{(T, \mathcal{X})} y$) can be reached from $\alpha$ by recolouring each vertex at most once.

**Proof.** This follows from the fact that $\alpha$ is $(V \setminus (X_r \setminus \{y\}))$-coherent, and thus every bag $X_t$ has exactly one vertex of the colour of $y$, which is the colour of the unique vertex $v \sim_{(T, \mathcal{X})} y$ that belongs to $X_t$. Hence, to go from $\alpha$ to $\beta$, we follow the same redicolouring sequence for every vertex $u \sim_{(T, \mathcal{X})} y$, and when we recolour $y$ in $D'$, we simply recolour every vertex $v \sim_{(T, \mathcal{X})} y$ with the same colour as $y$. $\square$

**Claim 40.** Let $D = (V, A)$ be an $n$-vertex digraph, let $(T, \mathcal{X})$ be a valid $\mathcal{D}$-decomposition of $D = (V, A)$ of width $k-1$. Let $\alpha$ be a $(k+1)$-dicolouring of $D$ and $x \in V(D)$ be any vertex. Let $c \in [k+1]$ be a colour such that, for every vertex $v \in \bigcup_{x \in X_t} X_t$, $\alpha(v) \ne c$. Then the $(k+1)$-colouring obtained from $\alpha$ by recolouring $x$ with $c$ is a dicolouring.

**Proof of the claim.** Assume this is not the case, and recolouring $x$ with $c$ creates a monochromatic directed cycle $C$. Then since $D[V(C)]$ is strongly connected, the support $T_{V(C)}$ of $V(C)$ is a non-empty subtree. This implies that there exists $y \in V(C) \setminus \{x\}$ such that $y$ and $x$ belong to one same bag $X_t$. This contradicts the choice of $c$. $\diamond$
**Lemma 41.** Let $D = (V, A)$ be an $n$-vertex digraph, let $(T, \mathcal{X})$ be a valid $\mathcal{D}$-decomposition of $D = (V, A)$ of width $k-1$, and let $T$ be rooted in $r \in V(T)$. Let $\alpha$ be a $(k+1)$-dicolouring of $D$ that is $(V \setminus X_r)$-coherent and such that the colour $c$ does not appear in $X_r$, i.e., there exists $c \in [k+1]$ such that $\alpha(v) \neq c$ for all $v \in X_r$. Then, there exists a $(k+1)$-dicolouring $\beta$ of $D$ and a redicolouring sequence $\alpha = \gamma_1, \dots, \gamma_\ell = \beta$ such that:

* $\beta$ is $(V \setminus X_r)$-coherent,

* $\beta(v) \neq c$ for all $v \in V$,

* every vertex of $D \setminus X_r$ is recoloured at most once,

* no vertex of $X_r$ is recoloured, and

* if $x_i$ is the vertex recoloured between $\gamma_i$ and $\gamma_{i+1}$, then, for every vertex $v \in \bigcup_{x_i \in X_t} X_t$, $\gamma_i(v) \neq \gamma_{i+1}(x_i)$.

*Proof.* The proof is by induction on $k-1+|V(T)|$, where $k-1$ is the width of $(T, \mathcal{X})$. If $k-1=0$, then $D$ is acyclic and colour $c$ can be eliminated by recolouring every vertex at most once with a same colour distinct from $c$. Note that the vertices in $X_r$ are not recoloured and the last condition holds trivially since every bag has size one.

If $|V(T)| = 1$, the result holds trivially since the colour $c$ does not appear in $X_r$, so we may take $\beta = \alpha$. Hence, $r$ must have at least one child. Let us fix one child $v$ of $r$, and let $\{y\} = X_v \setminus X_r$. Let $T_v$ be the subtree of $T$ rooted in $v$ and let $D_v$ be the subdigraph of $D$ induced by $\bigcup_{t \in V(T_v)} X_t$.

* If $\alpha(y) \neq c$, then $c$ does not appear in $X_v$. Let $(T_v, \mathcal{Y}) = (\{X_t \mid t \in V(T_v)\})$ be the decomposition of $D_v$ obtained from $T$. Let $D'_v$ be the digraph obtained from $D_v$ by identifying $y$ with all vertices of its class with respect to $(T_v, \mathcal{Y})$. Note that $(T_v, \mathcal{Y})$ is a full decomposition of $D'_v$. By contracting each edge $tt' \in E(T_v)$ such that $Y_t = Y_{t'}$ (in $D'$), we obtain $(T'_v, \mathcal{Y}')$ a valid decomposition of $D'_v$.

Note that $|V(T'_v)| < |V(T)|$ and the width $(T'_v, \mathcal{Y}')$ equals the width of $(T_v, \mathcal{X})$. Hence by induction there exists a $(k+1)$-dicolouring $\beta'_v$ of $D'_v$ that is $(V(D'_v) \setminus X_v)$-coherent and such that $\beta'_v(w) \neq c$ for all $w \in V(D'_v)$. Moreover, there is a redicolouring sequence from $\alpha'_v$, the dicolouring $\alpha$ restricted to $D'_v$, to $\beta'_v$ such that every vertex of $D'_v \setminus X_v$ is recoloured at most once, and vertices in $X_v$ are not recoloured. Note finally that, whenever a vertex $x$ is recoloured, it is recoloured with a colour that is not appearing in $\bigcup_{x \in X_t} X_t$.

By Lemma 39, there exists a $(k+1)$-dicolouring $\beta_v$ of $D_v$ that is $(V(D_v) \setminus X_v)$-coherent and such that $\beta_v(w) \neq c$ for every vertex $w \in V(D_v)$. Moreover, there is a redicolouring sequence $\gamma_v = (\gamma_1, \dots, \gamma_\ell)$ from $\gamma_1 = \alpha_v$, the dicolouring $\alpha$ restricted to $D_v$, to $\gamma_\ell = \beta_v$ such that every vertex of $D_v \setminus X_v$ is recoloured at most once. Furthermore, note that $\beta_v$ is indeed $(V(D_v) \setminus (X_v \setminus \{y\})$-coherent because we identified $y$ with all vertices of its class in $D'_v$.

Along this redicolouring sequence $\gamma_v$, when a vertex $x$ is recoloured between $\gamma_i$ and $\gamma_{i+1}$, let us show that, for every vertex $z \in \bigcup_{x \in X_t} X_t$, $\gamma_i(z) \neq \gamma_{i+1}(x)$. Let us first assume that $x$ does not belong to the class of $y$ with respect to $(T_v, \mathcal{X})$. If $z \sim_{(T_v, \mathcal{X})} y$, then by induction, $\gamma_{i+1}(x) \neq \gamma_i(y) = \gamma_i(z)$. Otherwise ($z$ not in the class of $y$), by induction, we directly have that $\gamma_{i+1}(x) \neq \gamma_i(z)$. Second, let us assume that $x$ belongs to the class of $y$. Hence, $z \not\sim_{(T_v, \mathcal{X})} y$ since $x$ and $z$ belong to a same bag. By induction,

Finally, this redicolouring sequence in $D_v$ is indeed a redicolouring sequence in $D$ because of the property above and by Claim 40.

* If $\alpha(y) = c$, by Lemma 38 and because $(T, \mathcal{X})$ is $(V \setminus X_r)$-coherent, every bag in $T_v$ contains exactly one vertex coloured $c$ and the set of vertices coloured with $c$ is precisely $Y := \{w \in X_t \mid t \in V(T_v), w \sim_{(T, \mathcal{X})} y\}$. The reduced decomposition obtained from $(T_v, \mathcal{Y}) = (T_v, \{X_t \setminus Y \mid t \in V(T_v)\})$
is a valid decomposition of $D'_v = D_v - Y$ of width $k-2$. Observe that it is full because we remove exactly one vertex from each bag. Let $c'$ be a colour that does not appear in $X_v \setminus \{y\}$. Observe that the width of $(T_v, \mathcal{Y})$ is at most $k-2$. Thus, by induction, there exists a $k$-dicolouring $\beta'$ of $D'_v$ that is $(V(D'_v) \setminus X_v)$-coherent and such that $\beta'(w) \notin \{c, c'\}$ for every vertex $w \in V(D'_v)$ and $\beta'$ can be obtained from $\alpha'_v$, the restriction of $\alpha$ to $D'_v$, by recolouring each vertex of $V(D'_v) \setminus X_v$ at most once. By then recolouring all vertices of $Y$ to $c'$, we obtain a $(k+1)$-dicolouring $\beta$ of $D_v$ that is $(V(D_v) \setminus (X_v \setminus \{y\}))$-coherent and such that $\beta(w) \neq c$ for every vertex $w \in V(D_v)$ and $\beta$ can be obtained from $\alpha_v$, the restriction of $\alpha$ to $D_v$, by recolouring each vertex of $D_v \setminus (X_v \setminus \{y\})$ at most once, as we wanted to prove.

Along the obtained redicolouring sequence, by induction, when a vertex $x$ that is not in the class $y$ is recoloured, it is recoloured with a colour different from the colours of $\cup_{x \in X_t} (X_t \setminus Y)$. Since $Y$ is coloured with $c$, and no vertex is recoloured with $c$, it is recoloured with a colour different from the colours of $\cup_{x \in X_t} (X_t \setminus Y)$. Finally, when $y' \sim_{(T, \mathcal{X})} y$ is recoloured, it is recoloured with $c'$ which is a colour that is not appearing in $D_v$. This shows the last property.

Finally, this redicolouring sequence in $D_v$ is indeed a redicolouring sequence in $D$ because of the property above and by Claim 40.

Repeating the process above for each child $v$ of $r$, we finally obtain a redicolouring sequence from $\alpha$ to some $(k+1)$-dicolouring $\beta$ such that $\beta(w) \neq c$ for all $w \in V$. Moreover, at each step, in both cases, no vertex of $X_r$ is recoloured, so no vertex of $X_r$ is recoloured all along the redicolouring sequence. Also, if $v$ and $v'$ are two children of $r$, and $x$ is a vertex of $D$ that belongs to $V(D_v) \cap V(D_{v'})$, then $x$ also belongs $X_r$, implying that $x$ is not recoloured. Thus, every vertex that is recoloured belongs to $V(D_v)$ for exactly one child $v$ of $r$, implying that, in the obtained redicolouring sequence, every vertex of $D \setminus X_r$ is recoloured at most once.

Finally, note that $\beta$ is $(V \setminus X_r)$-coherent because, in both cases, the obtained dicolouring $\beta_v$ is $(V \setminus \{X_v \setminus \{y\}\})$-coherent. $\square$

**Lemma 42.** Let $D = (V, A)$ be an $n$-vertex digraph and $(T, \mathcal{X})$ be a valid $\mathcal{D}$-decomposition of $D = (V, A)$ of width $k-1 \geq \mathcal{D}w(D)$. For every $(k+1)$-dicolouring $\alpha$ of $D$ there exists a $V$-coherent $(k+1)$-colouring $\beta$ of $D$ such that $\alpha$ and $\beta$ are at distance at most $n^2$ in $\mathcal{D}_{k+1}(D)$.

*Proof.* Let us root $T$ at $r \in V(T)$ arbitrarily. For a vertex $t \in V(T)$, let $T_t$ be the subtree of $T$ rooted at $t$ and let $D_t = D[\bigcup_{v \in V(T_t)} X_v]$.

We will define inductively an ordering $(v_1, \dots, v_n)$ on $V$ and a sequence $(\alpha = \gamma_0, \gamma_1, \dots, \gamma_n = \beta)$ of $(k+1)$-dicolourings of $D$ such that $\gamma_i$ is $X_i$-coherent with $X_i = \{v_1, \dots, v_i\}$ (set $X_0 = \emptyset$) for every $0 \le i \le n$ and such that it is possible to go from $\gamma_i$ to $\gamma_{i+1}$ by recolouring every vertex of $X_i$ at most twice and $v_{i+1}$ at most once. Note that $\gamma_n = \beta$ is $V$-coherent.

First note that $\gamma_0$ is trivially $X_0$-coherent since $X_0 = \emptyset$.

Let $i \ge 0$ and assume $(v_1, \dots, v_i)$ and $(\gamma_1, \dots, \gamma_i)$ that satisfy the above properties have already been defined. Let $v_{i+1} \in V \setminus X_i$ be any vertex that appears in some bag $X_t$ such that $V(D_t) \setminus X_t \subseteq X_i$ (if $i=0$ then $t$ is a leaf and $v_1$ is a baby). Note that $\gamma_{i|D_t}$, the restriction of $\gamma_i$ to $D_t$, is a $(V(D_t) \setminus X_t)$-coherent dicolouring of $D_t$. Let $c$ be any colour that does not appear in $X_t$ coloured with $\gamma_i$. By Lemma 41, there exists a $(k+1)$-dicolouring $\xi$ of $D_t$ that is $(V(D_t) \setminus X_t)$-coherent and such that $\xi(v) \neq c$ for every vertex $v \in V(D_t)$ and $\xi$ can be reached from $\gamma_{i|D_t}$ by recolouring each vertex of $V(D_t) \setminus X_t \subseteq X_i$ at most once (when $i=0$, this sequence is empty). Note that the same recolouring sequence allows to go from $\gamma_i$ to the $(k+1)$-colouring $\gamma'_i$ (whose restriction to $D_t$ is $\xi$) by recolouring each vertex of $X_i$ at most once and so that $\gamma'_i(v) \neq c$ for all $v \in V(D_t)$. Then, we can go from $\gamma'_i$ to $\gamma_{i+1}$ by recolouring each vertex $w \in V(D_t)$ such that $w \sim_{(T, \mathcal{X})} v_{i+1}$ with colour $c$ (note that all the vertices that are recoloured at this phase are in $X_i$ except $v_{i+1}$). Then, $\gamma_{i+1}$ is $X_{i+1}$-coherent. Therefore, the induction properties hold for $i+1$.

At the end, we find the desired redicolouring sequence between $\alpha$ and $\beta$ in which the total number of recolourings is at most:

$$ \sum_{0 \le i \le n-1} (2|X_i| + 1) = \sum_{0 \le i \le n-1} (2i + 1) = n^2, $$
which concludes the proof.

Now the proof of Theorem 22 follows from Lemma 37 and Lemma 42.

**Theorem 22.** If $D = (V, A)$ is an $n$-vertex digraph with $\mathcal{D}w(D) \le k-1$, then $\text{diam}(\mathcal{D}_{k+1}(D)) \le 2(n^2+n)$.

*Proof.* Take $\alpha$ and $\beta$ two $k$-dicolourings. Let $(T, \mathcal{X})$ be a valid $\mathcal{D}$-decomposition of $D$ of width $k-1 \ge \mathcal{D}w(D)$. By Lemma 37, there is a redicolouring sequence from $\alpha$ (respectively $\beta$) to a dicolouring $\alpha'$ (respectively $\beta'$) that is $V$-coherent. Moreover, there is such a redicolouring sequence of length at most $n^2$. Then by Lemma 42, there is a redicolouring sequence between $\alpha'$ and $\beta'$ of length at most $2n$. Altogether, this gives a redicolouring sequence between $\alpha$ and $\beta$ of length at most $2(n^2+n)$.

Note that you can always build a valid $\mathcal{D}$-decomposition of width $k-1 \ge \mathcal{D}w(D)$ unless $k \ge |V(D)|+1$, in which case the result is easy to prove. □

# 8 Consequences on redicolouring planar digraphs and open questions

In this work, we generalized several evidences for Cereceda's conjecture to digraphs. In particular, our results give more support to Conjecture 9. One can consider the following question which, if true, would imply Conjectures 2 and 9.

**Question 43.** Let $k \in \mathbb{N}$ and $D$ be an $n$-vertex digraph such that $k \ge \delta_c^*(D)+2$. Is it true that $\text{diam}(\mathcal{D}_k(D)) = O(n^2)$?

Using Proposition 20, an analogue question is the following.

**Question 44.** Let $k \in \mathbb{N}$ and $D$ be an $n$-vertex digraph such that $k \ge \text{dtw}(D)+2$. Is it true that $\text{diam}(\mathcal{D}_k(D)) = O(n^2)$?

The same question remains open when we replace directed treewidth by DAG-width or Kelly-width. In every case, if true, it would give another generalisation of Theorem 7.

Note that Conjecture 9 implies Conjecture 2. We ask if the converse is true.

**Question 45.** Does proving Cereceda's conjecture for undirected graphs imply its analogue in digraphs?

Finally we pose a few questions on redicolouring planar digraphs. The girth of a graph is the size of a shortest cycle. The girth of a digraph is the girth of its underlying graph. Using Theorem 17, we know that every result on recolouring planar graphs extends to digraphs (up to a factor two). In particular, a number of results from [4, 10, 16, 18], that we recap in Table 2, remain true on digraphs (the table is taken from [4]).

<table><caption>Table 2: Bound on the diameter of $C_k(G)$ when $G$ is a planar graph with girth at least $g$. The value '$+\infty$' means that there exists a graph for which $C_k(G)$ is not connected, and the value '$< +\infty$' means that $C_k(G)$ is connected but no reasonable upper bound is known.</caption><thead><tr><th>k<br>g</th><th>4</th><th>5</th><th>6</th><th>7</th><th>9</th><th>≥ 10</th></tr></thead><tbody><tr><th>3</th><td>+∞</td><td>+∞</td><td>+∞</td><td>O(n<sup>6</sup>) [10]</td><td>O(n<sup>2</sup>) [10]</td><td>O(n) [15]</td></tr><tr><th>4</th><td>+∞</td><td>O(n<sup>4</sup>) [10]</td><td>O(n log<sup>3</sup> n) [18]</td><td>O(n) [16]</td><td>-</td><td>-</td></tr><tr><th>5</th><td>&lt; +∞ [4]</td><td>O(n log<sup>2</sup> n) [18]</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><th>6</th><td>O(n<sup>3</sup>) [10]</td><td>O(n) [4]</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><th>≥ 7</th><td>O(n log n) [18]</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr></tbody></table>
We ask if these results can be improved for oriented planar graphs (that means, planar digraphs with no digons). Using our results and some results of [9], we obtain bounds on the diameter of $D_k(\vec{G})$ when $\vec{G}$ is an oriented planar graph. We recap them in Table 3.

<table><caption>Table 3: Bound on the diameter of $D_k(\vec{G})$ when $\vec{G}$ is an oriented planar graph with girth at least $g$. The value '?' means that we do not know whether $D_k(\vec{G})$ is connected.</caption><thead><tr><th>k<br>g</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th></tr></thead><tbody><tr><th>3</th><td>+∞ [9]</td><td>?</td><td>O(n<sup>3</sup>) Th. 12</td><td>O(n log<sup>3</sup>(n)) Cor. 14</td><td>O(n) [9]</td></tr><tr><th>4</th><td>?</td><td>O(n<sup>2</sup>) [9]</td><td>O(n) [9]</td><td>-</td><td>-</td></tr><tr><th>5</th><td>&lt; +∞ [9]</td><td>O(n log(n)) Cor. 14</td><td>-</td><td>-</td><td>-</td></tr></tbody></table>

We finally ask for the missing values in Table 3.

**Question 46.** Is every oriented planar graph 3-mixing?

**Question 47.** Let $\vec{G}$ be an oriented planar graph with girth($\vec{G}$) $\ge 4$. Is it true that $\vec{G}$ is 2-mixing?

A famous conjecture by Neumann-Lara (see [2]) states that every oriented planar graph has dichromatic number at most two. As a partial result, one may explore following question which, if true, implies that Question 46 is a consequence of Neumann-Lara's conjecture.

**Question 48.** Let $\vec{G}$ be an oriented planar graph satisfying $\vec{\chi}(G) \le 2$. Is it true that $\vec{G}$ is 3-mixing?

## References

[1] Gabriela Araujo-Pardo, Juan José Montellano-Ballesteros, Mika Olsen, and Christian Rubio-Montiel. The digrundy number of digraphs. *Discrete Applied Mathematics*, 317:117–123, 2022.

[2] Jørgen Bang-Jensen and Gregory Z. Gutin. *Digraphs: Theory, Algorithms and Applications*. Springer-Verlag, London, 2nd edition, 2009.

[3] Valentin Bartier. *Combinatorial and Algorithmic aspects of Reconfiguration*. PhD thesis, Université Grenoble Alpes, 2021.

[4] Valentin Bartier, Nicolas Bousquet, Carl Feghali, Marc Heinrich, Benjamin Moore, and Théo Pierron. Recolouring planar graphs of girth at least five. *arXiv preprint arXiv:2112.00631*, 2021.

[5] Dietmar Berwanger, Anuj Dawar, Paul Hunter, Stephan Kreutzer, and Jan Obdržálek. The DAG-width of directed graphs. *Journal of Combinatorial Theory, Series B*, 102(4):900–923, 2012.

[6] Marthe Bonamy and Nicolas Bousquet. Recoloring graphs via tree decompositions. *European Journal of Combinatorics*, 69:200–213, 2018.

[7] Marthe Bonamy, Matthew Johnson, Ioannis Lignos, Viresh Patel, and Daniël Paulusma. Reconfiguration graphs for vertex colourings of chordal and chordal bipartite graphs. *Journal of Combinatorial Optimization*, 27(1):132–143, 2014.

[8] Paul Bonsma and Luis Cereceda. Finding paths between graph colourings: PSPACE-completeness and superpolynomial distances. *Theoretical Computer Science*, 410(50):5215–5226, 2009. Mathematical Foundations of Computer Science (MFCS 2007).
[9] Nicolas Bousquet, Frédéric Havet, Nicolas Nisse, Lucas Picasarri-Arrieta, and Amadeus Reinald. Digraph redicolouring. *arXiv preprint arXiv:2301.03417*, 2023.

[10] Nicolas Bousquet and Marc Heinrich. A polynomial version of Cereceda's conjecture. *Journal of Combinatorial Theory, Series B*, 155:1-16, 2022.

[11] Nicolas Bousquet and Guillem Perarnau. Fast recoloring of sparse graphs. *European Journal of Combinatorics*, 52:1-11, 2016.

[12] Luis Cereceda. *Mixing graph colourings*. PhD thesis, London School of Economics and Political Science, 2007.

[13] Luis Cereceda, Jan van den Heuvel, and Matthew Johnson. Mixing 3-colourings in bipartite graphs. *European Journal of Combinatorics*, 30(7):1593-1606, 2009.

[14] Luis Cereceda, Jan van den Heuvel, and Matthew Johnson. Finding paths between 3-colorings. *Journal of Graph Theory*, 67(1):69-82, 2011.

[15] Zdeněk Dvořák and Carl Feghali. An update on reconfiguring 10-colorings of planar graphs. *The Electronic Journal of Combinatorics*, 27(4), 2020.

[16] Zdeněk Dvořák and Carl Feghali. A Thomassen-type method for planar graph recoloring. *European Journal of Combinatorics*, 95:103319, 2021.

[17] Martin Dyer, Abraham D. Flaxman, Alan M. Frieze, and Eric Vigoda. Randomly coloring sparse random graphs with fewer colors than the maximum degree. *Random Structures & Algorithms*, 29(4):450-465, 2006.

[18] Carl Feghali. Reconfiguring colorings of graphs with bounded maximum average degree. *Journal of Combinatorial Theory, Series B*, 147:133-138, 2021.

[19] Carl Feghali, Matthew Johnson, and Daniël Paulusma. A reconfigurations analogue of Brooks' Theorem and its consequences. *Journal of Graph Theory*, 83(4):340-358, 2016.

[20] Jan van den Heuvel. *The complexity of change*, page 127-160. London Mathematical Society Lecture Note Series. Cambridge University Press, 2013.

[21] Paul Hunter and Stephan Kreutzer. Digraph measures: Kelly decompositions, games, and orderings. *Theoretical Computer Science*, 399(3):206-219, 2008.

[22] Thor Johnson, Neil Robertson, Paul D. Seymour, and Robin Thomas. Directed tree-width. *Journal of Combinatorial Theory, Series B*, 82(1):138-154, 2001.

[23] Victor Neumann-Lara. The dichromatic number of a digraph. *Journal of Combinatorial Theory, Series B*, 33:265-270, 1982.

[24] Naomi Nishimura. Introduction to reconfiguration. *Algorithms*, 11(4), 2018.

[25] Lucas Picasarri-Arrieta. Strengthening the Directed Brooks' Theorem for oriented graphs and consequences on digraph redicolouring. *arXiv preprint arXiv:2301.04881*, 2023.

[26] Bruce Reed. Introducing directed tree width. *Electronic Notes in Discrete Mathematics*, 3:222-229, 1999. 6th Twente Workshop on Graphs and Combinatorial Optimization.

[27] Mohammad Ali Safari. D-width: A more natural measure for directed tree width. In *Mathematical Foundations of Computer Science 2005: 30th International Symposium, MFCS 2005, Gdansk, Poland, August 29-September 2, 2005. Proceedings 30*, pages 745-756. Springer, 2005.

[28] Mohammad Ali Safari. *D-width, metric embedding, and their connections*. PhD thesis, University of British Columbia, 2007.