On the r-dynamic coloring of the direct product of a path with either a path or a cycle

In this paper, we determine explicitly the r-dynamic chromatic number of the direct product of any given path with either a path or a cycle. Illustrative examples are shown for each one of the cases that are studied throughout the paper.

(1.1) Figure 1. Illustrative example of a direct product of graphs.
The set of vertices that are adjacent to a vertex v ∈ V(G) constitutes its neighborhood N G (v). The cardinality d G (v) of this set is the degree of the vertex v. If there is no risk of confusion, then we use the respective notations N(v) and d(v). Furthermore, we denote, respectively, δ(G) and ∆(G) the minimum and maximum vertex degree of the graph G. The following result follows straightforwardly from the previous definitions. Lemma 1. Let G and H be two finite simple graphs. Then, A path between two distinct vertices v and w of a given graph G is any ordered sequence of adjacent and pairwise distinct vertices v 0 = v, v 1 , . . . , v n−2 , v n−1 = w in V(G), with n > 2. If v = w, then such a sequence is called a cycle. A graph is called connected if there always exists a path between any pair of vertices. From here on, let P n and C n respectively denote the path and the cycle of order n.
A proper k-coloring of a graph G is any map c : V(G) → {0, . . . , k − 1} assigning k colors to the set of vertices V(G) so that no two adjacent vertices have identical color. The minimum positive integer k for which such a proper k-coloring exists is the chromatic number χ(G) of the graph G. Concerning the chromatic number of a direct product of graphs, the following result holds. Lemma 2. Let G and H be two finite simple graphs. Then, Proof. The first assertion follows straightforwardly from the fact that every proper k-coloring c of the graph G (respectively, H) induces naturally a proper k-coloring c of the product graph G × H, which is defined so that c((v, w)) = c(v) (respectively, c((v, w)) = c(w)), for all (v, w) ∈ V(G × H).
Disproving the so-called Hedetniemi's conjecture [23], it has recently proven [24] that the upper bound described in Lemma 2 may not be reached. In any case, the following result is also known. Theorem 3. [25] Let G and H be two finite simple graphs such that χ(G) = χ(H) = k and each vertex of the graph H is contained in a complete graph of order k − 1. Then, the upper bound in Lemma 2 is reached.
Particular cases of proper coloring and chromatic number are the so-called r-dynamic proper kcoloring and the r-dynamic chromatic number, which have already been described in the preliminary section (see (1.1)). The following results are known.

Lemma 4.
[1] Let G be a graph and let r be a positive integer. Then, It is also known the r-dynamic chromatic number of certain graphs.

Lemma 5.
[7] Let m, n and r be three positive integers such that n > 2 and r ≥ 2. The following results hold.
Further, the following result constitutes a generalization of Lemma 2 in case of dealing with connected graphs with at least one edge. Lemma 6. Let G and H be two finite simple and connected graphs of order greater than one, and let r be a positive integer such that r ≤ δ(G ), for some G ∈ {G, H}. Then, χ r (G × H) ≤ χ r (G ).
Proof. Without loss of generality, let us suppose that G = G. Then, from Lemma 1, together with the fact that both graphs are connected of order greater than one, we have that Hence, the map c is an r-dynamic proper χ r (G)-coloring of the direct product G×H. As a consequence, χ r (G × H) ≤ χ r (G).

Dynamic coloring of the direct product of two paths
In this section, we study the r-dynamic chromatic number of the direct product of two paths P m = u 0 , . . . , u m−1 and P n = v 0 , . . . , v n−1 .
The following lemma is useful to this end. It establishes a lower bound for the r-dynamic chromatic number of a direct product of two graphs under certain conditions. In particular, this result is used in Theorem 8 to determine the r-dynamic chromatic number of the direct product of two paths, with r ≥ 2.
Lemma 7. Let G and H be two finite simple and connected graphs of order greater than two, with two edges uu ∈ E(G) and vv ∈ E(H) such that d G Proof. Let r ≥ 2. The following assertions hold from the hypothesis.
Then, since r ≥ 2, every r-dynamic proper k-coloring of the direct product G × H assigns different colors to the four vertices (u, v ), (u , v), (u , v ) and (u , v ), which describe in turn a cycle C 4 within G × H. As a consequence, k ≥ 4 and the result holds.
Theorem 8. Let m, n and r be three positive integers such that m, n > 2. Then, Proof. From Lemma 1, we have that ∆(P m × P n ) = 4. Since χ(P m ) = χ(P n ) = 2, then the case r = 1 holds because Lemmas 2 and 4 imply that Let us study separately the two remaining cases by defining to this end an appropriate r-dynamic proper coloring c : V (P m × P n ) → {0, 1, . . .} satisfying Condition (1.1).

Dynamic coloring of the direct product of a path and a cycle
In this section, we focus on the study of the r-dynamic chromatic number of the direct product of a path P m = u 0 , . . . , u m−1 and a cycle C n = v 0 , . . . , v n−1 , v 0 .
A series of preliminary results are required to this end. In order to simplify the notation, for each given proper coloring c : V(P m × C n ) → {0, 1, . . .}, we denote c i, j := c(u i , v j ), for all 0 ≤ i < m and 0 ≤ j < n.
In addition, all the indices of the vertices v j associated to the cycle C n are considered to be modulo n.
Let us start with a result that enables us to focus on those direct products P m × C n such that n is either odd or multiple of four.
Lemma 9. Let m, n and r be three positive integers such that m, n > 2 and n is odd. Then, Proof. The result follows straightforwardly from the fact that the direct product P m × C 2n may be partitioned into two disjoint direct products P m × C n . Now, the following lemma establishes a lower bound for the 2-dynamic chromatic number of the direct product P m × C n , when n is not a multiple of three.
Lemma 10. Let m and n be two positive integers such that m, n > 2 and n 3k, for any positive integer k. Then, χ 2 (P m × C n ) > 3.
Without loss of generality, we can suppose that c 0,0 = 0, c 1,1 = 1 and c 1,n−1 = 2. Then, c 2,0 = 0. Now, since d((u 0 , v 2 )) = 2, we have that, if c 0,2 = 0, then it should be c 1,3 = 2 and hence, c 2,2 = 0. But then, |c(N((u 1 , v 1 ))| = 1, which is a contradiction. So, it must be c 0,2 = 2 and hence, c 1,3 = 0. Notice that it is already a contradiction if n = 4. So, suppose that n > 4. In particular, in order to have a proper coloring, it must be c 2,2 = 2 (see Figure 4). By following an iterative similar reasoning, we can ensure that c 0, j = c 2, j , for all j < n, and that c 1,2 j+1 = ( j + 1) mod 3, for all j < n (recall that all the indices of the vertices v j associated to the cycle C n are taken modulo n). This is a contradiction with the fact that n 3k, for any positive integer k. Hence, χ 2 (P m × C n ) > 3.
The following two results deal with 3-dynamic proper k-colorings of the direct product P m × C n , with k ≤ 4.
Lemma 11. Let m, n and k be three positive integers such that m, n > 2 and k ≤ 4, and let c be a 3dynamic proper k-coloring of the direct product P m × C n . Then, for each pair of integers i ∈ {1, m − 2} and 0 ≤ j < n, it must be Proof. Let us focus on the vertex c i, j−3 (the vertex c i, j+3 follows a similar reasoning). From Condition does not verify the mentioned Condition (1.1), because the four adjacent vertices of the vertex (u i , v j−1 ) could only be colored with at most two colors (see Figure 5). Proposition 12. Let m, n and k be three positive integers such that m, n > 2 and k ≤ 4, and let c be a 3-dynamic proper k-coloring of the direct product P m × C n . Then, the following assertions hold for every pair of integers i ∈ {1, m − 2} and 0 ≤ j < n.
Proof. Let us prove each assertion separately. a) From Lemma 11, it is c i, j ∈ {c i−1, j+3 , c i+1, j+3 }. Thus, the condition c i, j = c i, j+4 contradicts that the map c is a proper coloring. b) It follows readily from Lemma 11. c) The case n = 4 follows from (a). Now, in order to prove the case n = 5, let j be a non-negative integer such that j ≤ 4. From (a), Condition (1.1) and the fact that d((u 0 , v j+1 )) = 2, we have that c 1, j {c 1, j+2 , c 1, j+4 }. In a similar way, c 1, j+1 {c 1, j+3 , c 1, j }, and hence, a fifth color is required. Finally, the case n = 10 follows straightforwardly from the case n = 5 and Lemma 9.
We focus now on the characterization of 4-dynamic proper colorings of the direct product P m × C n .
Lemma 13. Let m, m and n be three positive integers such that m, m , n > 2 and m ≤ m. Then, Proof. Let c be a 4-dynamic proper χ 4 (P m ×C n )-coloring of the direct product P m ×C n . Then, the result follows straightforwardly from the fact that the map c : that is defined so that c i, j = c i, j , for all non-negative integers i < m and j < n, is a 4-dynamic proper χ 4 (P m × C n )-coloring of the direct product P m × C n .
Lemma 14. Let m and n be two positive integers such that m, n > 2, and let c be a 4-dynamic proper 5-coloring of the direct product P m × C n . Then, for each pair of integers 0 < i < m − 1 and 0 ≤ j < n, it must be Proof. Let i and j be two integers such that 0 Thus, since |c(N((u i , v j−3 )))| = |c(N((u i , v j+3 )))| = 4, we have that Proposition 15. Let m and n be two positive integers such that m, n > 2, and let c be a 4-dynamic proper 5-coloring of the direct product P m × C n . Then, the following assertions hold.
Proof. Let us prove each assertion separately.
a) From Lemma 14, we have that c i, j ∈ {c i−1, j+3 , c i+1, j+3 }. Then, the result follows from the fact that the map c is a proper coloring. b) From Lemma 14, we have that c 1,0 ∈ {c 0,3 , c 2,3 }. Without loss of generality, let us suppose that c 1,0 = c 0,3 (the case c 1,0 = c 2,3 follows similarly by symmetry). Under such an assumption, it is simply verified that the direct product P m × C n is always colored by the map c in a similar way to what is shown in Figure 6. Notice in particular the requirement that the set {c i, j , c i, j+1 , c i, j+2 , c i, j+3 , c i, j+4 } is always formed by five distinct colors, whatever the pair of integers 0 < i < m − 1 and 0 ≤ j < n are. The result follows from this fact, together with the colored pattern that is shown in Figure 6. c) A study of cases is required. Proof. From Lemma 4, we have that χ 4 (P m ×C k ) ≥ 5, for all k > 2. Thus, in order to prove the result, it is enough to define a convenient 4-dynamic proper 5-coloring. Moreover, from Lemma 13, it is enough to prove the case m = 4. Let us prove each assertion separately for the mentioned case.
a) Let c be a 4-dynamic proper 5-coloring of the direct product P 4 × C n , with n odd. Then, let c : V(P 4 × C n+6 ) → {0, 1, 2, 3, 4} be defined so that the following assertions hold.
-Let i and j be two non-negative integers such that i < 4 and j < n. Then, c i,2 j mod (n+6) = c i,2 j mod n .
-The remaining vertices of the direct product P 4 × C n+6 are colored as follows.
This map c is a proper coloring of the direct product P 4 × C n+6 satisfying Condition (1.1), for n > 2 being odd. Figure 19 illustrates the direct product P 4 × C 11 . b) The case 2 = n mod 4 follows from the previous case and Lemma 9. Finally, the case 0 = n mod 4 follows similarly, but it is necessary to take into account the partition of the direct product P m × C n+12 into two graphs of the form P m × C (n+12)/2 .
Let us prove now the main result of this section, where we establish the r-dynamic chromatic number of the direct product of a path and a cycle.
Theorem 17. Let m ,n and r be three positive integers such that m, n > 2. Then, Proof. It is known that χ(P m ) = 2, for any positive integer m. Moreover, χ(C n ) = 2, if n is even, and χ(C n ) = 3, otherwise. Then, Lemmas 2 and 4, together with the fact that ∆(P m × C n ) = 4, imply that Let us study separately the remaining cases by defining to this end appropriate r-dynamic proper colorings c : V (P m × C n ) → {0, 1, . . .} satisfying Condition (1.1).
Since ∆(P m × C n ) = 4, Lemma 4 implies that The following study of cases arises.
• Case r = 2. The case n = 3t for some positive integer t follows readily from Lemmas 5 and 6, together with the corresponding lower bound described in (4.1). Otherwise, if n 3t, for any positive integer t, then Lemma 10 implies that χ 2 (P m × C n ) > 3. In particular, from Lemmas 5 and 6, together with the corresponding lower bound described in (4.1), we have that χ 2 (P m × C n ) = 4, for n {5, 3t}, for any positive integer t. Finally, if n = 5, then it is enough to consider the map c : V (P m × C 5 ) → {0, 1, 2, 3} such that It is straightforwardly verified that Condition (1.1) holds and hence, χ 2 (P m × C 5 ) = 4. Figure 7 illustrates the direct product P 4 × C 5 . • Case r = 3.
From (4.1), we have that χ 3 (P m ×C n ) ≥ 4. Firstly, we study those cases for which this lower bound is reached. In each case, an illustrative 3-dynamic 4-proper coloring c : V(P m × C n ) → {0, 1, 2, 3} satisfying Condition (1.1) is given. Once more time, all the indices of the vertices v j associated to the cycle C n are taken modulo n throughout the whole proof.
-Subcase n = 3t, for some positive integer t. Let the map c be defined so that, for each non-negative integer k < t, the following assertions hold. * c 0,3k+1 = 2. * c 0,3k+2 = c 1,3k+2 = 3. * For each non-negative integer i < t and each j, l ∈ {0, 1, 2}, if 3i + j + l < m and 3k + l < n, then c 3i+ j+l, 3k+l = (l − i) mod 4. It is readily verified that the map c is a proper coloring satisfying Condition (1.1) and hence, χ 3 (P m × C 3t ) = 4. Figure 8 illustrates the direct product P 7 × C 6 . -Subcase n = 6t + w, for some positive integer t and some w ∈ {1, 2}. Let the map c be defined so that the following assertions hold, for all non-negative integers i < m and j < t. * For each positive integer k ≤ w, we have that The map c is a proper coloring satisfying Condition (1.1) and hence, χ 3 (P m × C 6t+w ) = 4. Figures 9 and 10 illustrate, respectively, the direct products P 6 × C 13 and P 6 × C 14 .  -Subcase n = 6t + 5, for some positive integer. Firstly, we focus on the case m odd. Let the map c be defined so that the following assertions hold. * Let k ∈ {0, 1} and let i be a non-negative integer such that 8i + 4k < m. Then, (k + 1) mod 2, if j ∈ {4, 6, 12, 14}. * Let k, l ∈ {0, 1} and let i be a non-negative integer such that 8i + 4k + 2l + 1 < m. Then, , 1} and let i be a non-negative integer such that 8i + 4k + 2 < m. Then, 1} and let i, j be two non-negative integers such that 2i + k < m and 16 + 6 j + 3k < n. Then, c 2i+k,16+6 j+3k = i mod 4. * Let i, j be two positive integers such that 2i + 1 < m and 17 + 6 j < n. Then, c 2i+1,17+6 j = c 2i+1,1 . * Let i, j be two positive integers such that 2i < m and 18 + 6 j < n. Then, 2}. * Let i, j be two positive integers such that 2i < m and 20 + 6 j < n. Then, 3}. * Let i, j be two positive integers such that 2i + 1 < m and 21 + 6 j < n. Then, The map c is a proper coloring satisfying Condition (1.1) and hence, χ 3 (P m × C 6t+5 ) = 4, for m odd. Figure 11 illustrates the direct product P 9 × C 11 . Let us focus now on the case m even. Let the map c be defined so that the following assertions hold. * Let i, k be two non-negative integers such that k < 7 and 8i + k < m. Then, 15}. * Let k ∈ {0, 1, 2} and let i, j be two positive integers such that 2i < m and 16 + 6 j + k < n. Then, c 2i,16+6 j+k = c 2i,k . * Let i, j be two positive integers such that 2i + 1 < m and 19 + 6 j < n. Then, 2, if i mod 4 ∈ {2, 3}. * Let i, j be two positive integers such that 2i < m and 20 + 6 j < n. Then, 3, if (i mod 4) = 2. * Let i, j be two positive integers such that 2i + 1 < m and 21 + 6 j < n. Then, The map c is a proper coloring satisfying Condition (1.1) and hence, χ 3 (P m × C 6t+5 ) = 4, for m even. Figure 12 illustrates the direct product P 10 × C 11 . -Subcase n = 6t + 4, for some positive integer t ≥ 2. If 3t + 2 is odd, then it is of the form 6k + 5, for some positive integer k, and hence, the result follows from the previous subcase and Lemma 9. Otherwise, if 3t + 2 is even, then it is of the form 8 + 6k, for some non-negative integer k. Both maps c defined as the ones described for the case n = 6k + 5 (depending in any case on whether m is odd or even) constitute proper colorings of the direct product P m ×C 8+6k satisfying Condition (1.1). Then, Lemma 9 implies that χ 3 (P m × C 6t+4 ) = 4. Figure 13 illustrates the direct product P 9 × C 28 . -For n = 4, let the map c be defined such that for all (u i , v j ) ∈ P m × C 4 we have that -For n = 5, let the map c be defined as c i, j = ( j + 2i) mod 5, for all i < m and j < n.
Since ∆(P m × C n ) = 4, Lemma 4 enables us to focus on the case r = 4. From (4.1), we have that χ 4 (P m × C n ) ≥ 5. Firstly, we study those cases for which this lower bound is reached. In each case, an illustrative 4-dynamic 5-proper coloring c : V(P m × C n ) → {0, 1, 2, 3, 4} satisfying Condition (1.1) is given. Again, indices associated to C n are taken modulo n.
-Subcase n = 5t, for some positive integer t. If n is odd, then let the map c be defined so that, for all k < t, Condition (1.1) holds and hence, χ 4 (P m × C 5t ) = 5, for t odd. Then, the case t = 2 mod 4 follows straightforwardly from Lemma 9. Finally, the just described map c together with the mentioned Lemma 9 enables us to prove the case t = 0 mod 4. Figures 15 and 16 illustrate, respectively, the direct products P 6 × C 5 and P 6 × C 20 .  -Subcase m ∈ {3, 4} and n {3, 4, 6, 7, 8, 14}. From Lemma 13, it is enough to prove the case m = 4. The following study of cases arises. * n = 6t + 1, with t ≥ 2. This case arises from Lemma 16, once we prove in Figure 17 the existence of a 4-dynamic proper 5-coloring of the direct product P 4 × C 13 . Figure 17. 4-dynamic proper 5-coloring of the direct product P 4 × C 13 . * n = 6t + 3, with t ≥ 1. This case also arises from Lemma 16, once we prove in Figure 18 the existence of a 4-dynamic proper 5-coloring of the direct product P 4 × C 9 . Figure 18. 4-dynamic proper 5-coloring of the direct product P 4 × C 9 . * n = 6t + 5, with t ≥ 1. This case arises from Lemma 16 and the already known fact that χ 4 (P 3 × C 5 ) = 5. Figure 19 illustrates the direct product P 4 × C 11 . Figure 19. 4-dynamic proper 5-coloring of the direct product P 4 × C 11 . * 2 = n mod 4, with n {6, 14}. It follows simply from the previous cases and Lemma 9. * n = 12t + k, with t ≥ 1 and k ∈ {12, 16, 20}. This case also arises from Lemma 16, once we prove the existence in Figures 20-22 of 4-dynamic proper 5-colorings of the direct products P 4 × C 12 , P 4 × C 16 and P 4 × C 20 .   Let us focus now on those direct products P m × C n , for which the corresponding 4-dynamic chromatic number is six.
· Let i and j be two non-negative integers such that 2i + 1 < m and 2 j < n. Then, · Let i and j be two non-negative integers such that 2i < m and 2 j + 1 < n. Then, Condition (1.1) holds and hence, χ 4 (P m ×C 4t ) = 6. Figure 26 illustrates the direct product P 14 × C 8 . Figure 26. 4-dynamic proper 6-coloring of the direct product P 14 × C 8 . * n = 6t + 1, for some positive integer t. Let the map c be defined so that the following assertions hold.
· Let i be a positive integer such that 2i < m. Then, Condition (1.1) holds and hence, χ 4 (P m × C 6t+1 ) = 6. Figure 27 illustrates the direct product P 14 × C 13 . Figure 27. 4-dynamic proper 6-coloring of the direct product P 14 × C 13 . * n = 6t + 5, for some positive integer t. Let the map c be defined so that the following assertions hold.

Conclusion and further works
This paper has explicitly determined the r-dynamic chromatic number of the direct product of any given path P m with either a path P n or a cycle C n . In this regard, Theorem 8 and 17 are the main results of the manuscript. Particularly, it has been obtained that 2 ≤ χ r (P m × P n ) ≤ 5 and 2 ≤ χ r (P m × C n ) ≤ 6, for all positive integers m, n and r such that m, n > 2. The significant number of technical results and studies of cases that have been required throughout the paper in order to prove our two main results enables us to ensure that the problem of r-dynamic coloring the direct product of two given graphs is not trivial. As such, this paper may be considered as a starting point to delve into this topic. Of particular interest for the continuation of this paper is the study of the r-dynamic coloring of two given cycles. The r-dynamic coloring of the direct product of either a path or a cycle with other types of graphs is also established as related further work.