Keywords

1 Motivation and Preliminaries

In last decades, a social network graphs, describing relationship in real life, started to be very popular and present everywhere. Understanding key structural properties of large-scale data networks started to be crucial for analyzing and optimizing their performance, as well as improving their security. This topic has been attracting attention of many researches, recently (see [1, 6, 7, 11]). We consider one of problems connected with the decomposition of networks into smaller pieces fulfilling some structural properties. For example, we may desire that, for some security reason, the pieces are acyclic or even independent. This is because of in such a piece we can easily and effectively identify a node failure since the local structure around such a node in this piece is so clear that it can be easily tested using some classic algorithmic tools [11]. Sometimes, it is also desirable that the sizes of pieces are balanced. It helps us to maintain the whole communication network effectively. Such a problem can be modeled by minimization problems in graph theory, called an equitable vertex arboricity or an equitable vertex colourability of graphs. Sometimes we have some additional requirements on vertices/nodes that can be modeled by a list of available colours. So, we are interested in the list version, introduced by Kostochka, Pelsmajer and West [5] (an independent case), and by Zhang [10] (an acyclic case).

In colourability and arboricity models the properties of a network can be described in the language of the upper bound on the minimum degree, i.e. each colour class induces a graph whose each induced subgraph has the minimum degree bounded from above by zero or one, respectively. In the paper we consider the generalization of these models in which each colour class induces a graph whose each induced subgraph has the minimum degree bounded from above by some natural constant. Let \(\mathbb {N}_0 = \mathbb {N}\cup \{0\}\). For \(d\in \mathbb {N}_0\), the graph G is d-degenerate if \(\delta (H)\le d\) for any subgraph H of G, where \(\delta (H)\) denotes the minimum degree of H. The class of all d-degenerate graphs is denoted by \(\mathcal{D}_d\). In particular, \(\mathcal{D}_0\) is the class of all edgeless graphs and \(\mathcal{D}_1\) is the class of all forests. A \(\mathcal{D}_d\)-coloring is a mapping \(c:V(G)\rightarrow \mathbb {N}\) such that for each \(i\in \mathbb {N}\) the set of vertices coloured with i induces a d-degenerate graph. A list assignment L, for a graph G, is a mapping that assigns a nonempty subset of \(\mathbb {N}\) to each vertex \(v\in V(G)\). Given \(k\in \mathbb {N}\), a list assignment L is k-uniform if \(|L(v)|=k\) for every \(v\in V(G)\). A colouring \(c: V(G) \rightarrow \mathbb {N}\) such that \(c(v) \in L(v)\) for each \(v \in V(G)\) is called an L-colouring. Given \(d\in \mathbb {N}_0\), a graph G is \((L,{\mathcal D}_d)\)-colourable if there exists such an L-colouring \(c: V(G) \rightarrow \mathbb {N}\) that is also \(\mathcal{D}_d\)-coloring. Such a mapping c is called an \((L,{\mathcal D}_d)\)-colouring of G. If f is any function defined on the set X, then its restriction to Y, \(Y \subseteq X\), is denoted by \(f|_{Y}\). For a partially coloured graph G, let \(N_G^{col}(d,v)=\{w\in N_G(v): w\; \text {has}\; d \;\text {neighbors coloured with}\; c(v)\}\), where \(N_G(v)\) denotes the set of vertices of G adjacent to v. We refer the reader to [2] for terminology not defined in this paper.

Given \(k\in \mathbb {N}\) and \(d\in \mathbb {N}_0\), a graph G is equitably \((k,\mathcal{D}_d)\)-choosable if for any k-uniform list assignment L there is an \((L,{\mathcal D}_d)\)-colouring of G such that the size of any colour class does not exceed \(\left\lceil |V(G)|/k\right\rceil \). The notion of equitable \((k,\mathcal{D}_0)\)-choosability was introduced by Kostochka et al. [5] whereas the notation of equitable \((k,\mathcal{D}_1)\)-choosability was introduced by Zhang [10].

Let \(k,d\in \mathbb {N}\). A partition \(S_1\cup \cdots \cup S_{\eta +1}\) of V(G) is called a (kd)-partition of G if \(|S_1| \le k\), and \(|S_j|=k\) for \(j\in \{2, \ldots ,\eta +1\}\), and for each \(j\in \{2, \ldots ,\eta +1\}\), there is such an ordering \(\{x_1^j,\ldots ,x_k^j\}\) of vertices of \(S_j\) that

$$\begin{aligned} |N_G(x_i^j) \cap (S_1\cup \cdots \cup S_{j-1})| \le di-1, \end{aligned}$$
(1)

for every \(i\in \{1, \ldots ,k\}\). Observe that if \(S_1\cup \cdots \cup S_{\eta +1}\) is a (kd)-partition of G, then \(\eta +1=\left\lceil |V(G)|/k\right\rceil \). Moreover, immediately by the definition, each (kd)-partition of G is also its \((k,d+1)\)-partition. Surprisingly, the monotonicity of the (kd)-partition with respect to the parameter k is not so easy to analyze. We illustrate this fact by Example 1. Note that for integers kd the complexity of deciding whether G has a (kd)-partition is unknown. The main result of this paper is as follows.

Theorem 1

Let \(k,d,t\in \mathbb {N}\) and \(t\ge k\). If a graph G has a (kd)-partition, then it is equitably \((t,\mathcal{D}_{d-1})\)-choosable. Moreover, there is a polynomial-time algorithm that for any graph with a given (kd)-partition and for any t-uniform list assignment L returns an equitable \((L,\mathcal{D}_{d-1})\)-colouring of G.

The first statement of Theorem 1 generalizes the result obtained in [3] for \(d\in \{1,2\}\). In this paper we present an algorithm that confirms both, the first and second statements of Theorem 1 for all possible d. The algorithm, given in Sect. 2, for a given (kd)-partition of G with t-uniform list assignment L returns its equitable \((L,\mathcal {D}_{d-1})\)-colouring. Moreover, in Sect. 3 we give a polynomial-time algorithm that for a given 3-dimensional grid finds its (3, 2)-partition, what, in consequence, implies \((t,\mathcal {D}_1)\)-choosability of 3-dimensional grids for every \(t\ge 3\).

2 The Proof of Theorem 1

2.1 Background

For \(S\subseteq V(G)\) by \(G-S\) we denote a subgraph of G induced by \(V(G)\setminus S\). We start with a generalization of some results given in [5, 9, 10] for classes \(\mathcal{D}_0\) and \(\mathcal{D}_1\).

Proposition 1

Let \(k,d\in \mathbb N\) and let S be a set of distinct vertices \(x_1, \ldots ,x_k\) of a graph G. If \(G-S\) is equitably \((k,\mathcal{D}_{d-1})\)-choosable and

$$|N_G(x_i)\setminus S|\le di-1$$

holds for every \(i\in \{1, \ldots ,k\}\), then G is equitably \((k,\mathcal{D}_{d-1})\)-choosable.

Proof

Let L be a k-uniform list assignment for G and let c be an equitable \((L|_{V(G)\setminus S},\mathcal{D}_{d-1})\)-colouring of \(G-S\). Thus each colour class in c has the cardinality at most \(\left\lceil (|V(G)|-k)/k\right\rceil \) and induces in \(G-S\), and consequently in G, a graph from \(\mathcal{D}_{d-1}\). We extend c to \((V(G)\setminus S) \cup \{x_k\}\) by assigning to \(x_k\) a colour from \(L(x_k)\) that is used on vertices in \(N_G(x_k)\setminus S\) at most \(d-1\) times. Such a colour always exists because \(|N_G(x_k)\setminus S|\le dk-1 \hbox { and } |L(x_k)|=k.\) Next, we colour vertices \(x_{k-1}, \ldots , x_1\), sequentially, assigning to \(x_i\) a colour from its list that is different from colours of all vertices \(x_{i+1}, \ldots ,x_k\) and that is used at most \(d-1\) times in \(N_G(x_i)\setminus S\). Observe that there are at least i colours in \(L(x_i)\) that are different from \(c(x_{i+1}), \ldots ,c(x_{k})\), and, since \(|N_G(x_i)\setminus S|\le di-1\) for \(1 \le i \le k-1\), then such a choice of \(c(x_i)\) is always possible. Next, the colouring procedure forces that the cardinality of every colour class in the extended colouring c is at most \(\left\lceil |V(G)|/k\right\rceil \). Let \(G_i=G[(V(G)\setminus S)\cup \{x_{i}, \ldots ,x_k\}]\). It is easy to see that for each i each colour class in \(c|_{V(G_i)}\) induces a graph belonging to \(\mathcal{D}_{d-1}\), \(1 \le i\le k\). In particular this condition is satisfied for \(G_1\), i.e. for G. Hence c is an equitable \(( L,\mathcal{D}_{d-1})\)-colouring of G and G is equitably \((k,\mathcal{D}_{d-1})\)-choosable. \(\Box \)

Note that if a graph G has a (kd)-partition, then one can prove that G is equitably \((k,\mathcal{D}_{d-1})\)-choosable by applying Proposition 1 several times. In general, the equitable \((k,\mathcal{D}_{d-1})\)-choosability of G does not imply the equitable \((t,\mathcal{D}_{d-1})\)-choosability of G for \(t\ge k\). Unfortunately, if G has a (kd)-partition, then G may have neither a \((k+1,d)\)-partition nor a \((k-1,d)\)-partition. The infinite family of graphs defined in Example 1 confirms the last fact.

Example 1

Let \(q\in \mathbb {N}\) and let \({G_1,\ldots ,G_{2q+1}}\) be vertex-disjoint copies of \(K_6\) such that \(V(G_i)=\{v_1^i,\ldots ,v_6^i\}\) for \(i\in \{1, \ldots 2q+1\}\). Let G(q) (cf. Fig. 1) be the graph resulted by adding to \({G_1,\ldots ,G_{2q+1}}\) edges that join vertices of \(G_i\) with vertices of \(G_{i-1}\), \(i\in \{2,\ldots ,2q+1\}\), in the following way:

$$ \begin{array}{ll} \text {for } i \text { even:} &{}\text {for } i \text { odd:} \\ N_{G_{i-1}}(v_1^i)= \emptyset &{} N_{G_{i-1}}(v_1^i)=\{v_2^{i-1},v_3^{i-1},v_4^{i-1},v_5^{i-1},v_6^{i-1}\}\\ N_{G_{i-1}}(v_2^i)=\{v_1^{i-1}\} &{} N_{G_{i-1}}(v_2^i)=\{v_1^{i-1},v_4^{i-1},v_5^{i-1},v_6^{i-1}\}\\ N_{G_{i-1}}(v_3^i)=\{v_2^{i-1},v_3^{i-1}\}&{} N_{G_{i-1}}(v_3^i)=\{v_1^{i-1},v_2^{i-1},v_3^{i-1}\}\\ N_{G_{i-1}}(v_4^i)=\{v_1^{i-1},v_2^{i-1},v_3^{i-1}\} &{} N_{G_{i-1}}(v_4^i)=\{v_2^{i-1},v_3^{i-1}\}\\ N_{G_{i-1}}(v_5^i)=\{v_1^{i-1},v_4^{i-1},v_5^{i-1},v_6^{i-1}\} &{} N_{G_{i-1}}(v_5^i)=\{v_1^{i-1}\}\\ N_{G_{i-1}}(v_6^i)=\{v_2^{i-1},v_3^{i-1},v_4^{i-1},v_5^{i-1},v_6^{i-1}\}\ &{} N_{G_{i-1}}(v_6^i)=\emptyset \end{array} $$
Fig. 1.
figure 1

A draft of the graph G(2) from Example 1.

The construction of G(q) immediately implies that for every \(q\in \mathbb {N}\) the graph G(q) has a (6, 1)-partition. Also, observe that \(deg_{G(q)}(v)\ge 5\) for each vertex v of G(q). Suppose that G(q) has a (5, 1)-partition \(S_1\cup \cdots \cup S_{\eta +1}\) with \(S_{\eta +1}=\{x_1^{\eta +1}, \ldots ,x_5^{\eta +1}\}\) such that \(|N_{G(q)}(x_i^{\eta +1}) \cap (S_1\cup \cdots \cup S_{\eta })| \le i-1\). Thus \(|N_{G(q)}(x_1^{\eta +1}) \cap (S_1\cup \cdots \cup S_{\eta })| = 0\) and consequently \(deg_{G(q)}(x_1^{\eta +1})\le 4\), contradicting our previous observation. Hence, G(q) has no (5, 1)-partition. In [4] we show that G(q) has no (7, 1)-partition for \(q\ge 2\).

2.2 Algorithm

Now we are ready to present the algorithm that confirms both statements of Theorem 1. Note that Proposition 1 and the induction procedure could be used to prove the first statement of Theorem 1 for \(t=k\) but, this approach seems to be useless for \(t> k\), as we have observed in Example 1. Mudrock et al. [8] proved the lack of monotonicity for the equitable \((k,\mathcal {D}_0)\)-choosability with respect to the parameter k. It motivates our approach for solving the problem. To simplify understanding we give the main idea of the algorithm presented in the further part. It can be expressed in a few steps (see also Fig. 2):

  • on the base of the given (kd)-partition \(S_1\cup \cdots \cup S_{\eta +1}\) of G, we create the list S, consisting of the elements from V(G), whose order corresponds to the order in which the colouring is expanded to successive vertices in each \(S_j\) (cf. the proof of Proposition 1);

  • let \(|V(G)|=\beta t +r_2\), \(1 \le r_2 \le t\); we colour \(r_2\) vertices from the beginning of S taking into account the lists of available colours; we delete the colour assigned to v from the lists of available colours for vertices from \(N^{col}_G(d,v)\);

  • let \(|V(G)|=\beta (\gamma k +r)+r_2=\beta \gamma k+ (\rho k +x) +r_2\); observe that \(r \equiv t \pmod k\) and \(\rho k +x\equiv 0 \pmod r\); we colour \(\rho k +x\) vertices taking into account the lists of available colours in such a way that every sublist of length k is formed by vertices coloured differently (consequently, every sublist of length r is coloured differently); we divide the vertices colored here into \(\beta \) sets each one of cardinality r; we delete c(v) from the lists of vertices from \(N^{col}_G(d,v)\);

  • we extend the list colouring into the uncoloured \(\beta \gamma k\) vertices by colouring \(\beta \) groups of \(\gamma k\) vertices; first, we associate each group of \(\gamma k\) vertices with a set of r vertices coloured in the previous step (for different groups these sets are disjoint); next, we color the vertices of each of the group using \(\gamma k\) different colors that are also different from the colors of r vertices of the set associated with this group;

  • our final equitable list colouring is the consequence of a partition of V(G) into \(\beta +1\) coloured sets, each one of size at most t and each one formed by vertices coloured differently.

Fig. 2.
figure 2

An exemplary illustration of the input of Equitable \((L,\mathcal{D}_{d-1})\)-colouring.

figure a
Fig. 3.
figure 3

An exemplary graph G depicted in Example 2 with an exemplary colouring returned by Equitable \((L,\mathcal{D}_{d-1})\)-colouring(G).

figure b
figure c
figure d
figure e

Now we illustrate Equitable \((L,\mathcal{D}_{d-1})\)-colouring using a graph from Example 2.

Example 2

Let \(G_1,G_2\) be two vertex-disjoint copies of \(K_5\) and \(V(G_i)=\{v_1^i,\ldots ,\) \(v_5^i\}\) for \(i\in \{1,2\}\). We join every vertex \(v_j^2\) to \(v_j^1,v_{j+1}^1, \ldots , v_5^1\) for \(j\in \{1,2,3,4,5\}\). Next, we add a vertex \(w^i_j\) and join it with \(v^i_j\) for \(i\in \{1,2\}\;j\in \{1,2,3,4,5\}\). In addition, we join \(w^i_j\) to arbitrary two vertices in \(\{v^q_p:(q<i)\vee (q=i\wedge p<j)\}\cup \{w^q_p:(q<i)\vee (q=i\wedge p<j)\}\), \(i\in \{2,3,4,5\}\;j\in \{1,2\}\). Let G be a resulted graph. Observe that \(|V(G)|=20\) and the partition \(S_1\cup S_2\cup \ldots \cup S_{10}\) of V(G) such that \(S_{p+1}\) \(=\{v^{s+1}_{r+1},w^{s+1}_{r+1}\}\) for \(p\in \{0,\ldots , 9\}\), where \(s=\left\lfloor \frac{p}{5}\right\rfloor , r\equiv p \pmod 5\) is a (2, 3)-partition of G.

For the purpose of Example 2, we assume the following 3-uniform list assignment for the graph from Fig. 3: \(L(v^i_j)=\{1,2,3\}\), for \(i\in \{1,2,3,4\}\), \(L(w^1_j)=\{2,3,4\}\), and \(L(w^2_j)=\{1,2,4\}\), \(j\in \{1,2,3,4,5\}\), while given (2, 3)-partition of G is: \(S_p=\{w^{s+1}_{r+1},v^{s+1}_{r+1}\}\), where \(s=\left\lfloor \frac{p}{5}\right\rfloor , r\equiv p \pmod 5\), \(p\in [10]\).

Thus Equitable \((L,\mathcal{D}_{d-1})\)-colouring returns equitable \((L,\mathcal {D}_2)\)-coloring of G. Note, that \(20=|V(G)|=\eta \cdot k+r_1=9\cdot 2 +2\). While on the other hand, we have \(20=|V(G)|=\beta \cdot t +r_2=6 \cdot 3+2\). Observe that \(x=0\). When we colour a vertex, we always choose the first colour on its list. The list S determined in lines 3–5 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring and the colours assigned to first part of vertices of S (lines 18–24) are as follows:

$$ \begin{array}{rc|c|c} S=&{}(v_1^1,w_1^1,&{} v_2^1,w_2^1,v_3^1,w_3^1,v_4^1,w_4^1,&{}v_5^1,w_5^1,v_1^2,w_1^2,\ldots ,v_5^2,w_5^2) \\ &{}r_2 &{}\rho k&{}\beta \gamma k\\ \text { colours: } &{} 1 \ \ \ 2 &{} 1\ \ \ 2\ \ \ 1^*\ \ \ 2\ \ \ 2\ \ \ 3\ \ &{} \\ \end{array} $$

\(^*\): after colouring \(v_3^1\) with 1, \(L(v_1^2)=\{2,3\}\) - the result of line 3 in colour_Vertex.

List \(S_{col}\) after Reorder(\(S_{col}\)): \((v_2^1,w_2^1,v_3^1,w_3^1,w_4^1,v_4^1)\) with corresponding colours: (1, 2, 1, 2, 3, 2).

$$ \begin{array}{*{13}c} \overline{S}= &{} (v_5^1, &{}w_5^1, &{} v_1^2, &{} w_1^2,&{} v_2^2, &{} w_2^2,&{} v_3^2, &{} w_3^2,&{} v_4^2, &{} w_4^2,&{} v_5^2, &{}w_5^2) \\ \hline \mathrm {lists\ after} &{} 2&{} 2&{} 3 &{} 1&{} 2&{} 2&{} 1&{} 1&{} 1&{} 1&{} 1&{} 1 \\ \mathrm {procedure} &{} 3 &{} 3 &{} &{} 4 &{}3 &{} 4 &{} 3 &{} 4 &{} 2 &{} 2 &{} 3 &{} 4 \\ \textsc {Modify\_colourList}&{} &{} 4 &{} &{} &{} &{} &{} &{} &{} &{} 4 &{} &{} \\ \hline \mathrm{final}\ c(v) &{} 2 &{} 3 &{} 3 &{} 1 &{} 2 &{} 4 &{} 1 &{} 4 &{} 1 &{} 2 &{} 1&{}4\\ \end{array} $$

To prove the correctness of the Equitable \((L,\mathcal{D}_{d-1})\)-colouring algorithm, we give some observations and lemmas.

Observation 2

The colour function c returned by the Equitable \((L,\mathcal{D}_{d-1})\)-colouring algorithm is constructed step by step. In each step, c(v) is a result of colour_Vertex(v) and this value is not changed further.

Observation 3

The list assignment L, as a part of the input of Equitable \((L,\mathcal{D}_{d-1})\)-colouring, is modified for a vertex v by colour_List or by Modify_colourLists.

Lemma 1

Every time when Equitable \((L,\mathcal{D}_{d-1})\)-colouring(G) calls colour_ Vertex(v), \(L(v) \ne \emptyset \) holds, i.e. colour_Vertex(v) is always executable.

Proof

Note that colour_Vertex is called by colour_List. Let

\(R=\{v\in V(G): \textsc {colour\_Vertex}{(v)}\) is called when \(\textsc {colour\_List}(L_R,r_2)\) in line 15 of \(\textsc {Equitable}\,(L,\mathcal{D}_{d-1})\)-colouring is executed\(\}\),

\(X=\{v\in V(G): \textsc {colour\_Vertex}{(v)}\) is called when \(\textsc {colour\_List}(L_X,x)\) in line 18 of \(\textsc {Equitable}\,(L,\mathcal{D}_{d-1})\)-colouring is executed\(\}\).

Let \(V_1:=S_1\cup \cdots \cup S_{\eta +1-\beta \gamma }\), \(V_2:=V(G)\setminus V_1=S_{\eta +1-(\beta \gamma -1)}\cup \cdots \cup S_{\eta +1}\). Note that

\(V_1\setminus (R \cup X)=\{v\in V(G):\) colour_Vertex(v) is called when colour_List\((S',k)\) in line 22 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring is executed\(\}\)

\(V_2=\{v\in V(G): \textsc {colour\_Vertex}{(v)}\) is called when \(\textsc {colour\_List}(S,\gamma k)\) in line 28 of \(\textsc {Equitable}\,(L,\mathcal{D}_{d-1})\)-colouring is executed\(\}\).

Observe that \(|R|=r_2,|X|=x, |V_1\setminus (R\cup X)|=\rho k, |V_2|=\beta \gamma k\).

Case 1. \(v\in R\).

In this case, the vertex v is coloured by colour_List(\(L_R,r_2\)) in line 15 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring. Since \(|R|=r_2\), the while loop in line 2 of colour_List is executed only once. The while loop in line 5 of colour_List is executed \(r_2\) times. Suppose, v is a vertex such that colour_Vertex(v) is called in the i-th execution of the while loop in line 5 of colour_List. By Observation 3, the fact that Equitable \((L,\mathcal{D}_{d-1})\)-colouring has not called Modify_colourLists so far, and because it is the first time when colour_List works, we have \(|C|=i-1\), and \(L(v)\setminus C\) is the current list of v. Since \(t\ge r_2\), the list of v is non-empty.

Case 2. \(v\in X\).

This time, the vertex v is coloured by colour_List(\(L_X,x\)) called in line 18 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring. Similarly as in Case 1, the while loop in line 2 of colour_List is executed only once and the while loop in line 5 of colour_List is executed x times. Suppose that v is a vertex such that colour_Vertex(v) is called in the i-th iteration of the while loop in line 5 of colour_List. Observe that properties of the (kd)-partition \(S_1\cup \cdots \cup S_{\eta +1}\) of G (given as the input of Equitable \((L,\mathcal{D}_{d-1})\)-colouring) and the Reverse procedure from line 4 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring imply that v has at most \((x-i+1)d-1+(k-x)\) neighbors w for which colour_Vertex(w) was executed earlier than colour_List(\(L_X,x\)). More precisely, by the definition of the (kd)-partition, v has at most \((x-i+1)d-1\) neighbours in \(R\setminus Y\), where Y consists of the last \(k-x\) vertices w for which colour_Vertex(wd) is executed, being called by colour_List(\(L_R,r_2\)). Thus, at most \(k-i\) colours were deleted from L(v) before colour_List(\(L_X,x\)) began. If the while loop in line 5 of colour_List is called for the i-th time, then \(|C|=i-1\) and so, from the current list L(v) at most \(i-1\) elements were deleted. Furthermore, Equitable \((L,\mathcal{D}_{d-1})\)-colouring has not called Modify_colourLists so far. Thus the current size of L(v) is at least \(t-k+1\), by Observation 3. Since \(t\ge k\), the list of v is non-empty.

In a similar way we prove the remaining two cases, namely when \(v\in V_1\setminus (R\cup X)\) or \(v\in V_2\). The full proof is given in [4].\(\Box \)

Lemma 2

An output of Equitable \((L,\mathcal{D}_{d-1})\)-colouring(G) is an \((L,\mathcal{D}_{d-1})\)-colouring of G.

Proof

We will show that if colour_Vertex(v) is executed, then an output c(v) has always the following property. For each subgraph H of G induced by vertices x for which colour_Vertex(x) was executed so far with the output \(c(x)=c(v)\), the condition \(\delta (H)\le d-1\) holds. By Observation 2 and Lemma 1, it will imply that an output c of Equitable \((L,\mathcal{D}_{d-1})\) -colouring is an \((L,\mathcal{D}_{d-1})\)-colouring of G. Note that it is enough to show this fact for H satisfying \(v\in V(H)\). By a contradiction, let v be a vertex for which the output c(v) does not satisfy the condition, i.e. v has at least d neighbors in the set of vertices for which colour_Vertex was already executed with the output c(v). But it is not possible because c(v) was removed from L(v) when the last (in the sense of the algorithm steps) of the neighbors of v, say x, obtained the colour c(v) (colour_Vertex(x) removed c(x) from L(v) since \(v\in N_G^{col}(d,x)\)). \(\Box \)

Lemma 3

An output colour function c of Equitable \((L,\mathcal{D}_{d-1})\)-colouring(G) satisfies \(|C_i|\le \left\lceil |V(G)|/t\right\rceil \), where t is the part of the input of Equitable \((L,\mathcal{D}_{d-1})\)-colouring(G) and \(C_i=\{v\in V(G): c(v)=i\}\).

Proof

Recall that \(\left\lceil |V(G)|/t\right\rceil =\beta +1\). We will show that there exists a partition of V(G) into \(\beta +1\) sets, say \(W_1\cup \cdots \cup W_{\beta +1}\), such that for each \(i\in \{1, \ldots ,\beta +1\}\) any two vertices xy in \(W_i\) satisfy \(c(x)\ne c(y)\). It will imply that the cardinality of every colour class in c is at most \(\beta +1\), giving the assertion.

Note that after the last, \(\rho \)-th execution of the for lopp in line 20 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring the list \(S_{col}\) consists of the coloured vertices of the set \(V_1\setminus R\) (observe that \(|V_1\setminus R|=\beta r\)). The elements of \(S_{col}\) are ordered in such a way that the first x ones have different colours and for every \(i\in \{1, \ldots ,\rho \}\) the i-th next k elements have different colours. Now the Reorder(\(S_{col}\)) procedure in line 25 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring changes the ordering of elements of \(S_{col}\) in such a way that every k consecutive elements have different colours. Since \(r \in \{0,\ldots ,k-1\}\), it follows that also every r consecutive elements of this list have different colours. The execution of Reorder(\(S_{col}\)) is always possible because of the previous assumptions on \(S_{col}\).

For \(i\in \{1, \ldots ,\beta \}\) let \(H_i=S_{\eta +1-((\beta -i+1)\gamma -1)}\cup S_{\eta +1-((\beta -i+1)\gamma -2)}\cup \cdots \cup S_{\eta +1-(\beta -i)\gamma }\). Thus \(H_1\cup \cdots \cup H_{\beta }\) is a partition of \(V_2\) into \(\beta \) sets, each of the cardinality \(\gamma k\). Note that the vertices of \(H_i\) are coloured when colour_List(\(S,\gamma k\)) in line 28 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring is executed. More precisely, it is during the i-th execution of the while loop in line 2 of colour_List. It guarantees that the vertices of \(H_i\) obtain pairwise different colours. Moreover, in line 27 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring the lists of vertices of \(H_i\) were modified in such a way that the colours of i-th r elements from the current list \(S_{col}\) are removed from the list of each element in \(H_i\). Hence, after the execution of colour_List(\(S,\gamma k\)) in line 28 of Equitable \((L,\mathcal{D}_{d-1})\)-colouring the elements in \(H_i\) obtain colours that are pairwise different and also different from all the colours of i-th r elements from the list \(S_{col}\) (recall that \(S_{col}\) consists of the ordered vertices of \(V_1\setminus R\)). Hence, for every \(i\in \{1, \ldots ,\beta \}\) the elements of \(H_i\) and the i-th r elements of \(S_{col}\) have pairwise different colours in c and can constitute \(W_i\). Moreover, the elements of R constitute \(W_{\beta +1}\). Thus \(|W_{\beta +1}|=r_2\), which finishes the proof.\(\Box \)

Theorem 4

For a given graph G on n vertices, a t-uniform list assignment L, a (kd))-partition of G the Equitable \((L,\mathcal{D}_{d-1})\)-colouring(G) algorithm returns \((L,\mathcal{D}_{d-1})\)-colouring of G in polynomial time.\(\Box \)

The full analysis of the computational complexity of the algorithm is given in [4].

3 Grids

Given two graphs \(G_1\) and \(G_2\), the Cartesian product of \(G_1\) and \(G_2\), \(G_1\,\square \,G_2\), is defined to be a graph whose the vertex set is \(V(G_1) \times V(G_2)\) and the edge set consists of all edges joining vertices \((x_1,y_1)\) and \((x_2,y_2)\) when either \(x_1=x_2\) and \(y_1y_2 \in E(G_2)\) or \(y_1=y_2\) and \(x_1x_2\in E(G_1)\). Note that the Cartesian product is commutative and associative. Hence the graph \(G_1 \square \cdots \square G_d\) is unambiguously defined for any \(d \in \mathbb {N}\). Let \(P_n\) denote a path on n vertices. If each factor \(G_i\) is a path on at least two vertices then \(G_1 \square \cdots \square G_d\) is a d-dimensional grid. Note that the d-dimensional grid \(P_{n_1}\square \cdots \square P_{n_d}\), \(d \ge 3\), may be considered as \(n_1\) layers and each layer is the \((d-1)\)-dimensional grid \(P_{n_2}\square \cdots \square P_{n_d}\). We assume \(n_1 \ge \cdots \ge n_d\). Let \(P_{n_1} \sqsupset \ldots \sqsupset P_{n_d}\) denote an incomplete d-dimensional grid, i.e. a connected graph being a subgraph of \(P_{n_1} \square \ldots \square P_{n_d}\) such that its some initial layers may be empty, the first non-empty layer may be incomplete, while any next layer is complete. Note that every grid is particular incomplete grid.

In this subsection we construct a polynomial-time algorithm that for each 3-dimensional grid finds its (3, 2)-partition (Partition3d(G)). Application of Theorem 1 implies the main result of this subsection.

figure f
figure g

Theorem 5

Let \(t\ge 3\) be an integer. Every 3-dimensional grid is equitably \((t,\mathcal{D}_1)\)-choosable. Moreover, there is a polynomial-time algorithm that for every t-uniform list assignment L of the 3-dimensional grid G returns an equitable \((L,\mathcal{D}_{1})\)-colouring of G. \(\Box \)

Theorem 6

For a given 3-dimensional grid G the Partition3d(G) algorithm returns a (3, 2)-partition of G in polynomial-time.

The proof of Theorem 6 is presented in [4]. As a consequence of the above theorem and Theorem 1 we get the statement of Theorem 5.

4 Concluding Remarks

In Subsect. 2.2 we have proposed the polynomial-time algorithm that finds an equitable \((L,\mathcal{D}_{d-1})\)-colouring of a given graph G assuming that we know a (kd)-partition of G (L is a t-uniform list assignment for G, \(t\ge k\)). In this context the following open question seems to be interesting: What is the complexity of recognition of graphs having a (kd)-partition?