1 Introduction

All graphs considered in this paper are finite and simple. Let G be a graph with vertex set V(G), edge set E(G), maximum degree \(\Delta (G)\), and minimum degree \(\delta (G)\). Let \(N_G(v)\) denote the set of neighbors of a vertex v in G, and let \(d_G(v)=|N_G(v)|\) denote the degree of v in G. A vertex of degree k (at most k, at least k, resp.) is called a k-vertex (\(k^-\)-vertex, \(k^+\)-vertex, resp.). The distance, denoted by d(uv) between two vertices u and v is the length of a shortest path connecting them. If no confusion arises, we abbreviate \(\Delta (G)\) to \(\Delta \).

A proper edge k-coloring of a graph G is a mapping \(\phi : E(G)\rightarrow \{1,2,\ldots ,k\}\) such that \(\phi (e)\ne \phi (e')\) for any two adjacent edges e and \(e'\). The chromatic index, denoted \(\chi '(G)\), of a graph G is the smallest integer k such that G has a proper edge k-coloring. For a vertex \(v\in V(G)\), let \(C_{\phi }(v)\) denote the set of colors assigned to the edges incident to v, that is,

$$\begin{aligned} C_{\phi }(v)=\{\phi (uv)| uv\in E(G)\}. \end{aligned}$$

The coloring \(\phi \) is called 2-distance vertex-distinguishing (or a 2DVDE-coloring, in short) if \(C_{\phi }(u)\ne C_{\phi }(v)\) for any pair of vertices u and v with \(d (u,v)=2\). Let \(\chi '_{\mathrm{d2}}(G)\) denote the 2-distance vertex-distinguishing index of G, which is the smallest integer k such that G has a 2DVDE-coloring using k colors.

The 2-distance vertex-distinguishing edge coloring of graphs can be thought of as a special case of the r-strong edge coloring of graphs, see [1]. Let \(r\ge 1\) be an integer. The r-strong chromatic index\(\chi '_{\mathrm{s}}(G,r)\) of a graph G is the minimum number of colors required for a proper edge coloring of G such that any two vertices u and v with \(d(u,v)\le r\) have \(C_{\phi }(x)\ne C_{\phi }(y)\). In particular, when \(r=1\), we have \(\chi '_s(G,1)=\chi '_a(G)\), which is called the neighbor-distinguishing index of G. Zhang, Liu, and Wang [12] first investigated this parameter and proposed the following conjecture:

Conjecture 1

If G is a graph different from a 5-cycle, then \(\chi '_{\mathrm{a}}(G)\le \Delta +2\).

Balister et al. [2] confirmed Conjecture 1 for bipartite graphs and subcubic graphs. Using a probabilistic analysis, Hatami [3] showed that every graph G with \(\Delta >10^{20}\) has \(\chi '_{\mathrm{a}}(G)\le \Delta +300\). Akbari et al. [1] proved that every graph G satisfies \(\chi '_{\mathrm{a}}(G)\le 3\Delta \). Zhang et al. [11] proved that every graph G has \(\chi '_{\mathrm{a}}(G)\le 2.5(\Delta +2)\). Wang et al. [9] improved these upper bounds to \(\chi '_{\mathrm{a}}(G)\le 2.5\Delta \) if \(\Delta \ge 7\), and to \(\chi '_{\mathrm{a}}(G)\le 2\Delta \) if \(\Delta \le 6\). The currently best known upper bound that \(\chi '_{\mathrm{a}}(G)\le 2\Delta +2\) for any graph G was obtained by Vučković [6].

It follows from the definition that \(\chi '_{\mathrm{d2}}(G)\ge \chi '(G)\ge \Delta \), and moreover \(\chi '_{\mathrm{d2}}(G)\ge \Delta +1\) if G contains two vertices of maximum degree at distance 2. The 2-distance vertex-distinguishing index for special graphs such as cycles, paths, trees, complete graphs, complete bipartite graphs, and unicycle graphs has been determined in [8]. Using an algorithmic analysis, Wang et al. [7] proved that every outerplanar graph G satisfies \(\chi '_{\mathrm{d2}}(G)\le \Delta +8\). Additionally, it was shown in [4] that if G is a bipartite outerplanar graph, then \(\chi '_{\mathrm{d2}}(G)\le \Delta +2\).

A cubic graph is a 3-regular graph, and a subcubic graph is a graph of maximum degree at most 3. The maximum average degree of a graph G is defined as

$$\begin{aligned} \mathrm{mad}(G)=\max \left\{ \frac{2|E(H)|}{|V(H)|}\ |\ H \subseteq G\right\} . \end{aligned}$$

Very recently, Victor et al. [5] showed that every subcubic graph G satisfies \(\chi '_{\mathrm{d2}}(G)\le 6\), and raised the following conjecture:

Conjecture 2

For a subcubic graph G, \(\chi '_{\mathrm{d2}}(G)\le 5\).

Note that if Conjecture 2 were true, then the upper bound 5 is tight. In this paper, we confirm partially this conjecture by showing the following result:

Theorem 1

If H is a subcubic graph with mad\((H)<\frac{8}{3}\), then \(\chi '_{\mathrm{d2}}(H)\le 5\).

To prove Theorem 1, we need to apply repeatedly the following easy fact (see [10]):

Lemma 2

Let G be a graph.

  1. (1)

    If v is a leaf of G, then mad\((G-v)\le \) mad(G).

  2. (2)

    If e is an edge of G, then mad\((G-e)\le \) mad(G).

Let G be a subcubic graph and v be a 3-vertex of G. For \(0\le i\le 3\), v is called a \(3_i\)-vertex if v is adjacent to exactly i 2-vertices. For a subgraph H of G and a 2DVDE-coloring \(\phi \) of H, we say, in short, that \(\phi \) is a legal coloring of H. Two vertices \(u,v\in V(G)\) with \(d(u,v)=2\) are called conflict with respect to the coloring \(\phi \) if \(C_{\phi }(u)=C_{\phi }(v)\).

2 Proof of Theorem 1

The proof is by contradiction. Let H be a minimum counterexample that minimizes \(|E(H)|+|V(H)|\). Then, \(\Delta (H)\le 3\), mad\((H) < \frac{8}{3}\), and \(\chi '_{\mathrm{d2}}(H) > 5\). It is easy to note that H is connected, for otherwise by the minimality of H, we can 5-2DVDE-color independently each connected component of H using the same set of colors and consider the resulting coloring as a 5-2DVDE-coloring of H. Let \(H'\) denote the graph obtained by deleting all 1-vertices of H. Then, \(H'\) is clearly connected, \(\Delta (H') \le 3\), and mad\((H') \le \mathrm{mad}(H) < \frac{8}{3}\) by Lemma 2. Moreover, by the minimality of H, any of its subgraph obtained by edge deletion can be legally colored with at most five colors. We first list some structural properties of \(H'\). In the subsequent proofs, we routinely construct 5-2DVDE-colorings of H without verifying in detail that H is legally-5-colored since this can be supplied in a straightforward manner. In the following, we always let \(C=\{1,2,\ldots ,5\}\) denote a set of five colors. Given a 5-2DVDE-coloring \(\phi \) of a subgraph G of H using the color set C, for a vertex \(v\in V(G)\), we denote simply \(C_{\phi }(v)\) by C(v).

Claim 1

\(\delta (H') \ge 2\).

Proof

Suppose to the contrary that \(\delta (H') \le 1\). If \(\delta (H') = 0\), then \(H'\) is isomorphic to \(K_1\) and so H is isomorphic to the star \(K_{1,n-1}\) with \(|V(H)|=n\). Obviously, we can color the edges of \(K_{1,n-1}\) with distinct colors, so \(\chi '_{\mathrm{d2}}(H) = \Delta (H) \le 3\), which contradicts the hypothesis on H. Assume that \(\delta (H') = 1\), and let u be a 1-vertex of \(H'\) adjacent to a vertex v. Then, \(d_H(u) \in \{2,3\}\), let \(u_1\) be another neighbor of u different from v in H, and let \(G = H - uu_1\). By the minimally of H, G has a 5-2DVDE-coloring \(\phi \) using the color set C. Observe that \(|C(u) \cup C(v)| \le 4\) since \(d_H(v) \le 3\) and v is adjacent to u. Therefore, to extend \(\phi \) to H, it suffices to color \(uu_1\) with a color in \(C-C(u) - C(v)\). This contradicts the choice of H. \(\square \)

Claim 2

\(H'\) contains no two adjacent 2-vertices.

Proof

Suppose to the contrary that \(H'\) contains two adjacent 2-vertices u and v. Let \(N_{H'}(u)= \{v, u_1\}\) and \(N_{H'}(v)= \{u, v_1\}\). Then, \(d_H(u)\), \(d_H(v) \in \{2,3\}\). We discuss the following two cases by symmetry.

Case 1.\(d_H(u)=d_H(v)=2\).

Consider the graph \(G = H - uv\). By the minimally of H, G has a 5-2DVDE-coloring \(\phi \) using the color set C. We assume that uv cannot be colored with any color in C. Therefore, at least one of \(u_1\) and \(v_1\) is a 3-vertex; otherwise, we color uv with a color in \(C - C(u_1) -C(v_1)\). Without loss of generality, assume that \(d_G(u_1) = 3\), \(N_{G}(u_1)=\{u,u_2,u_3\}\), and \(C(u_1) = \{1,2,3\}\) such that \(\phi (uu_1)= 1\) and \(\phi (u_1u_2)= 2\). We discuss two possibilities:

  • Let \(d_{G}(v_1)=2\), say \(N_G(v_1)=\{v,v_2\}\). If \(d_G(v_2)=2\), then the proof is reduced to the previous case by replacing uv with \(vv_1\). Otherwise, \(d_G(v_2)=3\), we may color uv with a color in \(\{4,5\}-\{\phi (vv_1)\}\). This contradicts the assumption that uv cannot be colored.

  • Let \(d_{G}(v_1)=3\), say \(N_H(v_1)=\{v,v_2, v_3\}\). First assume that at least two of \(u_2, u_3, v_2, v_3\) are 3-vertices. By symmetry, we have the following two possibilities. If \(d_{G}(u_2)=d_{G}(u_3)=3\), then we color uv with a color in \(\{2,3,4,5\}- C(v_1)\). If \(d_{G}(u_2)=d_{G}(v_2)=3\), then we color uv with a color in \(\{2,4,5\} - \{\phi (vv_1),\phi (v_1v_3)\}\). Next assume that at most one of \(u_2, u_3, v_2,v_3\) is of degree 3, say, \(d_{G}(u_2)= d_{G}(u_3)= d_{G}(v_2)=2\) and \(2\le d_{G}(v_3)\le 3\). It is easy to see that \(\{4,5\} \subset C(v_1)\) because uv can not be legally colored.

First suppose that \(d_{G}(v_3)= 2\). If \(\phi (vv_1) = 2\), then \(\phi (v_1v_2) = 4\) and \(\phi (v_1v_3) = 5\). It follows that \(C(u_2) = \{1,2\}\), \(C(u_3) = \{1,3\}\), \(C(v_2) = \{2,4\}\), and \(C(v_3) = \{2,5\}\). It suffices to recolor \(vv_1\) with 1 and color uv with 4. If \(\phi (vv_1) \in \{1,3\}\), we have a similar discussion. So assume that \(\phi (vv_1) \in \{4,5\}\), say \(\phi (vv_1)=4\). Then, \(C(u_2) = \{1,2\}\) and \(C(u_3) = \{1,3\}\). Without loss of generality, assume that \(\phi (v_1v_3)=5\) and so \(\phi (v_1v_2)\in \{1,2,3\}\). Let z be the other neighbor of \(v_3\) different from \(v_1\). Then, we must have \(\phi (zv_3)=4\). Now we recolor \(uu_1\) with 4 and color uv with a color in \(\{1,2,3\}\) such that v does not conflict with \(v_2\).

Next suppose that \(d_{G}(v_3)= 3\). A similar and easier proof can be established.

Case 2.\(d_H(u)=3\) and \(d_H(v)\in \{2,3\}\).

Let \(N_H(u)=\{v, u_1, x\}\) with \(d_H(x)=1\). If \(d_H(v)=3\), then we furthermore assume that \(N_H(v)=\{u, v_1, y\}\) with \(d_H(y)=1\). Consider the graph \(G = H - ux\). By the minimality of H, G has a 5-2DVDE-coloring \(\phi \) using the color set C. Assume that ux cannot be colored with any color in C. We have to consider two cases as follows.

Assume that \(u_1\) is a 2-vertex of G. Then, \(N_{G}(u_1)=\{u,u_2\}\). If \(u_2\) is a 2-vertex, then we can color ux with a color in \(C - C(u_1) -\{\phi (uv),\phi (vv_1)\}\), which is a contradiction. Otherwise, \(u_2\) is a 3-vertex. If \(\phi (uv)\ne \phi (u_1u_2)\), then we color ux with a color in \(C - C(u_1) -\{\phi (uv),\phi (vv_1)\}\). If \(\phi (uv)=\phi (u_1u_2)\), then \(C - C(u_1) -\{\phi (uv),\phi (vv_1)\}\) contains at least two colors, so that we can choose one of them to color ux.

Assume that \(d_G(u_1)=3\) and \(N_{G}(u_1)=\{u,u_2,u_3\}\). If \(d_G(v_1)=2\), then we color ux with a color in \(C - C(u_1) - \{\phi (uv)\}\). Thus, assume that \(d_G(v_1)=3\). Without loss of generality, we may assume that \(\phi (uv)= 1\), \(\phi (uu_1)= 2\), \(C(u_2) = \{1,2,4\}\), \(C(u_3) = \{1,2,3\}\), and \(C(v_1) = \{1,2,5\}\). There are two possibilities to be handled.

  • Let \(d_H(v)=2\). If \(C(u_1) = \{2,3,4\}\), it suffices to recolor \(uu_1\) with 5 and color ux with 4. So assume that \(C(u_1) = \{1,2,4\}\), and hence, it suffices to recolor uv with 4 and color ux with 5.

  • Let \(d_H(v)=3\). Then, \(N_G(v)=\{u,y,v_1\}\). Let \(N_G(v_1)=\{v, v_2, v_3\}\). If \(C(u_1) = \{2,3,4\}\), then we recolor \(uu_1\) with 5 and color ux with 4. So assume that \(C(u_1) = \{1,2,4\}\) by symmetry. Note that \(\phi (vv_1)\in \{2,5\}\). If \(\phi (vv_1) = 2\), then it follows immediately that \(\phi (vy) \in \{3,5\}\), we switch the colors of vy and vu and color ux with 4. Now suppose that \(\phi (vv_1) = 5\), and furthermore, let \(\phi (v_1v_2) = 2\). Then, \(\phi (vy) \in \{2,3,4\}\). If \(\phi (vy) = 2\), then we recolor vu with 3 or 4 such that v does not conflict with \(v_2\), and color ux with 5. If \(\phi (vy) \in \{3,4\}\), then after switching the colors of vy and vu, we color ux with 5. \(\square \)

The proof of Claims 35 below will be given in the subsequent sections.

Claim 3

\(H'\) contains no \(3_3\)-vertex.

Claim 4

\(H'\) contains no 2-vertex adjacent to two \(3_2\)-vertices.

Claim 5

\(H'\) contains no \(3_2\)-vertex.

We define an initial weight function \(w(v) = d_{H'}(v)\) for every vertex \(v \in V(H')\). Then, we redistribute weights according to the following rule:

(R) Every \(3_1\)-vertex sends the weight of \(\frac{1}{3}\) to the uniquely adjacent 2-vertex.

The sum of all charges is kept fixed when the discharging is in process. Once the discharging is finished, a new charge function \(w'\) is produced. Nevertheless, we can show that \(w'(v) \ge \frac{8}{3}\) for all \(v \in V(H')\). In fact, let \(v \in V(H')\). By Claims 15, v is either a 2-vertex or a \(3_1\)-vertex or a \(3_0\)-vertex. If v is a \(3_0\)-vertex, then \(w'(v)=3\). If v is a \(3_1\)-vertex, then \(w'(v)=3 - \frac{1}{3} = \frac{8}{3}\). If v is a 2-vertex, then \(w'(v)= 2 + 2\).\(\frac{1}{3} = \frac{8}{3}\). This leads to the following obvious contradiction:

$$\begin{aligned} \frac{8}{3} = \frac{\frac{8}{3}|V(H')|}{|V(H')|} \le \frac{\sum _{v \in V(H')}w'(v)}{|V(H')|}= \frac{\sum _{v \in V(H')}w(v)}{|V(H')|}=\frac{2|E(H')|}{|V(H')|} \le \mathrm{mad}(H') < \frac{8}{3}. \end{aligned}$$

This completes the proof of Theorem 1. \(\square \)

3 Proof of Claim 3

Assume to the contrary that \(H'\) contains a 3-vertex x adjacent to three 2-vertices uvw (see Fig. 1). Let \(N_{H'}(u)= \{x,u_1\}\), \(N_{H'}(v)= \{x,v_1\}\), and \(N_{H'}(w)= \{x,w_1\}\). By Claims 1 and 2, \(d_{H'}(u_1) = d_{H'}(v_1)= d_{H'}(w_1)= 3\). Note that \(d_{H}(u),d_{H}(v),d_{H}(w)\in \{2,3\}\). Setting \(N_{H'}(u_1)= \{u, u_2, u_3\}\), we discuss two cases below.

Fig. 1
figure 1

The configurations in the proof of Claim 3

Case 1.\(d_{H}(u) = d_{H}(v)= d_{H}(w)= 2\).

Let \(G = H - ux\), which admits a 5-2DVDE-coloring \(\phi \) with \(\phi (xv)=1\) and \(\phi (xw)=2\). Assume that xu cannot be colored with any color in C. Let us deal with the following cases, depending on the color of \(uu_1\).

(1)\(\phi (uu_1) \in \{1,2\}\), say \(\phi (uu_1)=2\) by symmetry.

(1.1) Suppose that at least one of \(u_2\) and \(u_3\) is a 3-vertex in G, say \(d_{G}(u_3)=3\). By symmetry, the proof splits into two cases.

(1.1.1) Let \(\phi (ww_1)=1\). Without loss of generality, assume that \(C(v_1) = \{1,2,4\}\) and \(C(w_1) = \{1,2,5\}\). It follows that \(C(u_1) = \{1,2,3\}\), or \(C(u_2) = \{2,3\}\). Recolor xw with 4 and color xu with 5. If \(\phi (vv_1)\ne 4\), we are done. Otherwise, we recolor xv with 3.

(1.1.2) Let \(\phi (ww_1) \in \{3,4,5\}\), and assume \(\phi (ww_1)=5\) by symmetry. Similarly, we can assume that \(C(v_1) = \{1,2,4\}\); and \(C(u_1) = \{1,2,3\}\) or \(C(u_2) = \{2,3\}\). Recolor xv with 3 and color ux with 1 or 4 such that x does not conflict with \(u_1\).

(1.2) Suppose that \(d_{G}(u_2)= d_{G}(u_3)= 2\). There are two subcases below by symmetry.

(1.2.1) \(\{C(u_2),C(u_3)\}=\{\{2,3\},\{2,4\}\}.\)

Assume that \(C(v_1)=\{1,2,5\}\). If \(C(w_1)\ne \{1,2,3\}\), then we first recolor \(uu_1\) with 5 and color xu with 3. Otherwise, \(C(w_1)= \{1,2,3\}\), recolor \(uu_1\) with 5 and color xu with 3.

Assume \(C(w_1)=\{1,2,5\}\), then a similar strategy as in the previous case is applied.

Assume now that \(C(v_1)\ne \{1,2,5\}\) and \(C(w_1)\ne \{1,2,5\}\). If \(\phi (ww_1)\ne 5\), then we color xu with 5. Otherwise, assume that \(\phi (ww_1)= 5\). Recolor \(uu_1=5\), color ux with 3 or 4 such that x does not conflict with \(v_1\).

(1.2.2) At most one of \(C(u_2)\) and \(C(u_3)\) is \(\{2,i\}\) for some \(i\in \{3,4,5\}\), say \(C(u_2)=\{2,3\}\) by symmetry.

Assume that \(\phi (ww_1)\in \{4,5\}\), say \(\phi (ww_1)=4\). Then, it is immediate to derive that \(C(v_1)=\{1,2,5\}\). We first recolor xv with 3 and color xu with 5. If \(C(u_1)\ne \{2,3,5\}\), we are done. Otherwise, we recolor ux with 1.

Assume that \(\phi (ww_1)\notin \{4,5\}\). Furthermore, suppose that \(C(v_1)=\{1,2,5\}\) and \(C(w_1)=\{1,2,4\}\). This implies that \(\phi (ww_1)=1\). Recolor xv with 3 and color xu with 4 or 5 such that x does not conflict with \(u_1\).

(2)\(\phi (uu_1) \notin \{1,2\}\), say \(\phi (uu_1)=3\) by symmetry.

We have to handle three possibilities by symmetry.

(2.1)\(d_{G}(u_2)= d_{G}(u_3) = 3\). Assume that \(C(v_1) = \{1,2,4\}\) and \(C(w_1) = \{1,2,5\}\). Recolor xw with 4 and color xu with 5. If v does not conflict with w, then we are done. Otherwise, we know that \(\phi (ww_1)=1\) and \(\phi (vv_1)=4\). In this case, we keep \(\phi (xw)=2\), and then we recolor xv with 5 and xu with 4.

(2.2)\(d_{G}(u_2)= 2\) and \(d_{G}(u_3) = 3\).

If \(C(u_2) \notin \{\{3,4\},\{3,5\}\}\), then the proof can be analogously given as in Case (2.1). Otherwise, without loss of generality, assume that \(C(u_2) = \{3,4\}\), and further \(C(v_1) = \{1,2,5\}\). If \(\phi (ww_1)\ne 4\), then we recolor xv with 4 and ux with 1 or 5 such that x does not conflict with \(w_1\). If \(\phi (ww_1)=4\), then we recolor xv with 3 and color ux with 1.

(2.3)\(d_{G}(u_2)= d_{G}(u_3)= 2\).

If \(3 \notin C(u_2) \cup C(u_3)\), then the proof is similar to that of Case (2.1).

Assume that \(3 \in C(u_2)\) and \(3\notin C(u_3)\) (if \(3 \in C(u_3)\) and \(3\notin C(u_2)\), we have a similar proof). If \(\phi (u_1u_2) \in \{1,2\}\), say \(\phi (u_1u_2)= 1\), then we assume that \(C(v_1) = \{1,2,5\}\) and \(C(w_1) = \{1,2,4\}\). Recolor xw with 3 and color xu with 4 or 5, say 4, such that x does not conflict with \(u_1\). If \(\phi (ww_1)\ne 4\), we are done. Otherwise, we recolor xv with 3 and xw with 5. If \(\phi (u_1u_2) \in \{4,5\}\), say \(\phi (u_1u_2)= 4\), then at least one of \(v_1\) and \(w_1\) has color set {1,2,5}, say \(v_1\). Recolor xv with 4 and ux with 1 or 5 such that x does not conflict with \(w_1\). If \(\phi (ww_1)\ne 4\) or \(\phi (vv_1)\ne 2\), we are done. Otherwise, \(\phi (ww_1)= 4\) and \(\phi (vv_1)=2\), we recolor xv with 3, and color ux with 1.

Assume that \(3 \in C(u_2) \cap C(u_3)\). If \(C(u_1) = \{1,2,3\}\), then we may assume that \(C(v_1) = \{1,2,4\}\) and \(C(w_1) = \{1,2,5\}\). Recolor xw with 4 and color xu with 5. If v and w are not conflicting, we are done. Otherwise, \(\phi (vv_1)=4\) and \(\phi (ww_1)=1\), it suffices to recolor xv with 3. If \(C(u_1) \ne \{1,2,3\}\), say \(1 \notin C(u_1)\), we recolor \(uu_1\) with 1 and return to a case similar to (1.2.2).

Case 2. At least one of uvw is a 3-vertex in H, say \(d_H(u)=3\).

Let \(N_H(u) = \{x, u_1, u_4\}\). Let \(G = H - uu_4\), which admits a 5-2DVDE-coloring \(\phi \) such that \(\phi (xu)=1\) and \(\phi (uu_1)=2\). In view of the number of 2-vertices in the set \(\{v,w,u_2,u_3\}\) in G, we need to consider four cases by symmetry.

(1)\(d_G(u_2)=d_G(w)=2\). We color \(uu_4\) with a color in \(\{3,4,5\}\) such that u does not conflict with \(u_3\) and v.

(2)\(d_G(u_2)=d_G(u_3)=2\). We color \(uu_4\) with a color in \(\{3,4,5\}\) such that u does not conflict with w and v.

(3)\(d_G(u_2)=2\) and \(d_G(u_3)=d_G(v)=d_G(w)=3\). Let \(N_G(v)=\{x, v_1, v_2\}\) with \(d_G(v_2) = 1\) and \(N_G(w)=\{x, w_1, w_2\}\) with \(d_G(w_2) = 1\). By Claim 2, \(d_G(v_1)=d_G(w_1)=3\). Hence we assume that \(C(u_3) = \{1,2,3\}\), \(C(v) = \{1,2,5\}\), and \(C(w) = \{1,2,4\}\). If \(C(x) = \{1,4,5\}\), we recolor ux with 3 and color \(uu_4\) with 5. Otherwise, assume that \(C(x) = \{1,2,4\}\) by symmetry. Then, \(\phi (vv_1)\in \{1,5\}\), if \(\phi (vv_1)=1\), exchange the color of \(vv_2\) and vx, then recolor ux with 3 and color \(uu_4\) with 4. Now if \(\phi (vv_1)=5\), observe that \(\phi (ww_1)\in \{1,2\}\). So if \(\phi (ww_1)=1\), we recolor ux with 3 and color \(uu_4\) with 5. Otherwise, \(\phi (ww_1)=2\), exchange the color of \(vv_2\) and vx, then recolor ux with 3 and color \(uu_4\) with 5.

(4)\(d_G(v)=d_G(w)=d_G(u_2)=d_G(u_3)=3\). Let us consider two possibilities below.

(4.1)\(C(v) \notin \{\{1,2,3\},\{1,2,4\}, \{1,2,5\}\}\). Assume by symmetry that \(C(w) = \{1,2,3\}\), \(C(u_2) = \{1,2,4\}\), and \(C(u_3) = \{1,2,5\}\). If \(C(u_1) = \{2,4,5\}\), then we recolor \(uu_1\) with 3 and color \(uu_4\) with 4 or 5 such that u does not conflict with v. So assume that \(C(u_1) = \{1,2,4\}\) by symmetry. This implies that \(\phi (u_1u_2)=4\) and \(\phi (u_1u_3)=1\). Noting that \(\phi (xw) \in \{2,3\}\), we have to handle two situations as follows.

\(\bullet \) Let \(\phi (xw) = 2\). Then, \(\phi (vx) \in \{3,4,5\}\).

First suppose that \(\phi (vx) = 3\). If we can recolor ux with 4 and color \(uu_4\) with 5, or recolor ux with 5 and \(uu_4\) with 4, we are done. Otherwise, we assume that \(C(v_1) = \{2,3,4\}\) and \(C(w_1) = \{2,3,5\}\), then we recolor \(ww_2\) with 2, wx with 1, ux with 5, and color \(uu_4\) with 4.

Next suppose that \(\phi (vx) \in \{4,5\}\), say \(\phi (vx) = 4\) by symmetry. If we can recolor ux with 3 and \(uu_4\) with 5, or recolor ux with 5 and \(uu_4\) with 3, we are done. Otherwise, assume that \(C(v_1) = \{2,4,5\}\) and \(C(w_1) = \{2,3,4\}\), then we recolor \(ww_2\) with 2, wx with 1, ux with 5, and color \(uu_4\) with 3.

\(\bullet \) Let \(\phi (xw) = 3\). Then, \(\phi (vx) \in \{2,4,5\}\). If \(\phi (vx) = 2\), then we use the same strategy as in the previous case to color \(uu_4\). So assume that \(\phi (vx) =4\), say. If \(C(v_1) \ne \{3,4,5\}\), then we recolor ux with 5 and color \(uu_4\) with 3. If \(C(v_1) = \{3,4,5\}\), then we exchange the color of \(ww_2\) and xw. Then, we color ux with 5, and color \(uu_4\) with 4.

(4.2)\(C(v) \in \{\{1,2,3\},\{1,2,4\}, \{1,2,5\}\}\), say \(C(v) = \{1,2,3\}\). We need to discuss two subcases.

(4.2.1)\(C(w) \notin \{\{1,2,4\}, \{1,2,5\}\}\). Then, we may assume that \(C(u_2) = \{1,2,4\}\) and \(C(u_3) = \{1,2,5\}\). If \(C(u_1) = \{2,4,5\}\), then we recolor \(uu_1\) with 3 and color \(uu_4\) with 4 or 5 such that u does not conflict with w. So assume that \(C(u_1) = \{1,2,4\}\) by symmetry. Since \(\phi (xv) \in \{2,3\}\), we have two possibilities.

\(\bullet \) Let \(\phi (vx) = 2\). Then, \(\phi (wx) \in \{3,4,5\}\). First assume that \(\phi (wx) = 3\). If we can legally recolor ux with 4 and \(uu_4\) with 5, or recolor ux with 5 and \(uu_4\) with 4, we are done. Otherwise, it is easy to see that \(C(v_1) = \{2,3,4\}\) and \(C(w_1) = \{2,3,5\}\) (up to symmetry). It suffices to recolor \(vv_2\) with 2, vx with 1, ux with 5, and color \(uu_4\) with 4. Next assume that \(\phi (wx) \in \{4,5\}\), say \(\phi (wx)=4\). If we can legally recolor ux with 3 and color \(uu_4\) with 5, or recolor ux with 5 and color \(uu_4\) with 3, we are done. Otherwise, we derive that \(C(v_1) = \{2,3,4\}\) and \((w_1) = \{2,4,5\}\) (up to symmetry). It suffices to recolor \(vv_2\) with 2, vx with 1, ux with 5, and color \(uu_4\) with 3.

\(\bullet \) Let \(\phi (vx) = 3\). Then, \(\phi (wx) \in \{2,4,5\}\). First assume that \(\phi (wx) = 2\). If we can legally recolor ux with 5 and color \(uu_4\) with 3 or 4 such that u does not conflict with w, or recolor ux with 4 and color \(uu_4\) with 3 or 5 such that u does not conflict with w, we are done. Otherwise, it follows that \(C(v_1) = \{2,3,4\}\) and \(C(w_1) = \{2,3,5\}\), say. It suffices to recolor vx with 5, ux with 4 and \(uu_4\) with 3 or 5 such that u does not conflict with w. Next, assume that \(\phi (wx) \in \{4,5\}\), say \(\phi (wx) = 4\). If we can legally recolor ux with 5 and color \(uu_4\) with 3, we are done. Otherwise, we derive that \(C(w_1) = \{3,4,5\}\). When \(\phi (vv_2) = 1\), we recolor \(vv_2\) with 3, vx with 1, ux with 3, and color \(uu_3\) with 5. When \(\phi (vv_2) = 2\), we recolor \(vv_2\) with 3, vx with 2, ux with 5, and color \(uu_4\) with 3.

(4.2.2)\(C(w) \in \{\{1,2,4\}, \{1,2,5\}\}\), say \(C(w)=\{1,2,4\}\). Without loss of generality, we suppose that \(C(u_2) = \{1,2,5\}\). Since \(\phi (vx) \in \{2,3\}\), we need to discuss two subcases.

\(\bullet \) Let \(\phi (vx)=2\). Then, \(\phi (wx) = 4\). If we can legally recolor ux with 3 and color \(uu_4\) with 4 or 5 such that u does not conflict with \(u_3\), or recolor ux with 5 and color \(uu_4\) with 3 or 4 such that u does not conflict with \(u_3\), we are done. Otherwise, we may assume that \(C(v_1) = \{2,3,4\}\) and \(C(w_1) = \{2,4,5\}\), then we recolor \(ww_2\) with 4, xw with 1, ux with 4, and color \(uu_4\) with 3 or 5 such that u does not conflict with \(u_3\).

\(\bullet \) Let \(\phi (vx)=3\). Then, \(\phi (wx) \in \{2,4\}\). If \(\phi (wx) =4\), then we recolor ux with 5 and color \(uu_4\) with 3 or 4 such that u does not conflict with \(u_3\). So assume that \(\phi (wx) =2\). If we can legally recolor ux with 4 and color \(uu_4\) with 3 or 5 such that u does not conflict with \(u_3\), or recolor ux with 5 and color \(uu_4\) with 3 or 4 such that u does not conflict with \(u_3\), we are done. Otherwise, \(C(v_1) = \{2,3,5\}\) and \(C(w_1) = \{2,3,4\}\), say. Now it suffices to recolor \(vv_2\) with 3, vx with 1, ux with 3, and color \(uu_4\) with 4 or 5 such that u does not conflict with \(u_3\).\(\square \)

4 Proof of Claim 4

Assume to the contrary that \(H'\) contains a 2-vertex x adjacent to two \(3_2\)-vertices u and v (see Fig. 2). Let \(N_{H'}(u)= \{x, y, u_1\}\) with \(d_{H'}(y)=2\), \(N_{H'}(v)= \{x,z,v_1\}\) with \(d_{H'}(z)=2\), \(N_{H'}(y)= \{u, y_1\}\), and \(N_{H'}(z)= \{v, z_1\}\). By Claims 1 and 2, \(d_{H'}(u_1) = d_{H'}(v_1) = d_{H'}(y_1) = d_{H'}(z_1)=3\). Let \(N_{H'}(u_1)= \{u,u_2,u_3\}\), \(N_{H'}(v_1)= \{v,v_2,v_3\}\), \(N_{H'}(y_1)=\{y, y_2, y_3\}\), and \(N_{H'}(z_1)=\{z, z_2, z_3\}\). By Claim 3, at most one of \(y_2\) and \(y_3\) has degree two; and at most one of \(z_2\) and \(z_3\) has degree two. So assume, without loss of generality, that \(d_{H'}(y_3) = d_{H'}(z_3)=3\). We discuss two cases, depending on the degree of xyz in H.

Fig. 2
figure 2

The configuration in the proof of Claim 4

Case 1.\(d_H(x)=d_H(y)=d_H(z)=2\).

Consider the graph \(G = H - xu\), which has a 5-2DVDE-coloring \(\phi \) using the color set C. We assume that xu cannot be colored with any color in C. Let \(\phi (uu_1)=1\) and \(\phi (uy)=2\). We discuss three possibilities according to the degree of \(u_2\) and \(u_3\) in G.

(1)\(d_G(u_2)=d_G(u_3)=2\). Without loss of generality, we assume that \(\phi (vx)=\phi (zz_1)=3\), \(\phi (vz)=5\), and \(C(y_1) = \{1,2,4\}\). Then, it suffices to recolor uy with 5 and color ux with 4.

(2)\(d_G(u_2)=3\) and \(d_G(u_3)=2\). If \(\{1,2\} \subset C(v)\), say \(C(v) = \{1,2,3\}\), then we may assume that \(C(u_2) = \{1,2,4\}\), and \(C_\phi (y)=\{2,5\}\) with \(\phi (xv)=2\) or \(C(y_1) = \{1,2,5\}\). If \(C(y_1) = \{1,2,5\}\), recolor uy with 3 and color ux with 4. Next suppose \(C(y)=\{2,5\}\) and \(\phi (xv)=2\), if \(C(y_2)\ne \{3,5\}\), we proceed as in the previous case. Otherwise \(C(y_1)=\{3,5\}\), then we recolor uy with 4, color ux with 3 or 5, such that x does not conflict with z.

Now suppose that \(\{1,2\} \not \subset C(v)\). We have to consider two subcases as follows.

(2.1)\(\phi (vx) \in \{1,2\}\), say \(\phi (vx)=2\) (if \(\phi (vx)=1\), our discussion is similar). Then, it follows that \(1 \notin \{\phi (vz),\phi (vv_1)\}\), and we may assume that \(\phi (zz_1)=2\), \(\phi (vz)=3\), \(C(u_2) = \{1,2,4\}\), and \(C(y)=\{2,5\}\) or \(C(y_1) = \{1,2,5\}\). If \(C(y_1) = \{1,2,5\}\), recolor uy with 3 and color ux with 4. Next suppose \(C(y)=\{2,5\}\), if \(C(y_2)\ne \{3,5\}\), we proceed as in the previous case. Otherwise \(C(y_1)=\{3,5\}\), then recolor uy with 4, color ux with 5.

(2.2)\(\phi (vx) \in \{3,4,5\}\), say \(\phi (vx)=3\) by symmetry. If \(C(z) \notin \{\{3,4\},\{3,5\}\}\), then we may assume that \(C(u_2) = \{1,2,4\}\), and \(C(y_1) = \{1,2,5\}\). It suffices to recolor uy with 3, color ux with 4 or 5 such that u does not conflict with v. So assume that \(C(z) \in \{\{3,4\},\{3,5\}\}\), say \(C(z) = \{3,4\}\) by symmetry. Then, at least one of \(u_2\) and \(y_1\) has color set \(\{1,2,5\}\). If \(C(y_1) = \{1,2,5\}\), we first suppose \(C(u_2)\ne \{1,2,3\}\), then we recolor uy with 3 and color ux with 2. If \(C(u_2)=\{1,2,3\}\), then we recolor uy with 4, and color ux with 2.

Otherwise, \(C(u_2) = \{1,2,5\}\), we have \(\phi (vv_1) \in \{1,2,5\}\). First assume that \(\phi (vv_1) = 1\). If we can recolor vx with 2 and color ux with 3 or 4 such that u does not conflict with \(y_1\), and x does not conflict with y, or recolor vx with 5 and color ux with 3 or 4 such that u does not conflict with \(y_1\), we are done. Otherwise, we may assume that \(C(v_2) = \{1,2,4\}\) and \(C(v_3) = \{1,4,5\}\). When \(C(z_2) = \{3,5\}\), we recolor vz with 2 and vx with 5 and color ux with 3 or 4 such that u does not conflict with \(y_1\). When \(C(z_2) \ne \{3,5\}\), we recolor vz with 5 and vx with 2 and color ux with 3 or 4 such that u does not conflict with \(y_1\) and x does not conflict with y.

If \(\phi (vv_1) = 2\) or \(\phi (vv_1) = 5\), we have a similar argument.

(3)\(d_G(u_2)=d_G(u_3)=3\). We discuss two possibilities according to the color set of v.

(3.1)\(\{1,2\} \subset C(v)\), say \(C(v) = \{1,2,3\}\). We discuss the following subcases:

\(\bullet \) Assume that \(C(y)=\{2,5\}\). Since ux cannot be colored, we assume \(C(u_2) = \{1,2,4\}\).

If \(C(y_2)=\{3,5\}\) and \(C(z)\ne \{2,3\}\), then we recolor uy with 4 and color ux with 3 or 5 such that u does not conflict with \(u_3\). Now, suppose \(C(y_2)=\{3,5\}\) and \(C(z)= \{2,3\}\); if \(C(u_3) \ne \{1,2,3\}\) we color ux with 3 and if we can recolor vx with 4 or 5, we are done. If vx cannot be recolor with 4 or 5, then we may assume that \(C(v_2)=\{1,3,4\}\) and \(C(v_3)=\{1,3,5\}\); in this case, if \(C(z_3)=\{2,4\}\), recolor vz with 5, vx with 4 and color ux with 3. If \(C(z_3) \ne \{2,4\}\), recolor vz with 4, vx with 5 and color ux with 3. We next suppose \(C(u_3) = \{1,2,3\}\), then recolor uy with 4 and color ux with 5.

If \(C(y_2)\ne \{3,5\}\), then we recolor uy with 3 and color ux with 4 or 5 such that u does not conflict with \(u_3\).

\(\bullet \) Assume that \(C(y_1) \in \{\{1,2,4\}, \{1,2,5\}\}\), say \(C(y_1) = \{1,2,5\}\), and \(C(y) \ne \{2,5\}\). Then, at least one of \(u_2\) and \(u_3\), say \(u_2\), has color set \(\{1,2,4\}\). If \(C(u_3)=\{1,4,5\}\), then we recolor uy with 3 and color ux with 4. If \(C(u_3)\ne \{1,4,5\}\), then we recolor uy with 4 and color ux with 5.

\(\bullet \) Assume now that \(C(y_1) \notin \{\{1,2,4\}, \{1,2,5\}\}\) and \(C(y) \ne \{2,5\}\). Then, it is easy to see that \(C(u_2)= \{1,2,4\}\) and \(C(u_3)= \{1,2,5\}\) by symmetry. If \(C(y_1)\ne \{3,4,5\}\), say \(3 \notin C(y_1)\), then we recolor uy with 3 and ux with 4. If \(C(y_1)=\{3,4,5\}\), say \(\phi (yy_1)=3\) and \(\phi (y_2y_2)=4\); if \(C(y_2)=\{3,4\}\), then we recolor uy with 5 and color uy with 4; otherwise, we recolor uy with 4 and color uy with 5.

(3.2)\(\{1,2\} \not \subset C(v)\). In view of the color of xv, we consider three subcases.

(3.2.1)\(\phi (vx)=1\). If \(1 \notin C(z)\) or \(C(z) = \{1,2\}\), then we may assume that \(C(u_2) = \{1,2,3\}\), \(C(u_3) = \{1,2,4\}\), and \(C(y_1) = \{1,2,5\}\). Recolor uy with 4 and color ux with 3 or 5 such that u does not conflict with v. Otherwise, let \(C(z) = \{1,5\}\). Then, \(\{1,2,3\}\) and \(\{1,2,4\}\) are the color sets of at least two of \(u_2,u_3,y_1\). Assume that \(C(y_1) \in \{\{1,2,3\}, \{1,2,4\}\}\), say \(C(y_1) = \{1,2,3\}\), and moreover, \(C(u_2) = \{1,2,4\}\). If \(C(u_3) = \{1,3,4\}\), then we recolor uy with 5 and color ux with 3 or 4 such that u does not conflict with v. If \(C(u_3) \ne \{1,3,4\}\), then we recolor uy with 4 and color ux with 3. If \(C(y_1) \notin \{\{1,2,3\}, \{1,2,4\}\}\), then \(C(u_2) = \{1,2,4\}\) and \(C(u_3) = \{1,2,3\}\). If \(C(y_1) \ne \{3,4,5\}\), say \(4 \notin C(y_1)\), then we recolor uy with 4 and color ux with 3. So suppose that \(C(y_1) = \{3,4,5\}\), say \(\phi (yy_1)=3\) and \(\phi (y_1y_2)=4\). When \(C(y_2) = \{3,4\}\), we recolor uy with 5 and color ux with 3 or 4 such that u does not conflict with v. When \(C(y_2) \ne \{3,4\}\), we recolor uy with 4 and color ux with 3 or 5 such that u does not conflict with v.

(3.2.2)\(\phi (vx)=2\). If \(2 \notin C(z)\) or \(C(z)= \{1,2\}\) , then we may assume that \(C(u_2) = \{1,2,3\}\), \(C(u_3) = \{1,2,4\}\), and \(C(y)=\{2,5\}\) or \(C(y_1) = \{1,2,5\}\). First if \(C(y_1) = \{1,2,5\}\), recolor uy with 4 and color ux with 3. Next suppose \(C(y)=\{2,5\}\), then if \(C(y_2) \ne \{4,5\}\), recolor uy with 4 and color ux with 3. Otherwise, \(C(y_2)=\{4,5\}\) and we recolor uy with 3 and color ux with 4.

So assume that \(2 \in C(z)\); furthermore, let \(C(z) = \{2,5\}\). Note that \(\phi (vv_1) \in \{3,4\}\) since \(\{1,2\} \not \subset C(v)\). By symmetry, we may assume that \(\phi (vv_1) =3\). We discuss the following subcases:

\(\bullet \) Suppose that \(C(y) \in \{\{2,3\}, \{2,4\}\}\), say \(C(y) = \{2,3\}\) by symmetry. Then, we may assume that \(C(u_2) = \{1,2,4\}\).

If \(C(y_2) = \{3,5\}\), we first suppose \(C(u_3) \ne \{1,3,4\}\); then we recolor uy with 4 and color ux with 3. Next assume \(C(u_3) = \{1,3,4\}\); then, we assign color 5 to ux, and so if we can recolor vx with 1 or 4 we are done. Otherwise, we may assume \(C(v_2) = \{1,3,5\}\) and \(C(v_3) = \{3,4,5\}\). In the latter case, when \(C(z_2) \ne \{2,4\}\), recolor vz with 4 and vx with 1. Otherwise, if \(C(z_2) = \{2,4\}\), recolor vz with 1 and vx with 4.

Now if \(C(y_2) \ne \{3,5\}\), suppose \(C(y_1) \ne \{1,3,5\}\), then we recolor uy with 5 and color ux with 3 or 4 such that u does not conflict with \(u_3\). If \(C(y_1) = \{1,3,5\}\) and \(C(u_3) \ne \{1,4,5\}\), then we recolor uy with 5 and color ux 4. Finally, assume that \(C(y_1) = \{1,3,5\}\) and \(C(u_3) = \{1,4,5\}\). If we can recolor xv with 1 and color ux with 5, or recolor xv with 4 and color ux with 5, we are done. Otherwise, it follows that \(C(v_2) = \{1,3,5\}\) and \(C(v_3) = \{3,4,5\}\) (up to symmetry), and henceforth when \(C(z_2) \ne \{2,4\}\), recolor vz with 4, vx with 1 and color ux with 5. Otherwise, if \(C(z_2) = \{2,4\}\), recolor vz with 1, vx with 4 and color ux with 5.

\(\bullet \) Suppose that \(C(y) \notin \{\{2,3\}, \{2,4\}\}\), and \(C(y_1) \in \{\{1,2,3\}, \{1,2,4\}\}\), say \(C(y_1) = \{1,2,3\}\) by symmetry. Then, we may assume that \(C(u_2) = \{1,2,4\}\). If \(C(u_3) = \{1,3,4\}\), then we recolor uy with 5 and color ux with 3. If \(C(u_3) \ne \{1,3,4\}\), then we recolor uy with 4 and color ux with 3.

\(\bullet \) Suppose that \(C(y) \notin \{\{2,3\}, \{2,4\}\}\) and \(C(y_1) \notin \{\{1,2,3\}, \{1,2,4\}\}\). Then, \(C(u_2) = \{1,2,4\}\) and \(C(u_3) = \{1,2,3\}\). If \(C(y_1) \ne \{3,4,5\}\), say \(4 \notin C(y_1)\), then we recolor uy with 4 and color ux with 3. Otherwise, \(C(y_1) = \{3,4,5\}\), say \(\phi (yy_1)=3\) and \(\phi (y_1y_2)=4\). When \(C(y_2) = \{3,4\}\), we recolor uy with 5 and color ux with 3. When \(C(y_2) \ne \{3,4\}\), we recolor uy with 4 and color ux with 3.

(3.2.3)\(\phi (vx) \in \{3,4,5\}\), say \(\phi (vx) = 3\) by symmetry. We first observe that if \(3 \notin C(y_1)\), then it suffices to recolor uy with 3 and reduce the proof to Case (3.2.2). So, assume that \(3 \in C(y_1)\) and let us discuss the following two cases.

\(\bullet \)\(3 \notin C(z)\) or \(C(z) \in \{\{1,3\},\{2,3\}\}\). Without loss of generality, assume that \(C(u_2) = \{1,2,4\}\) and \(C(u_3) = \{1,2,5\}\). If \(C(y_1) \ne \{3,4,5\}\), say \(4 \notin C(y_1)\), then we recolor uy with 4 and color ux with 5. Otherwise, \(C(y_1) = \{3,4,5\}\), say \(\phi (yy_1)=3\) and \(\phi (y_1y_2)=4\). When \(C(y_2) = \{3,4\}\), we recolor uy with 5 and color ux with 4. When \(C(y_2) \ne \{3,4\}\), we recolor uy with 4 and color ux with 5.

\(\bullet \)\(3 \in C(z)\) and \(C(z) \notin \{\{1,3\},\{2,3\}\}\), say \(C(z) = \{3,5\}\). Then, at least one of \(u_2\) and \(u_3\), say \(u_2\), has color set \(\{1,2,4\}\). Since \(\phi (vv_1) \in \{1,2,4\}\), we have some subcases below.

Assume that \(\phi (vv_1) = 1\) (if \(\phi (vv_1) = 2\), we have a similar discussion). If we can recolor vx with 4 and color ux with 3 or 5, we are done. If vx can be recolored with 4, but neither 3 nor 5 can assign to ux, then this implies that \(C(u_3) = \{1,2,5\}\) and \(C(y_1) = \{1,2,3\}\), say. It suffices to recolor uy with 5 and color ux with 3. If vx cannot be recolored with 4, then at least one of \(v_2\) and \(v_3\), say \(v_3\), has color set \(\{1,4,5\}\). If \(C(v_2) \ne \{1,2,5\}\), then we recolor vx with 2 and then reduce to Case (3.2.2). So assume that \(C(v_2) = \{1,2,5\}\). If \(C(z_2) \ne \{2,3\}\), then we recolor zv with 2 and reduce to the previous case. If \(C(z_2) = \{2,3\}\), then we recolor zv with 4 and vx with 2 and then reduce to Case (3.2.2).

Assume that \(\phi (vv_1) = 4\). If we can recolor vx with 1 or 2, then the proof is reduced to Cases (3.2.1) and (3.2.2). Otherwise, we may assume that \(C(v_2) = \{1,4,5\}\) and \(C(v_3) = \{2,4,5\}\). If \(C(z_2) =\{2,3\}\), then we recolor zv with 1 and reduce to the previous case. If \(C(z_2) \ne \{2,3\}\), then we recolor zv with 2 and reduce the previous cases.

Case 2. At least one of x, y, and z is a 3-vertex in H.

All notations in Case 1 are kept in the following discussion. Since \(2\le d_H(x)\le 3\), we need to consider two subcases.

(1) Assume that \(d_H(x) = 2\). Then, at least one of y and z, say z, is a 3-vertex in H. Let \(N_H(z)= \{v, z_1, z_4\}\) with \(d_H(z_4)= 1\). Consider the graph \(G = H -zz_4\), which has a 5-2DVDE-coloring \(\phi \) using the color set C such that \(\phi (zz_1)=1\) and \(\phi (zv)=2\). Assume that \(zz_4\) cannot be colored with any color in C. If \(z_2\) is a 2-vertex, then \(zz_4\) can be colored with a color in \(\{3,4,5\}-\{\phi (vv_1),\phi (z_1z_3)\}\) such that z does not conflict with any of \(v_1\) and \(z_3\). So, \(z_2\) and \(z_3\) must be 3-vertices in G, and we may assume that \(C(v_1) = \{1,2,3\}\), \(C(z_2) = \{1,2,4\}\), and \(C(z_3) = \{1,2,5\}\). If \(C(z_1) = \{1,4,5\}\), then we recolor \(zz_1\) with 3 and color \(zz_4\) with 5. If \(C(z_1) \in \{\{1,2,4\}, \{1,2,5\}\}\), say \(C(z_1) = \{1,2,4\}\), then \(\phi (vv_1) \in \{1,3\}\), we deal with two possibilities according to the color of \(vv_1\).

\(\bullet \)\(\phi (vv_1) = 1\). Let \(\phi (v_1v_3) = 3\), so \(\phi (vx) \in \{3,4,5\}\). If \(\phi (vx) =3\), then we can recolor vz with 4 or 5, and then color \(zz_4\) with 3. Otherwise, it is easy to derive that \(C(v_3) = \{1,3,4\}\) and \(C(u) = \{1,3,5\}\), say. It suffices to recolor xv with 2, vz with 3, and color \(zz_4\) with 4.

If \(\phi (vx) =4\) or 5, we have a similar proof.

\(\bullet \)\(\phi (vv_1) = 3\). Then, \(\phi (vx) \in \{1,4,5\}\). First assume that \(\phi (vx) = 1\). If we can recolor vz with 4 or 5, and color \(zz_4\) with 3, we are done. Otherwise, it follows that \(C(v_3) = \{1,3,4\}\) and \(C(u) = \{1,3,5\}\), say. Recolor xv with 4, vz with 5, and color \(zz_4\) with 3. Next assume that \(\phi (vx) \in \{4,5\}\), say \(\phi (vx) = 4\). If we can recolor vz with 5, then 3 is assigned to \(zz_4\). Otherwise, we have \(C(u) = \{3,4,5\}\). It suffices to exchange the colors of vx and vz and color \(zz_4\) with 5.

(2) Assume that \(d_H(x) = 3\). Let \(N_H(x)= \{u, v, x_1\}\) with \(d_H(x_1)=1\). Let \(G = H -xx_1\), which has a 5-2DVDE-coloring \(\phi \) with \(\phi (xv)=1\) and \(\phi (xu)=2\). Assume that \(xx_1\) cannot be colored with any color in C. If \(d_G(y)=d_G(z)=2\), then we color \(xx_1\) with a color in \(\{3,4,5\}\) such that x does not conflict with \(u_1\) and \(v_1\). So suppose that \( d_G(z)=3\). Without loss of generality, assume that \(C(z) = \{1,2,3\}\) and \(C(v_1) = \{1,2,4\}\). Note that either y or \(u_1\) has color set \(\{1,2,5\}\), say \(C(y) = \{1,2,5\}\) by symmetry.

If \(C(v) = \{1,3,4\}\), then we recolor xv with 5 and color \(xx_1\) with 3 or 4 such that x does not conflict with \(u_1\). Otherwise, suppose that \(C(v) = \{1,2,4\}\) with \(\phi (v_1v_2)=1\) by symmetry. If vx can be recolored with 3, then we color \(xx_1\) with 4 or 5 such that x does not conflict with \(u_1\). Similarly, if vx can be recolored with 5, then we color \(xx_1\) with 3 or 4 such that x does not conflict with \(u_1\). Otherwise, we may assume that \(C(z_1) = \{2,3,4\}\) and \(C(v_3) = \{2,4,5\}\). If \(C(v_2) = \{1,3,4\}\), then we exchange the colors of \(zz_1\) and \(zz_4\), recolor vx with 5, and color \(xx_1\) with 3 or 4 such that x does not conflict with \(u_1\). If \(C(v_2) \ne \{1,3,4\}\), then we exchange the colors of \(zz_1\) and \(zz_4\), recolor vx with 3, and color \(xx_1\) with 4 or 5 such that x does not conflict with \(u_1\). \(\square \)

5 Proof of Claim 5

Assume to the contrary that \(H'\) contains a \(3_2\)-vertex x adjacent to two 2-vertices u and v (see Fig. 3). Let \(N_{H'}(x)= \{u, v, w\}\), \(N_{H'}(w)= \{x,w_1,w_2\}\), \(N_{H'}(u)= \{x, u_1\}\) and \(N_{H'}(v)= \{x, v_1\}\). By Claims 1 and 2, \(d_{H'}(u_1) = d_{H'}(v_1) = 3\). Furthermore, let \(N_{H'}(u_1)= \{u,u_2,u_3\}\) and \(N_{H'}(v_1)= \{v,v_3,v_4\}\). By Claims 3 and 4, \(d_{H'}(u_2) = d_{H'}(u_3) = d_{H'}(v_3) = d_{H'}(v_4)=3\). We deal with three cases depending on the degree of u and v in H.

Fig. 3
figure 3

The configuration in the proof of Claim 5

Case 1.\(d_H(u)=d_H(v)=2\).

Let \(G = H -xu\), which admits a 5-2DVDE-coloring \(\phi \) using the color set C with \(\phi (xv)=2\) and \(\phi (xw)=1\). Assume that ux cannot be colored with any color in C. If \(d_G(w_1)=d_G(w_2) =2\), then we can color ux with a color in \( \{3,4,5\}-\{\phi (vv_1),\phi (uu_1)\}\) such that x does not conflict with \(v_1\). This is impossible. Thus, \(d_G(w_2)=3\). We discuss three possibilities depending on the color of \(uu_1\).

(1)\(\phi (uu_1)=1\). Suppose that \(2 \notin C(u_1)\), then \(d_G(w_1) = 3\), otherwise we color ux with a color in \(\{3,4,5\}-\{\phi (vv_1),\phi (ww_2)\}\) such that x does not conflict with \(v_1\) or \(w_2\). Without loss of generality, assume that \(C(w_1) = \{1,2,3\}\), \(C(w_2) = \{1,2,4\}\), and \(C(v_1) = \{1,2,5\}\). We recolor vx with 4 and color ux with 3 or 5 such that x does not conflict with \(u_1\). If \(2 \in C(u_1)\), then we suppose by symmetry that \(C(u_1) = \{1,2,3\}\). We first assume that \(C(v_1) \notin \{\{1,2,4\},\{1,2,5\}\}\), then \(C(w_1) = \{1,2,4\}\) and \(C(w_2) = \{1,2,5\}\). Since \(d_{H'}(v_3) = d_{H'}(v_4)=3\), if \(C(v_1)\ne \{1,3,4\}\), say \(3\notin C(v_1)\), then recolor vx with 3 and color ux with 4. Otherwise, \(C(v_1)=\{1,3,4\}\), recolor vx with 5 and color ux with 4. we recolor vx with a color \(c \in \{3,4,5\}-\{\phi (vv_1)\}\), and color ux with a color in \(\{3,4,5\}-\{c\}\). Now if \(C(v_1) \in \{\{1,2,4\},\{1,2,5\}\}\), say \(C(v_1) = \{1,2,4\}\), then \(C(w_2) = \{1,2,5\}\), recolor vx with 5 and color ux with 3 or 4 such that x does not conflict with \(w_1\).

(2)\(\phi (uu_1)=2\). If \(1 \notin C(u_1)\), then \(d_G(w_1) = 3\), otherwise we color ux with a color in \(\{3,4,5\}-\{\phi (vv_1),\phi (ww_2)\}\) such that x does not conflict with \(v_1\) or \(w_2\). Without loss of generality, assume that \(C(w_1) = \{1,2,3\}\), \(C(w_2) = \{1,2,4\}\), and either \(C(v_1) = \{1,2,5\}\) or \(\phi (vv_1)=5\). We recolor vx with 4 and color ux with 3. If \(1 \in C(u_1)\), we proceed in a similar way as for the previous case when \(2 \in C(u_1)\).

(3)\(\phi (uu_1) \in \{3,4,5\}\), say \(\phi (uu_1) =3\) by symmetry. If \(\phi (vv_1) \ne 3\), it suffices to recolor vx with 3 an obtain a situation similar to (2). Thus, suppose that \(\phi (vv_1) = 3\), then \(d_G(w_1) = 3\), otherwise we color ux with a color in \(\{4,5\}-\{\phi (ww_2)\}\) such that x does not conflict with \(w_2\). Furthermore, \(C(w_1) = \{1,2,4\}\) and \(C(w_2)= \{1,2,5\}\). It suffices to recolor vx with 4 and color ux with 5.

Case 2.\(d_H(u)=3\) and \(d_H(v)=2\).

Set \(N_H(u) = \{x,u_1,u_4\}\) with \(d_H(u_4)=1\). Let \(G = H -u_4\), which admits a 5-2DVDE-coloring \(\phi \) using the color set C such that \(\phi (ux)=1\) and \(\phi (uu_1)=2\). Assume that \(uu_4\) cannot be colored with any color in C. By symmetry, we suppose that \(C(w) = \{1,2,3\}\), \(C(u_2) = \{1,2,4\}\), and \(C(u_3) = \{1,2,5\}\). If \(C(u_1) = \{2,4,5\}\), then we recolor \(uu_1\) with 3 and color \(uu_4\) with 4. Otherwise, we assume that \(C(u_1) = \{1,2,5\}\) by symmetry. Since \(\phi (xw) \in \{2,3\}\), we need to consider two possibilities as follows.

  • \(\phi (xw) = 2\). Note that \(\phi (vx) \in \{3,4,5\}\), say \(\phi (vx) = 3\) (if \(\phi (vx) \in \{4,5\}\), we will have a similar proof). If we can legally recolor ux with 4 and color \(uu_4\) with 5, or recolor ux with 5 and color \(uu_4\) with 4, we are done. Otherwise, we may assume that \(C(v_1) = \{2,3,5\}\) and \(C(w_1) = \{2,3,4\}\). It suffice to recolor vx with 4, ux with 5 and color \(uu_4\) with 3.

  • \(\phi (xw) = 3\). Then, \(\phi (vx) \in \{2,4,5\}\). First suppose that \(\phi (vx) = 2\). If we can legally recolor ux with 4 and color \(uu_4\) with 5, or recolor ux with 5 and color \(uu_4\) with 4, we are done. Otherwise, it is easy to see that at least one of \(w_1\) and \(w_2\) is of degree 3, say \(d_G(w_1)=3\), and \(C(w_1) = \{2,3,4\}\) and \(C(v_1) = \{2,3,5\}\). We recolor vx with 4, ux with 5 and color \(uu_4\) with 3. If \(\phi (vx) \in \{4,5\}\), we assume that \(\phi (vx) = 4\) by symmetry. If possible, we recolor ux with 5 and color \(uu_4\) with 4. Otherwise, assume that \(C(v_1) = \{3,4,5\}\), recolor vx with 1, ux with 4, and color \(uu_4\) with 5.

Case 3.\(d_H(u) = d_H(v) = 3\).

We continue to use notations in Case 2 and let \(N_H(v) = \{x, v_1, v_2\}\) with \(d_H(v_2)=1\). Then, \(G = H -u_4\) has a 5-2DVDE-coloring \(\phi \) such that \(\phi (ux)=1\) and \(\phi (uu_1)=2\). Assume that \(uu_4\) cannot be colored with any color in C. We discuss the following possibilities according to the color set of v.

(1)\(C(v) \notin \{\{1,2,3\},\{1,2,4\}, \{1,2,5\}\}\). Assume that \(C(u_2) = \{1,2,4\}\), \(C(u_3) = \{1,2,5\}\), and \(C(w) = \{1,2,3\}\). If \(C(u_1) = \{2,4,5\}\), we recolor \(uu_1\) with 3 and colors \(uu_4\) with 4 or 5 such that u does not conflict with v. Otherwise, assume that \(C(u_1) = \{1,2,5\}\) by symmetry. Noting that \(\phi (xw) \in \{2,3\}\), we discuss two subcases below.

(1.1) Assume that \(\phi (xw) = 2\), then \(\phi (vx) \in \{3,4,5\}\). First suppose that \(\phi (vx) = 3\). If possible, we recolor ux with 4 and color \(uu_4\) with 5, or recolor ux with 5 and color \(uu_4\) with 4. Otherwise, we assume that \(C(v_1) = \{2,3,4\}\) and \(C(w_1) = \{2,3,5\}\). There are two possibilities to be considered.

  • \(\phi (vv_1) = 4\). Then, \(\phi (vv_2) \in \{1,2,5\}\). If \(\phi (vv_2) = 1\), then we recolor vx with 5, ux with 4, and color \(uu_4\) with 3. If \(\phi (vv_2) = 2\), then we recolor \(vv_2\) with 5, vx with 1, ux with 3, and color \(uu_4\) with 5. If \(\phi (vv_2) = 5\), then we recolor vx with 1, ux with 3, and color \(uu_4\) with 5.

  • \(\phi (vv_1) = 2\). Then, \(\phi (vv_2) \in \{4,5\}\). If \(\phi (vv_2) = 4\), then we recolor \(vv_2\) with 3, vx with 4, ux with 5, and color \(uu_4\) with 3. If \(\phi (vv_2) = 5\), then we recolor \(vv_2\) with 3, vx with 5, ux with 4, and color \(uu_4\) with 3. The cases \(\phi (vx) = 4\) and \(\phi (vx) = 5\) are symmetric and are solve in a similar way as the one of \(\phi (vx) = 3\).

(1.2) Assume that \(\phi (xw) = 3\). Since \(\phi (vx) \in \{2,4,5\}\), we investigate two situations as follows.

(1.2.1)\(\phi (vx) = 2\). If we can legally recolor ux with 4 and color \(uu_4\) with 5, or recolor ux with 5 and color \(uu_4\) with 4, we are done. Otherwise, it follows that \(C(v_1) = \{2,3,5\}\) and \(C(w_2) = \{2,3,4\}\), say. Note that \(\phi (vv_1) \in \{3,5\}\).

  • \(\phi (vv_1) =5\). Then, \(\phi (vv_2) \in \{1,3,4\}\). If \(\phi (vv_2) = 1\), then we recolor vx with 4, ux with 5, and color \(uu_4\) with 3. If \(\phi (vv_2) = 3\), then we recolor \(vv_2\) with 1, vx with 4, ux with 5, and color \(uu_4\) with 3. If \(\phi (vv_2) = 4\), then we recolor \(vv_2\) with 2, vx with 4, ux with 5, and color \(uu_4\) with 3.

  • \(\phi (vv_1) =3\). Then, \(\phi (vv_2) \in \{4,5\}\). If \(\phi (vv_2) =4\), then we recolor \(vv_2\) with 2, vx with 4, ux with 5, and color \(uu_4\) with 4. If \(\phi (vv_2) =5\), then we recolor \(vv_2\) with 2, vx with 5, ux with 4, and color \(uu_4\) with 3.

(1.2.2)\(\phi (vx) \in \{4,5\}\), say \(\phi (vx) = 4\). If we can legally recolor ux with 5 and color \(uu_4\) with 3, we are done. Otherwise, assume that \(C(v_1) = \{3,4,5\}\). Note that \(\phi (vv_1) \in \{3,5\}\). Suppose that \(\phi (vv_1) = 3\), then \(\phi (vv_2) \in \{1,2,5\}\). If \(\phi (vv_2) =1\), then we recolor \(vv_2\) with 4, vx with 1, ux with 4, and color \(uu_4\) with 5. If \(\phi (vv_2) =2\), then we recolor vx with 1, ux with 4, and color \(uu_4\) with 5. If \(\phi (vv_2) =5\), then we recolor \(vv_2\) with 2, vx with 1, ux with 4, and color \(uu_4\) with 5. The case \(\phi (vv_1) = 5\) is solved using a similar recoloring strategy.

(2)\(C(v) \in \{\{1,2,3\},\{1,2,4\}, \{1,2,5\}\}\), say \(C(v) = \{1,2,3\}\). The proof is split into the following two subcases, depending on the color set of w.

(2.1)\(C(w) \notin \{\{1,2,4\}, \{1,2,5\}\}\). Then, we can assume that \(C(u_2) = \{1,2,4\}\) and \(C(u_3) = \{1,2,5\}\). Since \(\phi (vx) \in \{2,3\}\), we have two possibilities.

(2.1.1)\(\phi (vx) = 2\). It is straightforward to see that \(\phi (wx) \in \{3,4,5\}\).

\(\bullet \)\(\phi (wx) = 3\). If we can legally recolor ux with 4 and color \(uu_4\) with 5, or recolor ux with 5 and color \(uu_4\) with 4, we are done. Otherwise, we have two possibilities as follows:

Suppose that \(C(v_1) \in \{\{2,3,4\}, \{2,3,5\}\}\), say \(C(v_1) = \{2,3,4\}\). Let \(C(w_2) = \{2,3,5\}\). If \(C(w_1) \ne \{3,4,5\}\), then we recolor \(vv_2\) with 1, vx with 5, ux with 4, and color \(uu_4\) with 5. If \(C(w_1) = \{3,4,5\}\), then we recolor \(vv_2\) with 5, vx with 1, ux with 5, and color \(uu_4\) with 4.

Suppose that \(C(v_1) \notin \{\{2,3,4\}, \{2,3,5\}\}\), then \(C(w_1) = \{2,3,4\}\) and \(C(w_2) = \{2,3,5\}\). If \(C(v_1) \ne \{1,3,4\}\), then we recolor \(vv_2\) with 2, vx with 1, ux with 4, and color \(uu_4\) with 5. If \(C(v_1) = \{1,3,4\}\), then we recolor \(vv_2\) with 2, vx with 5, ux with 4, and color \(uu_4\) with 3 or 5 such that u does not conflict with v.

\(\bullet \)\(\phi (wx) \in \{4,5\}\), say \(\phi (wx) = 4\). If we can legally recolor ux with 3 and color \(uu_4\) with 5, or recolor ux with 5 and color \(uu_4\) with 3, we are done. Otherwise, we have two possibilities: (i) \(C(v_1) \ne \{2,3,4\}\). We may assume that \(C(w_1) = \{2,4,5\}\) and \(C(w_2) = \{2,3,4\}\). It suffices to exchange the colors of \(vv_2\) and vx, recolor ux with 5, and color \(uu_4\) with 3. (ii) \(C(v_1) = \{2,3,4\}\), then \(C(w_2) = \{2,4,5\}\). It suffices to exchange the colors of \(vv_2\) and vx, recolor ux with 3 or 5 such that x does not conflict with \(w_1\), and color \(uu_4\) with 4.

(2.1.2)\(\phi (vx) = 3\). Then, \(\phi (wx) \in \{2,4,5\}\).

First assume that \(\phi (wx) = 2\). If we can legally recolor ux with 5, and color \(uu_4\) with 3 or 4 such that u does not conflict with w, or recolor ux with 4 and color \(uu_4\) with 3 or 5 such that u does not conflict with w, we are done. Otherwise, we have two possibilities: If \(C(v_1) \in \{\{2,3,4\}, \{2,3,5\}\}\), say \(C(v_1) = \{2,3,4\}\), then we may assume that \(C(w_1) = \{2,3,5\}\). Now, if \(C(w_2) \ne \{2,4,5\}\), then we recolor vx with 5, ux with 4, and color \(uu_4\) with 3 or 5 such that u does not conflict with w. If \(C(w_2) = \{2,4,5\}\), then we exchange the colors of \(vv_2\) and vx, recolor ux with 4, and color \(uu_4\) with 3 or 5 such that u does not conflict with w. So suppose that \(C(v_1) \notin \{\{2,3,4\},\{2,3,5\}\}\). We may assume that \(C(w_1) = \{2,3,5\}\) and \(C(w_2) = \{2,3,4\}\). Recolor \(vv_2\) with 3, vx with 1, ux with 3 and color \(uu_4\) with 4 or 5 such that u does not conflict with w.

Next assume that \(\phi (wx) \in \{4,5\}\), say \(\phi (wx) = 4\). If possible, we recolor ux with 5 and color \(uu_4\) with 3. Otherwise, we may assume that \(C(w_1) = \{3,4,5\}\), and furthermore \(\phi (vv_2) = 1\) (if \(\phi (vv_2) = 2\), we have a similar discussion). If \(C(w_2) \ne \{1,3,4\}\), then we recolor \(vv_2\) with 3, vx with 1, ux with 3, and color \(uu_4\) with 5. If \(C(w_2) = \{1,3,4\}\), then we recolor \(vv_2\) with 3, vx with 1, ux with 5, and color \(uu_4\) with 3.

(2.2)\(C(w) \in \{\{1,2,4\}, \{1,2,5\}\}\), say \(C(w)=\{1,2,4\}\). Then, we may suppose that \(C(u_2) = \{1,2,5\}\). Note that \(\phi (vx) \in \{2,3\}\).

(2.2.1) Let \(\phi (vx)=2\). Then, \(\phi (wx) = 4\). If we can recolor ux with 3 and color \(uu_4\) with 4 or 5 such that u does not conflict with \(u_3\), or recolor ux with 5 and color \(uu_4\) with 3 or 4 such that u does not conflict with \(u_3\), we are done. Otherwise, we may assume that \(C(v_1) = \{2,3,4\}\) and \(C(w_2) = \{2,4,5\}\). When \(C(w_1) = \{1,4,5\}\), we recolor \(vv_2\) with 2, vx with 1, ux with 3, and color \(uu_4\) with 4 or 5 such that u does not conflict with \(u_3\). When \(C(w_2) \ne \{1,4,5\}\), we recolor \(vv_2\) with 2, vx with 1, ux with 5, and color \(uu_4\) with 3 or 4 such that u does not conflict with \(u_3\).

(2.2.2) Let \(\phi (vx)=3\). Then, \(\phi (wx) \in \{2,4\}\). If \(\phi (wx) =4\), then we recolor ux with 5 and color \(uu_4\) with 3 or 4 such that u does not conflict with \(u_3\). So assume that \(\phi (wx) =2\). If we can legally recolor ux with 4 and color \(uu_4\) with 3 or 5 such that u does not conflict with \(u_3\), or recolor ux with 5 and color \(uu_4\) with 3 or 4 such that u does not conflict with \(u_3\), we are done. Otherwise, we may assume that \(C(v_1) = \{2,3,5\}\) and \(C(w_2) = \{2,3,4\}\). Recolor \(vv_2\) with 3, vx with 1, ux with 3, and color \(uu_4\) with 4 or 5 such that u does not conflict with \(u_3\). \(\square \)