1 Introduction and Preliminaries

A b-vertex coloring of a graph \(G\) is a proper vertex coloring of \( G\) such that each color class contains a vertex that has at least one vertex in every other color class in its neighborhood. The b-chromatic number \(\varphi (G)\) of a graph \(G\) is the largest integer \(k\) for which \(G\) has a b-vertex coloring with \(\varphi (G)\) colors. This concept was introduced in [15] by Irving and Manlove by the certain partial ordering on all proper colorings in contrast to chromatic number \( \chi (G)\). Namely, \(\chi (G)\) is the minimum of colors used among all minimal elements of this partial ordering, while \(\varphi (G)\) is the maximum of colors used among all minimal elements of the same partial ordering.

Since then the b-chromatic number has drawn quite some attention among the scientific community. Already Irving and Manlove [15] have shown that computing \(\varphi (G)\) is an \(NP\)-complete problem in general. Hence an approximation approach described in [7] seems natural. The b-chromatic number of some special graph classes has been studied in [3, 810]. The bounds for the b-chromatic number have been studied in [19] in general and for some graph classes in [1, 2, 6, 21]. The b-chromatic number has been considered with respect to subgraphs in [12, 18], while the b-chromatic number under graph operations was considered in [20] for the Cartesian product and in [17] for the other three standard products. In [4] an interesting concept of b-continuous graphs was introduced as graphs for which there exists a \(t\)-b-vertex coloring for every integer \(t\) between \(\chi (G)\) and \(\varphi (G)\).

Intuitively, we need to have enough vertices of high enough degree, at least one in each color class. Let \(v_{1},\ldots ,v_{n}\) be such a sequence of vertices, that \(d(v_{1})\ge \cdots \ge d(v_{n})\). Then \(m(G)=\max \{i\,:\,d(v_{i})\ge i-1\}\) is an upper bound for \(\varphi (G)\). From this point of view, \(d\)-regular graphs are of special interest, since \( m(G)=d+1\) for a \(d\)-regular graph \(G\) and every vertex is a candidate to have each color class in its neighborhood. Indeed, in [22] it was shown that if a \(d\)-regular graph \(G\) has at least \(d^4\) vertices, then the equality \(\varphi (G)=d+1\) holds. This bound was later improved to \( 2d^{3}\) in [5]. In particular it was shown in [16], that there are only four exceptions among cubic graphs with \(\varphi (G)<4\), one of them being the Petersen graph.

We introduce in this work an edge version of the b-vertex coloring and the b-chromatic number, namely the b-edge coloring and the b-chromatic index, respectively. It is a natural approach to study vertex concepts on edges and vice versa. The classical example is the chromatic number and its edge version the chromatic index. But we can also find more recent dates. For instance in [14], the edge Wiener index was defined in four different ways. One of these approaches, via the line graph, we also use here.

A b-edge coloring of a graph \(G\) is a proper edge coloring of \(G\) such that each color class contains an edge that has at least one incident edge in every other color class and the b-chromatic index of a graph \(G\) is the largest integer \(\varphi '(G)\) for which \(G\) has a b-edge coloring with \(\varphi '(G)\) colors. An edge \(e\) of color \(i\) that has all other colors on its incident edges is called color \(i\) dominating edge or we say that color \(i\) is realized on \(e\). There is no evidence for any publications regarding the b-chromatic index, but we managed to find the manuscript [23] in which authors show that this problem is NP-complete.

In the rest of this section, we recall some standard notation that will be used later. In the second section, we first describe some bounds, compute \(\varphi '(T)\) for every tree \(T\), and show that general bounds with respect to \(\Delta (G)\) cannot be improved. In the third section, we show that for many regular graphs \(\varphi '(G)\) attains the trivial upper bound. Next section is devoted to graphs where \(\varphi '(G)\) is strictly less than the trivial upper bound and in the last section we describe the complete list of cubic graphs for which the trivial upper bound is not achieved.

Let \(G\) be a graph. The line graph \({\mathcal {L}}(G)\) of a graph \(G\) is the graph with \(V({\mathcal {L}}(G))=E(G)\), and two edges of \(G\) are adjacent in \({\mathcal {L}}(G)\) if they share a common vertex. Clearly \(\varphi ^{\prime }(G)=\varphi ({\mathcal {L}}(G))\). The number of vertices adjacent with the vertex \(v\) is called the degree of \(v\) and is denoted by \(d(v)\). If all vertices have the same degree \(d\), we say that \(G\) is a \(d\)-regular graph.

The Cartesian product \(G\, \Box \, H\) of graphs \(G\) and \(H\) has the vertex set \(V(G)\times V(H)\). Two vertices \((g,h)\) and \((g',h')\) are adjacent if they are adjacent in one coordinate and equal in the other, i.e. \(g=g'\) and \(hh'\in E(H)\) or \(gg'\in E(G)\) and \(h=h'\). The Cartesian product is associative (see [11]) and hence we can write more factors without brackets: \(G_{1}\,\Box \cdots \Box \, G_{k}\). If every factor \(G_{i}\), \(i\in \{1,\ldots ,k\}\), is isomorphic to a complete graph, then we call such a Cartesian product a Hamming graph. For more about Cartesian product graphs in general or Hamming graphs in particular see the books [11, 13].

2 Bounds, Trees, and Realizability

Every proper edge coloring of a graph \(G\) with \(\chi '(G)\) colors is also a b-edge coloring. If not, then every edge of a color class with no realizable edge can be recolored by some other color. This yields a proper edge coloring with less than \(\chi '(G)\) colors, which is a contradiction. Hence \(\chi '(G)\) is the trivial lower bound of \(\varphi '(G)\).

Let \(e=uv\) be an edge of \(G\). Denote with \(N_{u}(e)\) the set of edges in \(G\) different from \(e\) that share \(u\) with \(e\), and \(N_{v}(e)\) the set of edges in \(G\) different from \(e\) that share \(v\) with \(e\). By \(N(e)\) we denote the neighborhood of an edge \(e\), which is \(N(e)=N_{u}(e)\cup N_{v}(e)\). The degree of an edge \(e\) is denoted with \(d(e)\) and is equal to \(|N(e)|\). A (realizable) edge \(e\) can have at most \(2\Delta (G)-2\) colors in its neighborhood [\(\Delta (G)-1\) in every end vertex]. Together with the color of \(e\), this gives a trivial upper bound for \(\varphi '(G)\), namely \(2\Delta (G)-1\). The trivial upper bound is meaningful only if there exist enough (\(\ge 2\Delta (G)-1\)) edges in \(G\) of degree \(2\Delta (G)-2\), such that every color is realized. Otherwise we can lower the trivial upper bound as follows. Let \( e_{1},\ldots ,e_{m}\) be edges of \(G\) and \(d(e_{1})\ge \ldots \ge d(e_{m})\) the degree sequence of these edges. Then \(m'(G)=\max \{i:d(e_{i})\ge i-1\}\) is an improved upper bound for \(\varphi ^{\prime }(G)\). Hence

$$\begin{aligned} \Delta (G)\le \chi '(G)\le \varphi '(G)\le m^{\prime }(G)\le 2\Delta (G)-1\,. \end{aligned}$$

Note that for regular graphs \(m'(G)=2\Delta (G)-1\) and for stars \(K_{1,\ell }\) we have \(m'(G)=\Delta (G)\). Every realizable edge of a b-edge coloring must have degree at least \(m'(G)-1\). Hence we call an edge \(e\) with \(d(e) \ge m'(G)-1\) a dense edge.

The distance between edges \(e,f \in E(G)\) is defined as the number of edges on a shortest path between \(e\) and \(f\) (excluding \(e\) and \(f\)).

We now present the exact value for the b-chromatic index of trees. We use a similar approach than the one used by Irving and Manlove in [15] for the b-chromatic number of trees.

Definition 2.1

A tree \(T\) is called pivoted if it has exactly \(m'(T)\) dense edges and an edge \(e\) such that:

  1. (1)

    Edge \(e\) is not dense.

  2. (2)

    There exist two dense edges that are incident with edge \(e\) and are not incident with each other.

  3. (3)

    Each dense edge is incident to \(e\) or to a dense edge incident to \(e\).

  4. (4)

    Any dense edge incident to \(e\) and to another dense edge which is not incident to \(e\) has degree \(m'(T)-1\).

We call \(e\) the pivot of \(T\) (for an example see Fig. 1).

Fig. 1
figure 1

A pivoted tree \(T\) with \(m'(T)=6\), encircled edge \(e\), and \(\varphi '(T)=5\)

Clearly, the pivot is unique if it exists.

Theorem 2.2

If \(T\) is a pivoted tree, then \(\varphi '(T)=m'(T)-1\).

Proof

Let \(e\) be the pivot of the tree \(T\) and \(E(T)=\{e_1, \ldots ,e_{|E(T)|}\}\) its edges. Let \(E'(T)=\{e_1, \ldots ,e_{m'(T)}\}\), \(m'(T) \le |E(T)|\), be dense edges of \(T\). In addition, let \(e_1, \ldots ,e_p\), \(p \le m'(T)\), be dense edges incident with \(e\) and \(e_1, \ldots ,e_q\), \(q\le p\), dense edges incident with \(e\) that have at least one dense edge not incident to \(e\) as a neighbor. Clearly \(p \ge 2\) by Property \(2\) of Definition 2.1 and \(q \ge 1\), since \(e\) is not a dense edge.

Let us first show that \(\varphi '(T) < m'(T)\). Suppose that there exists a b-edge coloring \(c\) of \(T\) with \(m'(T)\) colors. Without loss of generality assume that \(c(e_i)=i\), \(i \in \{1, \ldots , m'(T)\}\). Since \(d(e_j)=m'(T)-1\), \(j \in \{1, \ldots , q\}\), edges \(e_1, \ldots ,e_q\) are incident to exactly one edge of any other color. Moreover, every dense edge \(e_{p+1}, \ldots , e_{m'(T)}\) is incident with exactly one edge from \(e_1, \ldots ,e_q\). Now \(e\) cannot receive color \(j \in \{1, \ldots , p\}\). Also it cannot receive color \(j \in \{p+1, \ldots , m'(T)\}\), or else some \(e_k\), \(k \in \{1, \ldots , q\}\), is incident to two edges of that color and is not realizable. Hence there is no available color for \(e\).

Next we prove that \(\varphi '(T) = m'(T) - 1\) by constructing a proper b-edge coloring \(c\) of \(T\) with \(m'(T) - 1\) colors. By Property \(2\) of Definition 2.1 there exist two edges \(e_1\) and \(e_i\), \(2\le i\le p\), which are incident to \(e\) and are not incident with each other. Also for some \(r \in \{q+1, \ldots , m'(T)\}\) there exists a dense edge \(e_r\) which is incident to \(e_1\) but not to \(e\). Set \(c(e_j)=j-1\), \(j \in \{2, \ldots ,m'(T)\}\), \(c(e)=r-1\), and \(c(e_1)=i-1\). With this all dense edges are colored together with \(e\).

Next we consider uncolored edges that are incident to some dense edge \(e_i\), \(i \in \{1, \ldots ,m'(T)\}\). Let \(f\) be such an edge. Clearly \(f\) is not dense. There are at most \(m'(T)-2\) colored edges that are incident to \(f\). Hence, we can choose a free color for edge \(f\). Now we repeat the described procedure by choosing another uncolored edge incident to \(e_i\). Each time we choose a color that was not in the neighborhood of \(e_i\). Hence, after coloring all the neighbors of \(e_i\), edge \(e_i\) becomes a dominating edge. This argument applies to each \(e_i\), \(i \in \{1, \ldots ,m'(T)\}\), in turn.

Finally suppose that \(e_{\ell }\) is uncolored for some \(\ell \in \{m'(T)+1, \ldots ,|E(T)|\}\). As \(d(e_{\ell }) < m'(T) - 1\), not all of colors \(1, \ldots , m-1\) appear on neighbors of \(e_{\ell }\). Hence there is some color available for \(e_{\ell }\). It follows that the constructed coloring is a b-edge coloring of \(T\) and \(\varphi '(T)=m'(T) - 1\). \(\square \)

In order to deal with trees that are not pivoted we give the following definition which is closely related to pivoted trees.

Definition 2.3

Let \(T\) be a tree and let \(E'\) be the set of dense edges of \(T\). Suppose that \(E''\) is a subset of \(E'\) of cardinality \(m'(T)\). Then \(E''\) encircles some edge \(e \in E \backslash E''\) if:

  1. (1)

    There exist two dense edges in \(E''\) that are incident with edge \(e\) and are not incident with each other.

  2. (2)

    Each dense edge in \(E''\) is incident to \(e\) or to a dense edge in \(E''\) incident to \(e\).

  3. (3)

    Any dense edge in \(E''\) incident to \(e\) and to another dense edge in \(E''\) which is not incident to edge \(e\) has degree \(m'(T)-1\).

We refer to \(e\) as an encircled edge with respect to \(E''\) (for an example see Fig. 1).

Clearly the pivot is encircled by the set of dense edges in a pivoted tree, but encircled edge of some tree \(T\) is not necessarily the pivot of \(T\). For this observe a tree \(T\) with the encircled edge but more than \(m'(T)\) dense edges. We give the additional definition that incorporates the concept of encirclement.

Definition 2.4

Let \(T\) be a tree and let \(E'\) be the set of dense edges of \(T\). Suppose that \(E''\) is a subset of \(E'\) of cardinality \(m'(T)\). Then \(E''\) is a good set with respect to \(T\) if:

  1. (1)

    Set \(E''\) does not encircle any edge in \(E\backslash E''\).

  2. (2)

    Any edge \(e\notin E''\) with \(d(e) \ge m'(T)\) is incident to some \(f \in E''\) with \(d(f)=m'(T)-1\).

Lemma 2.5

Let \(T\) be a tree. If \(T\) is not a pivoted tree, then there exists a good set for \(T\).

Proof

Let \(E'\) be the set of dense edges of \(T\). By the definition of \(m'(T)\), we may choose \(E'' \subseteq E'\) with \(|E''|=m'(T)\) such that every edge in \(E\backslash E''\) has degree less than \(m'(T)\). Let \(E=\{e_1, \ldots ,e_{|E(T)|}\}\) be ordered in such a way that \(E''=\{e_1, \ldots ,e_{m'(T)}\}\).

If \(E''\) does not encircle an edge, we are done since \(E''\) satisfy Properties \(1\) and \(2\) of Definition 2.4. So we may assume that \(E''\) encircles some edge \(e \notin E''\). Let \(e_1, \ldots ,e_p\) be edges of \(E''\) incident to \(e\), \(p \le m'(T)\), and \(e_1,\ldots ,e_q\), \(q \le p\), edges of \(E''\) incident to \(e\) each having at least one other member of \(E''\), which is not incident to \(e\), as a neighbor. Clearly \(p \ge 2\) by Property \(1\) of Definition 2.3. Also \(q \ge 1\), otherwise \(p=m'(T)\) by Property \(2\) of Definition 2.3, and hence \(d(e) \ge m'(T)\), which contradicts the choice of \(E''\). Thus there exists an edge \(e_r\), \(p+1 \le r \le m'(T)\), incident to \(e_1\) but not to \(e\). Let \(e_i\), \(2\le i\le p\), be an edge incident to \(e\) but not to \(e_1\) (such an edge exists according to Property \(1\) of Definition 2.3).

Case 1 Suppose that edge \(e\) is dense. By the choice of \(E''\) we have \(d(e)=m'(T)-1\). Let \(W=(E'' \backslash \{e_i\}) \cup \{e\}\). Also by the choice of \(E''\), the only edge not in \(W\) that can have degree at least \(m'(T)\) is \(e_i\). But \(e_i\) is incident to \(e \in W\), and \(d(e)=m'(T)-1\). So \(W\) satisfies Property \(2\) of Definition 2.4. Let \(f \in E \backslash W\) be an edge different from \(e_i\) which is incident to some edge of \(W\). Property \(1\) of Definition 2.3 is not fulfilled for \(f\) by \(W\) and \(f\) is not encircled by \(W\). Also \(e_i\) is not encircled by Property 2 of Definition 2.3, since \(e_r\) is to far away from \(e_i\). All other edges from \(E \backslash W\) are not incident with any edge from \(W\) and can not be encircled by \(W\). Hence Property 1 of Definition 2.3 is also fulfilled and \(W\) is a good set.

Case 2 Now suppose that \(e\) is not dense. If \(|E'|=m'(T)\), then tree \(T\) is pivoted for \(e\) which is a contradiction. Hence \(|E'| > m'(T)\) and there exists a dense edge \(f \in E \backslash E''\). Let \(W=(E'' \backslash \{e_1\}) \cup \{f\}\). Suppose that \(W\) encircles some edge \(g\). At most one edge not in \(W\) lies on the path between two arbitrary non-incident edges of \(W\), namely \(g\). But edges \(e_1 \notin W\) and \(e \notin W\) lie on the path between edges \(e_i \in W\) and \(e_r \in W\). This contradiction implies that \(W\) satisfies Property \(1\) of Definition 2.4. Also, \(W\) satisfies Property \(2\) of Definition 2.4, since \(d(e_1)=m'(T)-1\) by Property 3 of Definition 2.3, and therefore every dense edge outside \(W\) has degree less than \(m'(T)\). \(\square \)

We establish next the b-chromatic index of trees that are not pivoted.

Theorem 2.6

If \(T\) is a tree that is not pivoted, then \(\varphi (T)= m'(T)\).

Proof

By Lemma 2.5, we may suppose that \(W = \{e_1, \ldots ,e_{m'(T)}\}\) is a good set of \(m'(T)\) dense edges of \(T\). Such a choice is possible, since \(T\) is not pivoted. Attach color \(i\) to edge \(e_i\), \(i \in \{1, \ldots ,m'(T)\}\). We will show that this partial coloring can be extended to a partial b-edge coloring of \(T\) with \(m'(T)\) colors, in such a way that each \(e_i\) is a dominating edge, and then to a b-edge coloring of \(T\) with the same number of colors.

Let \(U=N(W)\backslash W\). We partition the set \(U\) into two subsets as follows: an edge \(e \in U\) is called inner if there exist two edges \(e_i,e_j \in W\), at distance at most \(2\) from each other, with \(e\) on the path between them; \(e \in U\) is called outer otherwise. We first extend the coloring to all inner edges, then to outer edges and finally to all the remaining edges.

Suppose without loss of generality that \(e_1, \ldots ,e_{m'(T)}\) are numbered in such a way that, if \(i < j\), then \(e_i\) is incident to at least as many inner edges as \(e_j\). Let \(e_1, \ldots ,e_p\) have at least two inner neighbors, \(e_{p+1}, \ldots ,e_q\) have one inner neighbor, and \(e_{q+1}, \ldots ,e_{m'(T)}\) have no inner neighbors. Note that \(P=\{e_1, \ldots ,e_p\}\) or \(Q=\{e_{p+1}, \ldots , e_q\}\) may be empty.

We begin by coloring uncolored inner neighbors of \(e_i\) for each \(i\) from \(1\) to \(q\). Firstly, we deal with inner neighbors of \(e_1, \ldots ,e_p\) (assuming that \(P \ne \emptyset \)). For the induction step, suppose that \(i \le p\), and that inner neighbors of \(e_1, \ldots ,e_{i-1}\) have been colored in such a way that

  1. (a)

    if an inner edge \(e\) is assigned its current color, say color \(k\), during the coloring of the inner neighbors of \(e_j\), then the path from \(e\) to \(e_k\) passes through at least one endvertex of \(e_j\),

  2. (b)

    no two neighbors of any edge \(e_j\) have the same color,

  3. (c)

    no two incident edges have the same color.

Note that basis of induction for \(e_1\) follows by nothing. We show how to color uncolored inner neighbors of \(e_i\) so that these three properties continue to hold.

Let edges \(x_1, \ldots ,x_s\) be inner neighbors of \(e_i\). For each \(j \in \{1, \ldots ,s\}\), because \(x_j\) is inner, there exists an edge \(e_{c_j} \in W\), \(c_j \ne i\), \(e_{c_j}\) is at distance at most \(1\) from \(x_j\), and \(x_j\) is on the path from \(e_i\) to \(e_{c_j}\). Furthermore, edges \(e_{c_1}, \ldots ,e_{c_s}\) are distinct since there are no cycles in a tree.

Case 1 Suppose that \(s > 1\). Note that \(c_i\) is the color of \(e_{c_i}\). Let \(d_1, \ldots ,d_s\) be \(s\) different colors with \(\{d_1, \ldots ,d_s\}=\{c_1, \ldots ,c_s\}\) and \(d_i \ne c_i\) for all \(i\). Apply color \(d_j\) to \(x_j\), \(j \in \{1, \ldots ,s\}\). It is straightforward to verify that Properties (a), (b), and (c) hold.

Case 2 Let \(s=1\). Because \(e_i\) has at least two inner neighbors, there is some neighbor \(f\), which is already colored, say by the color \(d\). Attach \(d\) to \(x_1\) and \(c_1\) to \(f\). Again, it is not difficult to verify that (a), (b), and (c) hold.

Now we deal with uncolored inner neighbors of \(e_{p+1}, \ldots ,e_q\) (assuming that \(Q \ne \emptyset \)). Let \(z_1, \ldots ,z_k\) be those inner neighbors. Clearly \(e_i\), \(i\in \{p+1,\ldots ,q\}\), has at most one neighbor \(z_j\). Thus assigning colors to \(z_1, \ldots ,z_k\), at most one neighbor of each \(e_i\) is colored. It therefore suffices to ensure that, in assigning a color to each \(z_j\), the following holds:

  1. (d)

    the partial coloring remains proper,

  2. (e)

    no \(e_i\) of degree exactly \(m'(T)-1\) has two neighbors of the same color.

Let \({\mathcal {C}}\) be the set of colors defined as follows:

$$\begin{aligned} c \in {\mathcal {C}} \Leftrightarrow \left( e_c \in N\left( z_j\right) \right) \vee \left( \exists d: e_c \in N\left( e_d\right) \wedge e_d \in N\left( z_j\right) \wedge d \left( e_d \right) =m'(T)-1 \right) , \end{aligned}$$

where \(c,d \in \{1, \ldots , m'(T)\}\). If we choose a color \(c \notin {\mathcal {C}}\), then (d) and (e) continue to hold. If \({\mathcal {C}}=\{1, \ldots ,m'(T)\}\), then \(z_j\) is encircled by \(W\), which is a contradiction since \(W\) is a good set. Hence there is always a choice of color for \(z_j\). Note that each \(e_r\), \(r \in \{p+1, \ldots ,q\}\), has only one inner neighbor colored in this way. Thus if \(d(e_r) \ge m'(T)\), then at most two edges incident to \(e_r\) have the same color. All inner edges are now colored.

Next we deal with outer edges of \(U\). Outer neighbors of \(e_i\), \(i \in \{1, \ldots ,m'(T)\}\) can be colored independently. Let \(f\) be an outer neighbor. The only colored edges incident to \(f\) are some dense edges and some inner edges. But they are all incident in the same endvertex of edge \(f\), which means that every outer neighbor has at most \(\Delta (T)-1\) colored neighbors. Hence, we can choose a free color for edge \(f\) since \(m'(T) > \Delta (T) - 1\). Now we repeat the described procedure by choosing another uncolored edge incident to \(e_i\). Each time we choose a color that is not in the neighborhood of \(e_i\). Hence, after coloring all neighbors of \(e_i\), edge \(e_i\) becomes a dominating edge. This argument applies to each \(e_i\), \(i \in \{1, \ldots ,m'(T)\}\) in turn.

We may extend this partial b-edge coloring with \(m'(T)\) colors to a b-edge coloring of \(T\) with \(m'(T)\) colors as follows. Any remaining uncolored edge \(e\) must satisfy \(d(e) \le m'(T)-1\). For, if \(d(e) \ge m'(T)\), then by Property \(2\) of Definition 2.4, \(e\) is incident to some edge \(f \in W\), where \(d(f)=m'(T)-1\), so that \(e\) was already colored. An edge \(e\) of degree less than \(m'(T)\) cannot have neighbors colored with all colors \(1, \ldots ,m'(T)\). Hence, there is some color available for edge \(e\). This completes the construction of a b-edge chromatic coloring of \(T\) with \(m'(T)\) colors. \(\square \)

Testing whether a tree is pivoted may be carried out in polynomial time (one needs to check for dense edges the neighborhood and the second neighborhood of each edge that is not dense). From Theorems 2.2 and 2.6, it follows that we can compute the b-chromatic index of a tree in polynomial time.

Corollary 2.7

If  \(T\) is a tree and \({\mathcal {L}}(T)\) is its line graph, then \(\varphi ( {\mathcal {L}}(T))\) can be determined in polynomial time.

As we will see next, trees are already enough to show that the lower bound and the upper bound are tight with respect to the maximum degree. For this let \(k\) be a fixed positive integer and let \(T\) be a tree on \(n\) vertices with \(\Delta (T)\le k\). Clearly \(T\) has \(n-1\) edges. We construct tree \( T'\) from \(T\) as follows. Attach \(k-\deg (u)\) pendant vertices to every vertex \(u\) of \(T\). Hence \(T'\) has exactly \(n\) vertices of degree \(k\) and all other vertices of \(T'\) have degree 1. Moreover all vertices of degree \(k\) in \(T'\) form a connected subtree of \( T'\) which is \(T\). All edges of \(T'\) that are also in \(T\) have degree \(2k-1\) and we have \(n-1\) such edges. Moreover, \(T'\) is clearly not a pivoted tree. If \(n\le \Delta (T^{\prime })=k\), we have \(m'(T')=\Delta (T')\) and with this also \(\varphi '(T')=\Delta (T')\) by Theorem 2.6. For \(\Delta (T')< n \le 2\Delta (T')\), we have \(n-1\) edges in \(T'\) of degree \(2\Delta (T')-2\), while all other edges have degree \(k-1\). Thus \(m'(T')=n-1\) and so \(\varphi '(T')=n-1\) by Theorem 2.6. We have constructed a tree \(T'\) with \(\varphi '(T^{\prime })=n-1\) for an arbitrary \(n\) with \(\Delta (T')\le n-1\le 2\Delta (T')-1\). We have proved the following theorem.

Theorem 2.8

There exists a tree \(T'\) with maximum degree \(\Delta (T')\), such that \(\varphi '(T')=\ell \) for every integer \(\ell \) and \(\Delta (T')\le \ell \le 2\Delta (T')-1\).

3 Graphs with \(\varphi '(G)=m'(G)\)

As in the case of the b-chromatic number regular graphs play an important role also for the b-chromatic index. First reason for this is that \(m^{\prime }(G)=2\Delta (G)-1\) for any regular graph. Another reason is that we can always end the coloring by a greedy algorithm once we have a partial coloring of \(G\) in which all \(2\Delta (G)-1\) colors are realized. Thus we have \( \varphi '(G)=2\Delta (G)-1\) for a regular graph \(G\), if we can find such a partial coloring of \(G\).

First recall that a graph \(G\) is of class 1 if \(\chi '(G)=\Delta (G)\) and of class 2 if \(\chi '(G)=\Delta (G)+1\). For a vertex \(v\) of \(G\), let \(S_2(v)\) be the set of all vertices of \(G\) that are at distance 2 to \(v\). We define the graph \(G[v]\) as the subgraph of \(G\) induced by \(N(v)\cup S_2(v)\).

Theorem 3.1

Let \(G\) be a \(d\)-regular graph with \(\mathrm {diam}(G)\ge 4\) and let \(u\) and \(v\) be two vertices at distance at least 4. If \(G[u]\) and \(G[v]\) are class 1 graphs with \(\Delta (G[u])=\Delta (G[v])=d-1\), then

$$\begin{aligned} \varphi '(G)=2d-1. \end{aligned}$$

Proof

We split colors into two sets \( A=\{1,\ldots ,d\}\) and \(B=\{d+1,\ldots ,2d-1\}\). Let \(N(u)=\{u_{1},\ldots ,u_{d}\}\) and \(N(v)=\{v_{1},\ldots ,v_{d}\}\). We define edge coloring \( c:E(G)\rightarrow \{1,\ldots ,2d-1\}\) as follows. Let \(c(u_{i}u)=i\) for \( i\in \{1,\ldots ,d\}\) and \(c(v_{i}v)=d+i\) for \(i\in \{1,\ldots ,d-1\}\). In addition let \(c(v_{d}v)=1\). Next we color all edges of \(G[u]\) and \(G[v]\). Since they are both class 1 graphs, there exists an edge coloring of each with \(\Delta (G[u])=\Delta (G[v])=d-1\) colors. We use colors from \(B\) for \(G[u]\) and colors from \(A-\{1\}\) for \(G[v]\). Note that every \(u_i\), \(i\in \{ 1,\ldots ,d\}\), has degree \(d-1\) in \(G[u]\) and thus have all colors from \(B\) on its incident edges. But then color \(i\) is realized on \(uu_i\) for every \(i\in \{ 1,\ldots ,d\}\). Similarly every \(v_i\), \(i\in \{ 1,\ldots ,d\}\), has degree \(d-1\) in \(G[v]\) and thus have all colors from \(A-\{1\}\) on its incident edges. But then color \(d+i\), is realized on \(vv_i\) for every \(i\in \{ 1,\ldots ,d-1\}\). Hence all colors are realized and this partial coloring is a proper coloring since \(d(u,v)\ge 4\). Since all colors are realized and we have \(2d-1\) colors we can end the coloring by the greedy coloring. Hence \(c'\) is a b-edge coloring and \(\varphi '(G)=2d-1\). \(\square \)

Note that condition \(\Delta (G[v])=d-1\) implies that each vertex from \(S_2(v)\) has a neighbor at distance 3 from \(v\). Also for every bipartite graph \(G\) and any vertex \(v\) of \(G\), the graph \(G[v]\) is bipartite (bipartition is induced with \(N(v)\) and \(S_2(v)\)) with \(\Delta (G[v])=d-1\). Since every bipartite graph is class 1 graph by König’s Theorem, we have the next corollary.

Corollary 3.2

If \(G\) is a bipartite \(d\)-regular graph with \(\mathrm {diam}(G)\ge 4\), then \(\varphi '(G)=2d-1\).

In particular, for \(n\ge 4\), the hypercube \(Q_n=\Box _{i=1}^n\,K_2\) has diameter \(n\) and is a bipartite \(n\)-regular graph. Hence \(\varphi '(Q_{n})=2n-1\). However \(\varphi '(Q_{2})=2<3\) and \(\varphi '(Q_{3})=4<5\) as we will see in the next section.

One of the most important questions about the b-chromatic number is whether the Petersen graph \(P\) is the only regular graph \(G\) of girth 5 with its b-chromatic number strictly lower than \(m(G)\). We will see that this is not a problem for the b-chromatic index.

Theorem 3.3

If \(G\) is a \(d\)-regular graph with girth \(g\ge 5\), then

$$\begin{aligned} \varphi '(G)=2d-1. \end{aligned}$$

Proof

Let \(e=uv\) be an edge in a graph \(G\) with girth \(g\ge 5\) and let \(N_{u}(e)=\{uu_{2},\ldots ,uu_{d}\}\) and \(N_{v}(e)=\{vv_{d+1},\ldots ,vv_{2d-1}\}\). We define a partial edge coloring \(c:E(G)\rightarrow \{1,\ldots ,2d-1\}\) in the following way:

  • \(c(uv)=1\),

  • \(c(uu_{i})=i,i\in \{2,\ldots ,d\}\),

  • \(c(vv_{j})=j,j\in \{d+1,\ldots ,2d-1\}\).

Vertices \(u_{i}\) cannot be adjacent to vertices \(v_{j}\), otherwise we would get a \(4\)-cycle contrary to the assumption. Since \( N(u_{i})\cap N(u_{j})=\emptyset \) and \(N(v_{i})\cap N(v_{j})=\emptyset \) for all applicable indices \(i\) and \(j\), we can continue the coloring procedure in the following way. Assign colors \(\{d+1,\ldots ,2d-1\}\) to all non-colored edges incident with \(u_{i},i\in \{2,\ldots ,d\}\), and colors \(\{2,\ldots ,d\}\) to all non-colored edges incident with \(v_{j},j\in \{d+1,\ldots ,2d-1\}\). With this partial edge coloring all colors are realized on edges \(uv\), \(uu_i\), and \(vv_j\) for every \(i\in \{2,\ldots ,d\}\) and \(j\in \{d+1,\ldots ,2d-1\}\). Color the rest of the graph with the greedy algorithm to get a proper b-edge coloring of \(G\) with \(2d-1\) colors. \(\square \)

4 Graphs with \(\varphi '(G)<m'(G)\)

We have shown in the previous section that for many graphs equality \(\varphi '(G)=m'(G)\) holds. One can get the impression that finding \( \varphi '(G)\) is not a hard problem. However, as we will see in this section, things can be different when \(\varphi '(G)<m'(G)\). Indeed, once this inequality holds, it seems to be very hard to find the exact value for \(\varphi '(G)\).

A graph \(G\) is an edge regular graph or \(d\)-edge regular graph if all edges of \(G\) have degree \(d\). Clearly every \(d\)-regular graph is also a \(2(d-1)\)-edge regular graph and \(K_{m,n}\) is a \((m+n-2)\)-edge regular graph.

Lemma 4.1

If \(G\) is a \(d\)-edge regular graph with minimum degree \( \delta \ge 4\) and \(\varphi '(G)=d+1\), then at most two edges of any \(4\)-cycle and at most two edges of any triangle realize their color in a \( (d+1)\)-b-edge coloring of \(G\).

Proof

Let \(G\) be a \(d\)-edge regular graph with \( \varphi '(G)=d+1\) and let \(c:E(G)\rightarrow \{1,\ldots ,d+1\}\) be a b-edge-coloring of \(E(G)\). Suppose that \(\{u_{1},u_{2},u_{3},u_{4}\}\) form a four cycle \(C_4\) and that \(u_{1}u_{2}\) realizes color \(1\). We split colors in two sets \(A=\{i:c(u_{1}v)=i\}\) and \(B=\{i:c(u_{2}w)=i\}\). Hence in \(A\) and in \(B\) are colors of all edges that are incident with \(u_{1}\) and \(u_{2}\), respectively. Since \(\varphi '(G)=d+1\), we have \(A\cap B=\{1\}\) and \(A\cup B=\{1,\ldots ,d+1\}\). In particular \(c(u_2u_3)\in B\), \(c(u_4u_1)\in A\), and \(c(u_2u_3)\ne c(u_4u_1)\). Let \(c(u_2u_3)=2\) and \(c(u_4u_1)=4\). Moreover, if \(c(u_2u_3)=1\), then \(u_2u_3\) and \(u_4u_1\) do not realize colors 2 and 4, respectively, since \(u_1u_2\) and \(u_3u_4\) have color 1. Therefore, we can assume that \(c(u_3u_4)=3\).

It is enough to show that three (or more) consecutive edges of \(C_{4}\) cannot all realize their color. Suppose first that \(u_{2}u_{3}\) realizes color \(2\). Color \(3\) must then be in \(A\) and the set \(C\) that contains colors of all edges incident with \(u_{3}\) equals \(\{2\}\cup (A-\{1\})\). Thus \(u_{3}u_{4}\) does not realize color 3, since it has two edges of color 4 in its neighborhood. Also \(u_{4}u_{1}\) does not realize color 4, since it has two edges of color 3 in its neighborhood.

Let now \(u_{1}u_{2}u_{3}\) be a triangle in \(G\). Set \(c(u_{1}u_{2})=1\), \(c(u_{2}u_{3})=2\), and \(c(u_{3}u_{1})=3\). Suppose that \(u_{1}u_{2}\) and \( u_{2}u_{3}\) realize colors \(1\) and \(2\), respectively. Let \(A\) and \(B\) be as before. Then \(C=\{i:c(u_{3}w)=i\}\) equals to \(\{2\}\cup (A-\{1\})\) since \(\varphi ^{\prime }(G)=d+1\) and \(u_{1}u_{2}\) and \(u_{2}u_{3}\) realize their colors. Hence \(u_{1}u_{3}\) does not realize its color since no colors from \(B-\{1,2\}\) are in the neighborhood of \(u_1u_3\). \(\square \)

Note, from the above proof, that we have two possibilities. Namely, realizable edges of \(C_{4}\) are either two consecutive edges of \(C_{4}\) or two opposite edges of \(C_{4}\). Also \(C_{4}\) is not necessarily an induced cycle. But if \( C_{4}\) is not induced, we need the additional condition \(\delta \ge 4\) of Lemma 4.1. If \(u_{1}u_{3}\in E(G)\), then \(c(u_{1}u_{3})\ne 3\) and we need an additional edge incident with \(u_{1}\) so that color 3 is in \( A \). Hence if we demand an induced cycle \(C_{4}\), we do not need the condition \(\delta \ge 4\) anymore.

By observing \(\varphi '(K_{n})\) for small \(n\) it seems that it equals to \(\chi '(K_{n})\). Namely, it is not hard to see that \(\varphi '(K_{3})=3\), \(\varphi '(K_{4})=3\) and \(\varphi '(K_{5})=5\). However, we have \(\varphi '(K_{6})=6\) which breaks the above suggestion. Indeed, the following 6-b-edge-coloring of \(K_6\) is due to Stephan Brandt (personal communication). Color consecutive edges of \(C_6\) by 1,2,3,1,2,3. The remaining edges of \(K_6-E(C_6)\) form a triple perfect matching. Edges of each of this matching receive the same color 4, 5, and 6.

Proposition 4.2

If \(n\ge 4\), then \(\varphi '(K_{n})<m'(K_{n}) \).

Proof

As mentioned above \(\varphi '(K_{4})=3<5=m'(K_4)\). Now let \(n\ge 5\). Suppose that \(\varphi ^{\prime }(K_{n})\ge m'(K_{n})=2n-3\) and let \(c\) be a b-edge coloring of \( E(K_{n})\) with \(2n-3\) colors. Let \(H\) be a spanning subgraph of \(K_{n}\) whose edges are realizable edges of \(c\). By Lemma 4.1 \(H\) has no triangle and no four cycle. Moreover, \(H\) is a forest. Namely, if \(C_{k}\), \(k>4\), is in \(H\), then three consecutive edges of \(C_{k}\) are all realizable on a four cycle in contradiction to Lemma 4.1. This forest has the most edges if it is a tree \(T\). But a spanning tree \(T\) has at most \( n-1\) edges which is a contradiction. \(\square \)

For complete bipartite graphs, recall the well-known result (see [13, Proposition1.2]) that \({\mathcal {L}} (K_{p,r})=K_{p} \,\Box \,K_{r}\). Kouider and Mahéo have shown in [19] that \(\varphi (K_{p}\,\Box \,K_{r})=r\) whenever \(r\ge p(p-1)\) and for \(p\le r<p(p-1)\) we have \(r\le \varphi (K_{p}\,\Box \,K_{r})\le p(p-1)\) . Hence we have \(\varphi '(K_{p,r})=r\) for \(r\ge p(p-1)\) and \( r\le \varphi '(K_{p,r})\le p(p-1)\) for \(p\le r<p(p-1)\). In particular, for \(p=2\), we have \(\varphi '(K_{2,r})=r\) for every \( r\ge 2\). We can immediately improve the upper bound in many cases since \( K_{p,r}\) is an edge regular graph with \(m'(K_{p,r})=p+r-1\). Hence

$$\begin{aligned} \varphi '(K_{p,r})\le \min \{p(p-1),p+r-1\} \text{ for } p\le r<p(p-1). \end{aligned}$$

To improve this we need some further arguments.

Proposition 4.3

If \(r\ge p\ge 3\), then \(\varphi ^{\prime }(K_{p,r})<m'(K_{p,r})\).

Proof

If \(r\ge p(p-1)\) we are done by results from [19] (see the above discussion). Thus suppose that \(\varphi ^{\prime }(K_{p,r})=m'(K_{p,r})=p+r-1\) and let \(c\) be a b-edge-coloring of \( E(K_{p,r})\) with \(p+r-1\) colors. Let \(H\) be a spanning subgraph of \(K_{p,r}\) whose edges are realizable edges of \(c\). Again \(H\) is a forest, since every cycle \(C_{k}\), \(k\ge 4\), induce a four cycle in \(K_{p,r}\) with three realizable edges, which is not possible by Lemma 4.1. Moreover, if edges \(uv\) and \(vw\) are realizable for some colors, then no edge \(ux\) or \(wx\) is realizable, since it is on a common four cycle \(uvwxu\). Hence we must find a cover of \(K_{p,r}\) by stars with maximum number of edges and every edge of this stars can be a realizable edge. Clearly this number is \(p+r-2\) if we take two stars \(K_{1,r-1}\) and \(K_{1,p-1}\). Thus we have \(p+r-2\) candidates for realizable edges, which is a contradiction, since we need at least \(p+r-1\) candidates. \(\square \)

We believe that this upper bound can be lowered by one in general, but not more as can be seen from the following schemes. On the scheme we present the b-edge colorings of \(K_{3,3}\), \(K_{4,4}\), and \(K_{5,5}\) with 3, 5, and 7 colors, respectively:

$$\begin{aligned}&K_{3,3}: \begin{array}{ccc} \tilde{1}\tilde{2}\tilde{3} &{} 231 &{} 312 \\ \tilde{1}23 &{} \tilde{2}31 &{} \tilde{3}12 \end{array} ;\ K_{4,4}: \begin{array}{cccc} \tilde{1}\tilde{2}\tilde{3}4 &{} \tilde{4}523 &{} \tilde{5}342 &{} 2451 \\ \tilde{1}\tilde{4}\tilde{5}2 &{} \tilde{2}534 &{} \tilde{3}245 &{} 4321 \end{array} ;\\ {}&K_{5,5}: \begin{array}{ccccc} \tilde{1}\tilde{2}\tilde{3}\tilde{4}7 &{} \tilde{5}6734 &{} \tilde{6}7413 &{} 73162 &{} 256\tilde{7}1 \\ \tilde{1}\tilde{5}\tilde{6}72 &{} \tilde{2}6735 &{} \tilde{3}7416 &{} \tilde{4}316\tilde{7} &{} 54321 \end{array} . \end{aligned}$$

Here \(12347\) in first line and first column of \(K_{5,5}\) represents colors of \(u_{1}w_{1}\), \(u_{1}w_{2}\), \(u_{1}w_{3}\), \(u_{1}w_{4}\), and \(u_{1}w_{5}\), respectively, and \(\tilde{k}\) means that this edge realizes color \(k\). Unfortunately we could not find a pattern for every graph \(K_{n,n}\). Next we show that there exists no \(4\)-b-edge coloring of \(K_{3,3}\), which is a difficult task already, since we cannot use Lemma 4.1 anymore.

Proposition 4.4

\(\varphi '(K_{3,3})=3\).

Proof

Suppose that there exists a \(4\)-b-edge coloring of \(K_{3,3}\) and let \(c\) be a b-edge-coloring of \(E(K_{3,3})\) with \(4\) colors. Let \(H\) be a spanning subgraph of \(K_{3,3}\) whose edges are realizable edges of \(c\). We will analyze all different possibilities for \(H\). If \(H\) is isomorphic to a forest of two stars \(K_{1,2}\), we have a contradiction, since the edge between the centers of these two stars cannot be colored by any of the four colors. If \(H\) contains \(C_{4}\) as a subgraph, we have a contradiction since the edges between vertices of \(K_{3,3}\) that are not in \(C_4\) cannot be colored. If \(H\) is isomorphic to \(P_{4}\cup K_{2}\), the middle edge of \(P_{4}\) is not realizable, since the color of \(K_{2}\) cannot be in its neighborhood. If there exists a path \(P_{5}\) in \(H\) and an isolated vertex \(x\), we first concentrate on the first and last edge \(e\) and \(f\), respectively, of \(P_{5}\) . It is easy to see that all edges, except the edge between the middle vertex of \(P_{5}\) and \(x\), must be colored, so that \(e\) and \(f\) are realizable edges. In that case the middle edges of \(P_{5}\) are not realizable, since only one edge remains and each of them needs one additional color. Finally, suppose that \(H\) contains one component that is isomorphic to \(K_{1,3}\) in which one edge is subdivided, and one isolated vertex. It is easy to see, that edges of \(K_{1,3}\) that where not subdivided cannot both be realizable, since only one can have the color of the other pendant edge in its neighborhood. \(\square \)

It is straightforward to see that a \(k\)-partite complete graph \(K_{n_{1},\ldots ,n_{k}}\) is an edge regular graph if and only if \(n_{1}=\cdots =n_{k}=n\). Then \(K_{n_{1},\ldots ,n_{k}}\) is \((k-1)n\)-regular graph and we will use notation \(K_{n}^{k}\) for this graph.

Proposition 4.5

If \(k\ge 3\) and \(n\ge 2\) are positive integers, then \(\varphi ^{\prime }(K_{n}^{k})<m'(K_{n}^{k})\).

Proof

Suppose that \(\varphi ^{\prime }(K_{n}^{k})=m'(K_{n}^{k})=2(k-1)n-1\) and let \(c\) be a b-edge-coloring of \(E(K_{n}^{k})\) with \(2(k-1)n-1\) colors. Let \(H\) be a spanning subgraph of \(K_{n}^{k}\) whose edges are realizable edges of \(c\). By Lemma \(H\) is a forest. In contrast to the proof of Proposition , here we can have a component different than a star. Clearly we have more edges if the number of components of \(H\) is smaller. Nevertheless, even if \(H\) is a tree, we have \(kn-1\) edges in \(H\), which is not enough, since \(k\ge 3\). \(\square \)

Let \(G\) be a regular graph. In view of Theorem 3.1, one can expect more graphs with \(\varphi '(G)<m'(G)\) among those with small diameter (\(<\)4). Such are Hamming graphs with two or three factors. It seems that it is quite hard to give an exact answer for \(\varphi ' (K_{p}\,\Box \,K_{r})\). The impression is that, if \(p\) and \(r\) are “large” enough, we have equality between \( \varphi '\) and \(m'\). For this note that from Lemma it easily follows that \(\varphi '(K_{2}\,\Box \,K_{3})<m'(K_{2}\,\Box \,K_{3})=5\), but in the following scheme there is a 4-b-edge coloring of \(K_{2}\,\Box \,K_{3}\), which yields \(\varphi '(K_{2}\,\Box \,K_{3})=4\). On this scheme also an \(11\)-b-edge coloring of \(K_{3}\,\Box \,K_{5}\) is presented (note that \(m'(K_{3}\,\Box \,K_{5})=11\)).

$$\begin{aligned} K_{2}\,\Box \,K_{3}: \begin{array}{ccc} \tilde{2}4 &{} \tilde{3} &{} - \\ \tilde{1} &{} 1 &{} 1 \\ 3\tilde{4} &{} 2 &{} - \end{array} ;\ \ K_{3}\,\Box \,K_{5}: \begin{array}{ccccc} \tilde{1}\tilde{2}\tilde{3}\tilde{4} &{} 7\ 11\ 8 &{} 8\ 11 &{} 7 &{} - \\ 3 &{} 10 &{} 10 &{} 10 &{} 10 \\ \tilde{5}\tilde{6}\tilde{7}\tilde{8} &{} 3\ 4\ 11 &{} 11\ 4 &{} 3 &{} - \\ 1 &{} 2 &{} 2 &{} 2 &{} 2 \\ \tilde{9}\widetilde{10}\widetilde{11}3 &{} 4\ 8\ 7 &{} 7\ 8 &{} 4 &{} - \\ 5 &{} 6 &{} 6 &{} 6 &{} 6 \end{array} . \end{aligned}$$

Again \(\tilde{k}\) is the edge that realizes color \(k\). Every odd line represents colors of edges of a layer of the second factor (\(K_3\) or \(K_{5}\)), while every even line represents colors of edges of the first factor (\(K_2\) or \(K_{3}\)) that projects to the same edge. Furthermore, for \(V(K_n)=\{1,\ldots ,n\}\), in every odd line numbers that are written in \(i\)-th column present consecutive colors of edges \( (i,i+1),\ldots ,(i,n)\) for \(i\in \{1,\ldots ,n-1\}\).

For \(Q_{3}=K_{2}\,\Box \,K_{2}\,\Box \,K_{2}\) it is easy to see, with the use of Lemma 4.1, that \(\varphi '(Q_{3})<m^{\prime }(Q_{3})=5\). Also it is easy to construct a \(4\)-b-edge coloring of \(Q_{3}\) (every perfect matching receives all four colors). Hence \(\varphi ^{\prime }(Q_{3})=4\). In general for \(K_{p}\,\Box \,K_{q}\,\Box \,K_{r}\), \(p\le q\le r \), it seems that if \(q>2\) we can expect equality between \(\varphi ^{\prime }\) and \(m'\). On the other hand we do not dare to predict what happens if \(\mathrm{p}=\mathrm{q}=2\). Namely, if \(\varphi '\) is always less than \( m'\), or there exists an integer \(k\), such that equality holds for every \(r\ge k \), or equality holds for some integers and for some not.

5 3-Regular Graphs

We already know that if \(G\) is a \(d\)-regular graph, then \(\varphi ^{\prime }(G)\le 2d-1\). Many of \(d\)-regular graphs achieve this trivial upper bound by Theorems 3.1 and 3.3. Determining \(\varphi '(G)\) is equivalent to determining \(\varphi ({\mathcal {L}}(G))\) which is also a regular graph. According to the theorem of Kratochvíl et al. [22] there are only a finite number of regular graphs with \(\varphi \) smaller then the trivial upper bound. Hence there are only a finite number of \(d\)-regular graphs \(G\) with \(\varphi ^{\prime }(G)<2d-1\). Can we find them all? In [16] all exceptions for the \( b \)-chromatic number were described for the smallest nontrivial \(d\)-regular graphs, namely for cubic graphs. We follow their approach also for the b-chromatic index of cubic graphs. The following lemma provides a useful tool to decrease the number of cases to be treated.

Lemma 5.1

Let \(G\) be a cubic graph. If \(G\) has an induced cycle \(C_5\) or an induced path \(P_6\), then \(\varphi ^{\prime }(G)=5\).

Proof

Suppose that a cubic graph \(G\) has an induced cycle \( C_{5}=x_{1}x_{2}x_{3}x_{4}x_{5}\). Color edges of \(C_{5}\) by colors \(1,\ldots ,5\). Since \(C_{5}\) is induced, there are no edges between its vertices. For any \(i\in \{1,2,3,4,5\}\) denote with \(y_{i}\) the third vertex to which the vertex \(x_{i}\) is adjacent, see Fig. 2. Note that some \(y_{i}\)s might represent the same vertex. According to Fig. it is obvious that all edges of \(C_{5}\) are realizable. We can complete the coloring to whole \(G\) by the greedy algorithm.

Fig. 2
figure 2

Induced subgraph \(C_{5}\)

Suppose now that \(G\) has an induced path \(P_{6}=x_{1}x_{2}x_{3}x_{4}x_{5}x_{6}\). Color edges of \(P_{6}\) by colors \(1,\ldots ,5\). Since \(P_{6}\) is induced, there are no edges between its vertices. Let \(y_{0}\) and \(y_{1}\) be two additional neighbors of vertex \(x_{1} \). Further, let \(y_{6}\) and \(y_{7}\) two addition neighbors of vertex \(x_{6}\). For \(i\in \{2,3,4,5\}\) the vertex \(x_{i}\) has only one addition neighbor \(y_{i}\). See Fig. 3 for this notations. Note that some \(y_{i}\)s might represent the same vertex. Note that at most one of \(y_{0}\) and \(y_{1}\) can be equal to \(y_{3}\) and at most one of \(y_{6}\) and \(y_{7}\) can be equal to \(y_{4}\). If this is the case, then incident edges receive different colors (see the lower graph on Fig. 3). Now even if one of \(y_{0} \) or \(y_{1}\) equals to \(y_{6}\) or \(y_{7}\) (see the lower graph on Fig. 3), we can properly color edges so that all colors on \(P_6\) are realizable. The rest of \(G\) can again be colored by the greedy algorithm. \(\square \)

Fig. 3
figure 3

Induced subgraph \(P_{6}\)

Now we can prove the main theorem of this section.

Theorem 5.2

Let \(G\) be a connected cubic graph. Then \(\varphi ^{\prime }(G)=5\) if and only if \(G\) is not isomorphic to \(K_{4}\), \(K_{3}\,\Box \,K_{2} \), \(K_{3,3}\), or \(Q_{3}\). Moreover, \(\varphi ^{\prime }(K_{4})=3\), \(\varphi '(K_{3,3})=3\), \(\varphi ^{\prime }(K_{3}\,\Box \,K_{2})=4\), and \(\varphi '(Q_{3})=4\).

Proof

We have already seen that \(\varphi ^{\prime }(K_{4})=3\), \(\varphi '(K_{3,3})=3\), \(\varphi ^{\prime }(K_{3}\,\Box \,K_{2})=4\), and \(\varphi '(Q_{3})=4\).

Let now \(G\) be a cubic graph not isomorphic to \(K_{4}\), \(K_{3}\,\Box \,K_{2}\) , \(K_{3,3}\), or \(Q_{3}\). The proof of this direction is constructive and leads to an algorithm that finds appropriate subgraphs. Moreover, according to Lemma 5.1 we wish to find an induced cycle \(C_{5}\) or an induced path \(P_{6}\) in analyzed cases.

We will analyze cases with respect to the girth of a given cubic graph \( G \). Let \(g\) be its girth and let \(C\) be a \(g\)-cycle of \(G\). For \(i\ge 1\), let

$$\begin{aligned} D_{i}=\{v\in V(G):d(v,C)=i\} \end{aligned}$$

be the \(i\)-th distance level from \(C\). According to Theorem 3.3, we only need to consider cases where \(g=3\) and \(g=4\). In the following figures, we usually present only a part of the graph in which we find an induced \(C_{5}\) or \(P_{6}\), since the rest can be colored by the greedy algorithm. Also we do not draw all possibilities that have the same induced \( C_{5}\) or \(P_{6}\), but just one representative.

Case 1 \(g = 3\). In this case \(C\) is a triangle. We distinguish subcases with respect to the size of \(D_1\).

Case 1.1 \(|D_{1}|=1\). In this subcase \(G\cong K_{4}\) which is forbidden.

Case 1.2 \(|D_{1}|=2\). Let \(D_{1}=\{x,y\}\). Note that there is a unique way (up to the isomorphism) how \(x\) and \(y\) are adjacent with the vertices of \(C\). Assume without loss of generality that \(x\) has two neighbors in \(C\) (and hence \(y\) has one).

Suppose first that \(xy\notin E(G)\). If \(x\) and \(y\) have a common neighbor in \(D_{2}\), then we have an induced \(C_{5}\), see the left graph on Fig. . If \(x\) and \(y\) have no common neighbor in \(D_{2}\), then \( |D_{2}|=3\). If vertices of \(D_{2}\) induce a triangle, then there is no vertex in \(D_{3}\) and this graph has no induced \(C_{5}\) or \(P_{6}\), but there is a 5-b-edge coloring on the second graph of Fig. 4 . If \(D_{2}\) does not induce a triangle, then \(|D_{3}|\ge 1\) and one neighbor of \(y\) has a neighbor in \(D_3\). This yields an induced \(P_6\), see the third graph of Fig. 4. Finally if \(xy\in E(G)\), then \(|D_{2}|=1\), \(|D_{3}|=2\), and \(|D_{4}|\ge 1\). In all cases there exists an edge from \(D_3\) to \(D_4\) as denoted on the right graph of Fig. 4, and therefore we have an induced \(P_6\).

Fig. 4
figure 4

Subgraphs with \(g=3\) and \(|D_{1}|=2\)

Case 1.3 \(|D_{1}|=3\). In this subcase each vertex from \(C\) has its own private neighbor in \(D_{1}\). If vertices of \(D_{1}\) induced a triangle, we get the forbidden graph \(K_{3}\,\Box \,K_{2}\). Hence suppose that \(D_{1}\) does not induce a triangle and we always have two nonadjacent vertices in \(D_{1}\). If two nonadjacent vertices of \(D_{1}\) have a common neighbor in \(D_{2}\), then there exists an induced \(C_{5}\), see the left graph of Fig. . If \(D_{1}\) induces \(3K_1\) and no two vertices of \(D_{1}\) have a common neighbor in \(D_{2}\), then we have \(|D_{2}|=6\), and there exists two nonadjacent vertices in \(D_{2}\) with different neighbors in \(D_{1}\). They form an induced \(P_{6}\), see the second graph of Fig. 5 for one possibility. Suppose now that \(D_1\) induces \(K_2 \cup K_1\) and denote \(K_1\) by \(x\). If a neighbor of \(x\) in \(D_2\) coincides with a neighbor of some other vertex of \(D_1\), we get an induced \(C_5\), see the third graph of Fig. 5. If a neighbor of \(x\) in \(D_2\) is nonadjacent with a vertex of \(D_2\), which is nonadjacent to \(x\), we have an induced \(P_6\), see the fourth graph of Fig. 5 (doted line means there is no edge). Otherwise both neighbors of \(x\) in \(D_2\) are adjacent to both neighbors in \(D_2\) of \(K_2\) in \(D_1\). This graph contains an induced \(C_5\), see the fifth graph of Fig. 5. Finally, if \(D_1\) induces \(P_3\), we have an induced \(C_5\), see the last graph of Fig. 5.

Fig. 5
figure 5

Subgraphs with \(g=3\) and \(|D_{1}|=3\)

Case 2 \(g=4\). Now \(C\) is a square. Note that two adjacent vertices of \(C\) have no common neighbor in \(D_{1}\). Once more we distinguish subcases with respect to the size of \(D_{1}\). It is obvious that the case \(|D_{1}|=1\) is not possible.

Case 2.1 \(|D_{1}|=2\). If vertices of \(D_{1}\) are adjacent, we obtain \(K_{3,3}\) which is forbidden. We have an induced \(C_{5}\) if vertices of \(D_1\) have a common neighbor in \(D_{2}\), see the left graph of Fig. 6. If vertices of \(D_1\) have no common neighbor in \(D_2\), we have \(|D_2|=2\). If these two vertices are not adjacent, we have an induced \(P_6\), see the middle graph of Fig. 6. Otherwise, they are adjacent and \(|D_3|\ge 1\), which again results in an induced \(P_6\), see the right graph of Fig. 6.

Fig. 6
figure 6

Subgraphs with \(g=4\) and \(|D_{1}|=2\)

Case 2.2 \(|D_{1}|=3\). Here two nonadjacent vertices of \(C\) must have a common neighbor \(x\) in \(D_{1}\), while the other two have exactly one neighbor \(y\) and \(w\) in \(D_{1}\). If \(yw\in E(G)\), we have an induced \(C_{5}\), see the first graph of Fig. 7. If \(xy\in E(G)\) (and analog when \(xw\in E(G)\)), we have \(|D_{2}|\ge 2\). This yields an induced \(P_{6}\), since \(w\) has two neighbors in \(D_2\) and only one of them can be equal to the neighbor of \(y\) in \(D_2\), see the second graph of Fig. 7. Hence no two vertices of \(D_{1}\) are adjacent. If \(x\) and \(y\) have a common neighbor in \(D_{2}\), then these vertices form an induced \(C_{5}\), see the third graph of Fig. 7. If a neighbor of \(x\) in \(D_2\) is nonadjacent to some other vertex of \(D_2\), we have an induced \(P_6\), see the fourth graph of Fig. 7. Otherwise we have the last graph of Fig. 7 which also contains an induced \(P_6\).

Fig. 7
figure 7

Subgraphs with \(g=4\) and \(|D_{1}|=3\)

Case 2.3 \(|D_{1}|=4\). Every vertex of \(C\) has his own private neighbor in \(D_{1}\). Denote them by \(x_1,x_2,x_3\), and \(x_4\). If \(x_1x_3\in E(G)\) (or analog \(x_2x_4\in E(G)\)), we have an induced \(C_{5}\), see the left graph of Fig. 8. Now \(D_{1}\) does not induce a cycle \(C_{4}\), since we have either the previous possibility or \(Q_{3}\) which is forbidden. If \(D_{1}\) induces paths \(P_{2}\), \(P_{3}\), \(2P_2\), or \(P_{4}\), see the second, third, forth, and fifth graph, respectively, of the Fig. 8 for an induced \(P_{6}\), which starts and ends in nonadjacent vertices of \(D_{1}\). Thus it remains to deal with the cases when there are no edges between vertices of \(D_{1}\). If \(x_i\) and \(x_{(i+1) \mathrm {mod}4}\) have a common neighbor, for some \(i\in \{1,2,3,4\}\), we have an induced \(C_5\), see the right lower graph of Fig. 8 for one possibility. If \(x_i\) and \(x_{(i+2) \mathrm {mod}4}\) do not have a common neighbor, for some \(i\in \{1,2,3,4\}\), we have an induced \(P_6\), see the left lower graph of Fig. 8 for one possibility. Otherwise \(x_1\) and \(x_3\) have a common neighbor in \(D_2\). Note that \(x_1\) and \(x_2\), \(x_2\) and \(x_3\) have no common neighbor in \(D_2\). Again we have an induced \(P_6\), see the middle lower graph of Fig. 8. \(\square \)

Fig. 8
figure 8

Subgraphs with \(g=4\) and \(|D_{1}|=4\)