On the 2-rainbow independent domination numbers of some graphs

By suitably adjusting the tropical algebra technique we compute the rainbow independent domination numbers of several infinite families of graphs including Cartesian products Cn□Pm\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_n \Box P_m$$\end{document} and Cn□Cm\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_n \Box C_m$$\end{document} for all n and m≤5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m\le 5$$\end{document}, and generalized Petersen graphs P(n, 2) for n≥3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n \ge 3$$\end{document}.


Introduction
Ordinary domination is a problem that is among the most studied problems in graph theory (Goddard and Henning 2013;Haynes et al. 1998). In this task one is keen to determine the minimum number of places in which to keep resources such that every place either has a resource or is close enough to the place in which the resource exists. It is quite common that in practical applications some additional constraints or desires are taken into account.
One of the very popular varieties, the k-rainbow domination problem, has been first studied in Brešar et al. (2005), and later elaborated and applied in a number of works (Brešar and Šumenjak 2007;Chang et al. 2010;Gabrovšek et al. 2020Gao et al. 2019;Kraner Šumenjak et al. 2013Kraner Šumenjak et al. , 2018Shao et al. 2019a, b). Two similar but different types of rainbow domination with suitably encoded independencies have been studied: namely the independent rainbow domination numbers of graphs (Gabrovšek et al. 2020;Shao et al. 2019a) and the rainbow independent domination numbers of graphs (Kraner Šumenjak et al. 2018). From the practical applicability point of view both of these dominations are reasonable and make sense. The differences between the two concepts are nicely explained in Kraner Šumenjak et al. (2018). For more details on practical motivations and examples on rainbow domination, independent rainbow domination and rainbow independent domination we refer to Brešar et al. (2005), Gabrovšek et al. (2020), Gao et al. (2019), Kraner Šumenjak et al. (2018 and Shao et al. (2019a).
In Gabrovšek et al. (2020), independent rainbow domination numbers of generalized Petersen graphs of P(n, 2) and P(n, 3) were established by adopting a well known tropical path algebra technique for polygraphs. The method has been previously applied to domination problems (and other), see e.g. Klavžar and Žerovnik (1996), Pavlič and Žerovnik (2013), Repolusk and Žerovnik (2018), Žerovnik (2006) and Žerovnik (1999). In the current article we suitably adjust this technique so that it works also in the case of rainbow independent domination. The main difference to previous applications of the technique is that we define an auxiliary graph on arcs between two consecutive monographs, not on single monographs as before. The reason for the change is that it allows more efficient implementation for computation of the invariant considered here. By doing this we obtain a general result describing the t-rainbow independent domination number of a given polygraph as the minimum weight of a closed walk of length n in a suitably defined graph (Theorem 3.1) and consequently, as a minimum diagonal entry of the tropical product of length n of suitably defined associated matrices (Theorem 3.2). We then apply these results to obtain the exact values for 2-rainbow independent numbers of Cartesian products C n P m and C n C m for all n and m ≤ 5, and also of generalized Petersen graphs P(n, 2). These results were previously announced in the conference article (Gabrovšek et al. 2021) without many details and proofs.
The article is organized in the following way. In Sect. 2 we present some basic definitions and known facts on rainbow independent domination, polygraphs and tropical algebra. In Sect. 3 we provide the necessary theoretical framework and in Sect. 4 we obtain the exact values for 2-rainbow independent numbers of polygraphs mentioned above.

Rainbow independent domination of graphs
A graph F is a combinatorial object, defined by two sets, an arbitrary set V = V (F) of vertices and a set E(F) ⊆ V × V of edges. Usually, we set (u, v) = (v, u), and we have undirected graphs. Otherwise, F is a directed graph or digraph. Let F be a graph, S ⊆ V (F) and let w ∈ V (F). The open neighborhood of w in S is denoted by N S (w), i.e., N S (w) = {u | (u, w) ∈ E(F), u ∈ S}. Similarly, the closed neighborhood of w in S is denoted by N S [w], i.e., N S [w] = {w} ∪ N S (w). If S = V (F) and no confusion can arise, we will write N (w) and N [w] instead of N S (w) and N S [w], respectively. If T ⊆ V (F), then we define N (T ) = ∪ x∈T N (x). A subset S of V (F) for which the vertices are pairwise non-adjacent is called an independent set S of the graph F. As is well known, the degree of a vertex w is the total number of edges incident to w. The ⇐⇒ (ψ(u), ψ(v)) ∈ E(H )). For basic definitions not given here see Hammack et al. (2011). In Kraner Šumenjak et al. (2018, the notion of t-rainbow independent domination was introduced. For a function f : V (F) → {0, 1, 2, . . . , t} we denote by V i the set of vertices to which the value i is assigned by f , i.e., . . , t} is called a t-rainbow independent dominating function (tRiDF for short) of F if the following two conditions hold: (1) The set V i is independent for each i = 1, . . . , t, and (2) For every v ∈ V 0 and for every i = 1, . .
The t-rainbow independent domination number γ rit (F) is the minimum weight over all tRiDFs of F.
If f is a tRiDF of F and H is a subgraph of F, then f , restricted to H , is called a partial tRiDF (ptRiDF) for H . Note that the restriction of f , that is a ptRiDF of H , is not necessarily a tRiDF of H .
Note that a tRiDF f can alternatively be represented by an ordered partition . . , t) and the set V i is independent for each i = 1, 2, . . . , t. We sometimes simply write f = (V 0 , V 1 , . . . , V t ).

Polygraphs
Let G 1 , . . . , G n be arbitrary mutually disjoint graphs and denote by X 1 , . . . , X n a sequence of sets of edges such that an edge of X i joins a vertex of For convenience, we set G 0 = G n and G n+1 = G 1 . Thus, X 0 = X n , so we may write, for instance, In the case when all graphs G i are isomorphic to a fixed graph G (i.e., there exists an isomorphism ψ i : V (G i ) −→ V (G) for i = 0, 1, . . . , n + 1, and ψ 0 = ψ n and ψ n+1 = ψ 1 ) and all sets X i are equal to a fixed set , we call such a graph rotagraph, ω n (G; Y ). If a polygraph has the property that n − 1 of its monographs are isomorphic to a fixed graph G and consequently at most two consecutive sets X i are not equal to the fixed set of edges X , then we call it a nearly rotagraph.
Polygraphs were first studied in mathematical chemistry (Babić et al. 1986) as a model of polymer molecules. Furthermore, typical examples of polygraphs are Cartesian products of graphs and generalized Petersen graphs. The Cartesian product G H of graphs G and H is a graph with a vertex set V (G) × V (H ), where two vertices are adjacent if and only if they are equal in one coordinate and adjacent in the other. For where indices i and j are read modulo n and m, respectively (see e.g. Hammack et al. 2011).
For positive integers n ≥ 3 and k, 1 ≤ k < n 2 , the generalized Petersen graph P(n, k) is defined to be a graph with a vertex set in which the subscripts are computed modulo n (see e.g. Gabrovšek et al. 2020;Shao et al. 2019a;Watkins 1969).

Tropical algebra
Tropical algebra or min-plus algebra is a semialgebra over the ordered, idempotent semifield R ∪ {∞}, equipped with the operations of addition a ⊕ b = min(a, b) and multiplication a b = a + b. Here ∞ is the unit element for addition ⊕ and 0 is the unit element for multiplication . As in standard arithmetic the operations ⊕ and are associative and commutative, and is distributive over ⊕. Matrix operations are defined in analogy to linear algebra with tropical operations replacing the standard ones. In particular, for matrices A, B ∈ (R∪{∞}) n×n the tropical or min-plus product AB is defined by for all i, j ∈ [1, n]. The mth tropical (or min-plus) power of A is denoted by A m . To be more precise, n]. For our purposes we will in fact consider matrices over idempotent subsemiring N ∪ {0} ∪ {∞} equipped with the min-plus operations (also known as path algebra, see e.g. Gabrovšek et al. 2020;Klavžar and Žerovnik 1996;Pavlič and Žerovnik 2013;Repolusk and Žerovnik 2018;Žerovnik 1999). The trace of matrix A in min-plus algebra is defined as tr(A) = min i∈ [1,n] A ii . For matrices A, B ∈ (R ∪ {∞}) n×n it holds that (see e.g. Gabrovšek et al. 2020) The term tropical algebra is sometimes used for all semifields isomorphic to minplus algera. For more details we refer the interested reader to Bapat (1998), Butkovič (2010), Kolokoltsov and Maslov (1997), Litvinov (2007), Müller and Peperko (2015) and Rosenmann et al. (2019).

Theoretical framework
In Gabrovšek et al. (2020) a path-algebra technique for computing the independent rainbow domination numbers of generalized Petersen graphs is used. In this section we use a similar idea, but somewhat modify it and apply it for the case of rainbow independent domination.
We begin by defining a weighted digraph which we can associate to a given polygraph which, in turn, permits utilization of the algebraic approach. Intuitively, we are going to define a digraph in which vertices correspond to restrictions of tRiDF functions to pairs of consecutive monographs and arcs correspond to pairs of vertices which are on the intersecting monograph restrictions of the same tRiDF.
Similarly to our study of the independent rainbow domination case in Gabrovšek et al. (2020), the main reason for the introduction of a new construction lies in the fact that in the case of t-rainbow domination, a vertex which has neighbors in both neighboring monographs can be evaluated only when the colors of all neighbors are known. It would be possible to handle this by considering bigger monographs. We choose here a different approach by defining the associated digraph, which is based on ordered pairs of monographs. The associated digraph that we define can be considered as a line graph of the associated digraph from Klavžar and Žerovnik (1996), Pavlič and Žerovnik (2013), Repolusk and Žerovnik (2018) and Žerovnik (1999, 2006).
For a given polygraph n (G 1 , G 2 , . . . , G n ; X 1 , X 2 , . . . , X n ), we define an associated digraph G in the following way. The vertices of G are ordered tuples of subsets of vertices We introduce some more useful notations. A vertex of G is an ordered tuple of sets that meet some monographs, so the restriction of B to monograph G i is denoted by Two vertices of G are connected when they coincide exactly on the common monograph.
To be more formal, an arc (v, u) connects vertices v and u of G if: In the terminology of ptRiDF's, a tRiDF of G i has to be defined on and similarly for the union v ∪ u. Observe that v ∩ u = B i when v and u are restrictions of f = B = (B 0 , B 1 , B 2 , . . . , B t ).
The weight of the arc (v, u) is defined in a natural way as the sum of weights of v and u, so Similarly as in Gabrovšek et al. (2020) it can be seen in a straighforward manner that a walk which is defined by consecutive arcs As we point out in the following result, the t-rainbow independent domination number is closely related to certain walks in the associated digraph G. The result can be proved in a very similar manner as (Gabrovšek et al. 2020, Theorem 3.1). To avoid too much repetition of similar ideas we omit its proof.
Let us consider four consecutive monographs G k−1 , G k , G k+1 , and G k+2 , or written equivalently, the elements of V(G) k−1,k , V(G) k,k+1 and V(G) k+1,k+2 . Then u ∈ V(G) k−1,k and v ∈ V(G) k,k+1 are connected by an arc (u, v) if they coincide on G k . Moreover, a path of lenght two connects u ∈ V(G) k−1,k and z ∈ V(G) k+1,k+2 if there exists a v ∈ V(G) k,k+1 such that there are arcs (u, v) and (v, z) in G. We obtain a path of minimal weight if we choose l ∈ V(G) k,k+1 such that w(u, l) + w(l, z) is minimal.
The consideration can alternatively be written in the following matrix form. Let E(G) be the set of edges of G and let A(k) be a matrix with elements a (k) i j , for i ∈ V(G) k−1,k and j ∈ V(G) k,k+1 , where the value of a The product P = A(k)A(k + 1) is a matrix with entries where l runs over all elements of V(G) k,k+1 such that both (i, l) ∈ E(G) and (l, j) ∈ E(G). In a more describtive manner, the i jth entry of a product of matrices is the minimal weight of a path of length two that starts at i ∈ V(G) k−1,k and ends at j ∈ V(G) k+1,k+2 . Inductively, the minimum weight of a closed walk of length n on a polygraph with n monographs is a diagonal element of the corresponding product of matrices. Note that some of the matrices A(k) may be rectangular, however the product A(1) · · · A(n) is a square matrix. We formally state the conclusion in the following way: Theorem 3.2 For k = 1, 2, . . . , n, let A(k) be the matrices defined by (2). Then the trainbow independent domination number of polygraph n (G 1 , G 2 , . . . , G n ; X 1 , X 2 , . . . , X n ) is equal to γ rit ( n (G 1 , G 2 , . . . , G n ; X 1 , X 2 , . . . , X n )) = tr(A(1)A(2) · · · A(n)) Let us consider a special case when the polygraph is a rotagraph. Note that in this case the matrices A(k) are independent of k. We can therefore define a matrix A = A(1) with entries a i j = w(i ∩ j), (i, j) ∈ E(G) and conclude:

Corollary 3.3 The t-rainbow independent domination number of rotagraph
We will also need a version of this result for the case when the polygraph is a nearly rotagraph. Let us recall that a polygraph is a nearly rotagraph, if all monographs but one are isomorphic: G 2 G 3 · · · G n . Therefore, also X 1 and X n can be different from other X i = X .

Results
We will compute 2-rainbow independent domination numbers of C n P m for m = 1, 2, 3, 4, 5. An explicit proof will be given for m = 1.
For m = 2, 3, 4, 5 only the needed data is provided because the proofs are analogous. Similarly, for C n P m , a detailed proof is provided only for m = 3 and brief arguments are given for other m. For generalized Petersen graphs P(n, 2), we will explicitly provide a proof for the case when n is odd, since, as we will see, P(n, 2) is in this case a nearly rotagraph. In the case when n is even, the P(n, 2) is a rotagraph, and the proof is analogous to previously elaborated cases (C n P 1 and C n C 3 ) and therefore the details are omitted.
The source code of the C++ program for computing the matrices, products, and traces, is available at Gabrovšek et al. (2022).

Computations for graphs C n P m
The case C n P 1 . First note that C n P 1 equals C n (by trivial isomorphism) and that γ 2ik (C n ) = i(C n P 2 ) is a special case of general identity γ rik (G) = i(G K r ), as proved in Kraner Šumenjak et al. (2018). Independent domination numbers i(C n P 2 ) are computed in Repolusk and Žerovnik (2018) and hence the formula for γ 2ik (C n ) is known. We use this case as the first example to explain our method. The associated monograph is a vertex, G i = P 1 and the two monographs G i ∪ G i+1 form a path P 2 P 1 = P 2 . We order the two vertices v 1 , v 2 of G i ∪ G i+1 and represent the partial 2RiDF by a tuple (c 1 , c 2 ), such that f (v 1 ) = c 1 and f (v 2 ) = c 2 .
A matrix (2) is thus the following 6 × 6 matrix: For clarity, we enumerate the rows and columns by tuples associated to the restrictions of partial 2RiDFs (in lexicographical order). It is clear that the entries A (c 1 ,c 2 ),(d 1 ,d 2 ) = ∞ when c 2 = d 1 , since the monographs do not match, i.e., there is no edge in the auxiliary graph G.
Straightforward computation shows that where [2] 6 i, j=1 is a 6 × 6 matrix with all entries equal to 2. It follows that We also compute the following traces: Proof It follows from construction and Corollary 3.3 that For n = 5, 6, 7, 8 the theorem holds. By induction, we assume that it holds for n and will prove that it holds for n + 4.
If n ≡ 0 mod 4 or n ≡ 3 mod 4 we have from Eq. (6) and the induction hypothesis: Similarly, if n ≡ 1 mod 4 or n ≡ 2 mod 4, we have: Since (5) holds also for n = 3 and n = 4, the theorem holds for n ≥ 3.
For n even, we proceed as in the cases C n P m and C n C m , since P(n, 2) is a rotagraph. When n is odd, the argument is slightly more involved. In any case, we first need to construct the matrix that will allow computations regarding consecutive monographs that are isomorphic. The It follows from the construction and Corollary 3.3 that γ ri2 (P(2 , 2) = tr(A ). For the case P(2 + 1, 2) we need a product A( )A(1)A(2). However, we do not explicitly calculate matrices A( ), A(1) and A(2). For computational reasons we rather calculate a 300 × 300 matrix A(1) that satisfies A( )A(1)A(2) = A A(1) A. It follows from the construction and Corollary 3.4 that (8) We do not list the matrices A and A(1) , since they are too large (the code is available at Gabrovšek et al. (2022)).
The cases n ≡ 7 mod 10, n ≡ 3 mod 10 or n ≡ 5 mod 10, n ≡ 1 mod 10 are treated similarly (details are omitted). Since the formula also holds for n = 3, n = 4, and n = 5, the proof is complete.

Conflict of interest
The authors have no other relevant financial or non-financial interests to disclose.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.