Mutual-visibility sets in Cartesian products of paths and cycles

For a given graph $G$, the mutual-visibility problem asks for the largest set of vertices $M \subseteq V(G)$ with the property that for any pair of vertices $u,v \in M$ there exists a shortest $u,v$-path of $G$ that does not pass through any other vertex in $M$. The mutual-visibility problem for Cartesian products of a cycle and a path, as well as for Cartesian products of two cycles, is considered. Optimal solutions are provided for the majority of Cartesian products of a cycle and a path, while for the other family of graphs, the problem is completely solved.


Introduction and preliminaries
In graph theory, a mutual-visibility set is a set of vertices in a graph such that any two vertices in the set are mutually visible, which means that there is a shortest path between them that does not pass through any other vertex in the set.The mutual-visibility number of a graph is the size of a largest mutualvisibility set in the graph.The problem of finding the largest mutual-visibility set in the graph can be seen as a relaxation of the the general position problem in graphs (for the definition of the problem and the related work see for example [9] and the references therein).
Mutual-visibility sets have been studied in a variety of contexts, including wireless sensor networks, mobile robot networks, and distributed computing: in wireless sensor networks, mutual-visibility sets can be used to place sensors so that they can communicate with each other without interference; in mobile robot networks, mutual-visibility sets can be used to control robots so that they can avoid collisions; in distributed computing, mutual-visibility sets can be used to design efficient algorithms for problems such as consensus and broadcasting [1,2,6,7,10].
The foregoing problem, with the objective of maximizing the size of the largest mutual-visibility set, was placed on a graph-theoretical footing in 2022 by Di Stefano [8] who shows that this problem is NP-complete and study mutualvisibility sets on various classes of graphs, such as block graphs, trees, Cartesian products of paths and cycles, complete bipartite graphs, and cographs.
The mutual-visibility in distance-hereditary graphs was studied in [5], where it is shown that the mutual-visibility number can be computed in linear time for this class.In [5], mutual-visibility sets of triangle-free graphs and Cartesian products were considered.In particular, it is shown that computing the mutualvisibility number of a Cartesian product is an intrinsically difficult problem.
Research work from mentioned papers on visibility problems in graphs shows that certain modifications to the visibility properties are of interest.In this respect, [4] introduces a variety of new mutual-visibility problems, including the total mutual-visibility problem, see also [11], the dual mutual-visibility problem, and the outer mutual-visibility problem.
In this paper, we expand the preceding research work on Cartesian products.In particular, we study mutual-visibility sets in two families of graphs: Cartesian products of a cycle and path as well as Cartesian products of two cycles.In the sequel of this section, we present definitions and results needed for the rest of the paper.In the following section, we provide some solutions to the mutual-visibility set problem in Cartesian products of a path and a cycle.In particular, it is established that the mutual-visibility number for most of the graphs of this class equals twofold the length of the cycle.In Section 3, we study the mutual-visibility number of Cartesian products of two cycles.The exact mutual-visibility numbers are provided for all graphs of this class.Specifically, it is shown that a largest mutual-visibility set of The Cartesian product of graphs G and H is the graph G H with vertex set V (G) × V (H) and (x 1 , x 2 )(y 1 , y 2 ) ∈ E(G H) whenever x 1 y 1 ∈ E(G) and x 2 = y 2 , or x 2 y 2 ∈ E(H) and x 1 = y 1 .It is well-known that the Cartesian product is commutative and associative, having the trivial graph as a unit.
The interval I(u, v) between two vertices u and v of a graph G is the set of vertices on shortest u, v-paths.
For positive integers n and k, n = k, we will use the notation For a positive integer s and n, k We will assume that V (P s ) = [s] 0 for every s ≥ 2 and V (C t ) = [t] 0 for every t ≥ 3. Thus, if u ∈ V (X s X t ), where X s stands for either P s or C s , while A P s -fiber and C t -fiber in P s C t denoted by P i s and j C s , respectively, are defined analogously.
The following result can be easily confirmed.
Observation 1.1.Let t and s be nonnegative integers.
Note also that for u, v ∈ V (P Proof.We will show that there exists an M -unhindered u, v-path for every u, v ∈ M .Note that for u x = v x or u y = v y , by condition (i) of the lemma, the assertion trivially holds.Let assume w.l.o.g. that u y < v y and let M u,v := The proof is by induction on the cardinality of M u,v .If |M u,v | = 1, then u x = v x by condition (i) of the lemma.Thus, it is not difficult to construct a shortest u, v-path that does not contain the vertex of M u,v .
Suppose now that the lemma does not hold and let u and v be vertices of M which are not mutually visible in P s P t .Moreover, let u and v be chosen in the way that M u,v is the set with the smallest cardinality such that u and v possess this property.Suppose first that u x < v x .Note that for every w ∈ M u,v , by the minimality of M u,v , there exists an M -unhindered w, v-path, say P .Note that, by w x ≤ v x and w y ≤ v y , it holds that P admits either the vertex w ′ = (w x + 1, w y ) or the vertex w ′′ = (w x , w y + 1).
If there exists w ∈ M u,v such that M u,w = ∅, u x = w x and u y = w y , let w x − u x = k and w y − u y = ℓ.We will show that we can always find an M -unhindered u, w ′ -and u, w ′′ -path.Since M is composed of vertices that are pairwise at a distance of at least three, P ′ = u, (u x +1, u y ), . . ., (u x +k, u y ), (u x + k, u y +1), . . ., (u x +k, u y +ℓ−1), (u x +k+1, u y +ℓ−1), (u x +k+1, u y +ℓ) = w ′ is an M -unhindered u, w ′ -path, while Otherwise (i.e. , M does not admit w from the previous paragraph), suppose w.l.o.g. that there exists x , where a is the largest integer that allows this sequence.Note that from condition (ii) of the lemma it follows that x and M z i ,w = ∅, then by the above discussion we have M u,w = {z 1 , . . ., z i }.Since M is composed of vertices that are pairwise at a distance of at least three, we can now construct, similarly as above, an M -unhindered u, w ′ -and u, w ′′ -path.
Otherwise (i.e., M does not admit w from the previous paragraph), we clearly have z a = v.But since it is not difficult to construct an M -unhindered u, v-path for this case we obtain a contradiction.
Note that we showed above that we can always construct an M -unhindered u, w ′ -and u, w ′′ -path.If w ′ ∈ V (P ), then, V (P )\{w} is an M -unhindered w ′ , vpath.Moreover, the graph induced by and we obtain a contradiction.If w ′′ ∈ V (P ), then we can analogously construct an Munhindered u, v-path that yields a contradiction.
Since the proof for u x > v x is analogous, the proof is complete.
2 Cartesian products of a cycle and a path If the path in a product is of length 2, we obtain the following result.
Proof.By Proposition 2.1, we have µ(P 2 C t ) ≤ 6.For t ≤ 6, the result follows from the constructions depicted in Fig. 1 and straightforward case analysis.Since it is not difficult to provide construction with 6 vertices for every t ≥ 7, the proof is complete.
The next observation can be easily confirmed.
Observation 2.3.Let t and s > k be nonnegative integers.If M is a mutualvisibility set of P k C t , then M is a mutual-visibility set of P s C t .
The following proposition shows that the upper bound on the mutual-visibility number of P s C t is achieved when t and s are big enough.
This set for t = 13 is depicted on the left-hand side of Fig. 2. Obviously, M ′ is a subset of P t−3 C t−3 of cardinality 2(t − 3).By confirming the conditions of Lemma 1.2 we will show that M ′ is a mutual-visibility set of 0 which in turn satisfies condition (i) of Lemma 1.2.Moreover, it is not difficult to see that d(u, v) ≥ 3 for every u, v ∈ M ′ .Thus, we are left with conditions (ii) and (iii) of Lemma 1.2.By the above discussion, for every 2 ⌉, it follows that for every u, v ∈ M ′ ∩ ℓ C t−3 and every w, z ∈ M ′ ∩ ℓ ′ C t−3 we have min{u y , v y } < max{z y , w y }.Thus, conditions (ii) and (iii) of Lemma 1.2 are also fulfilled. Let , where the sets B, M 1 , M 2 , and M 3 are defined as follows: We can see that M can be obtained from M ′ by inserting in P t−3 C t−3 three P t−1 -fibers and two C t -fibers that contains vertices of B (for t = 13 see the right-hand side of Fig. 2).Thus, M \ B is clearly a mutualvisibility set of P t−1 C t .Moreover, the vertices of B ∪ M do not violate the conditions of Lemma 1.2 with the exception of condition (iv), i.e., a vertex of B may be at distance two from a vertex of M \ B. However, since a vertex u ∈ B belongs either to 0 C t or t−1 C t it is not difficult to obtain an M -unhindered u, v-path for every v ∈ M .Suppose for example that u ∈ 0 C t , v, w ∈ M \ B, d(u, w) = 2 and u y < w y ≤ v y .If P denote an M -unhindered w, v-path, then either w ′ = (w x + 1, w y ) or w ′′ = (w x , w y + 1) belongs to P .Since it is trivial to obtain an M -unhindered u, w ′ -path and u, w ′′ -path, we can also obtain an M -unhindered u, v-path.
We can see that 0 which in turn satisfies condition (i) of Lemma 1.2.Moreover, it is not difficult to see that d(u, v) ≥ 3 for every u, v ∈ M ′ .In order to see that conditions (ii) and (iii) of Lemma 1.2 are fulfilled, note that for every . Analogously as for an even t we can then conclude that conditions (ii) and (iii) of Lemma 1.2 are also fulfilled.It follows that M ′ is a mutualvisibility set of , where the sets B, M 1 , M 2 , and M 3 are defined as follows: for every z, w ∈ V (C 3k C 3k ), conditions (ii) and (iii) of Lemma 1.2 are also fulfilled.
We can also see that d(u, v) ≥ 3 for every u, v ∈ M , which confirms condition (iv) of Lemma 1.2.It follows that M is a mutual-visibility set of cardinality 9k in C 3k C 3k if k ≥ 5 is odd.
Proof.We will show that a mutual-visibility set of cardinality 3t exists for every t ≡ 0 (mod 3), t ≥ 18.Let t = 3k, where k ≥ 6 is even.Note that for every , the construction is depicted on the right-hand side of Fig. 4. We can see that the vertices of M ∩ C i 3k as well as of M ∩ j C 3k are pairwise at distance k.Thus, using the same arguments as in the proof of Proposition 3.2 we can see that M satisfies conditions (i), (ii), and (iii) of Lemma 1.2.
Since it is not difficult to confirm that d(u, v) ≥ 3 for every u, v ∈ M , it follows that M is a mutual-visibility set of cardinality 9k in C 3k C 3k if k ≥ 6 is even.Proof.We will show that a mutual-visibility set of cardinality 3t exists for every t ≡ 5 (mod 6), t ≥ 17.Let us of an odd k set t = 3k+2.Note that for every u, v ∈ V (C 3k+2 C 3k+2 ) we have For k = 5 the construction is depicted on the left-hand side of Fig. 5.We can see that Note that the distance between vertices of M ∩ C i 3k+2 is either k or k + 1, while the distance between vertices of M ∩ j C 3k+2 is either k or k + 2. Thus, using the same arguments as in the proof of Proposition 3.2 we can see that M satisfies conditions (i), (ii), and (iii) of Lemma 1.2.
Since we can confirm that d(u, v) ≥ 3 for every u, v ∈ M , It follows that M is a mutual-visibility set of cardinality 9k + 6 in Proof.We will show that a mutual-visibility set of cardinality 3t exists for every t ≡ 1 (mod 6), t ≥ 19.
Let us of an even k set t = 3k+1.Note that for every the construction is depicted on the right-hand side of Fig. 5.We can see that M = {(i, (2i + j(k + 1)) mod (3k + 1) Note that the distance between vertices of M ∩ C i 3k+1 is either k or k + 1, while the distance between vertices of M ∩ j C 3k+2 is either k + 1 or k − 1.Thus, using the same arguments as in the proof of Proposition 3.2 we can see that M satisfies conditions (i), (ii), and (iii) of Lemma 1.2.
Since we can confirm that d(u, v) ≥ 3 for every u, v ∈ M , It follows that M is a mutual-visibility set of cardinality 9k + 3 in Proof.We will show that a mutual-visibility set of cardinality 3t exists for every t ≡ 2 (mod 6), t ≥ 20.
Let us of an even k set t = 3k+2.Remind that for every , the construction is depicted on the left-hand side of Fig. 6.
, the vertices of M ∩ j C 3k+2 are pairwise at distance from the set {k + 3, k, k − 1}, while the distance between vertices of M ∩C i 3k+2 is either k + 1 or k.Thus, using the same arguments as in the proof of Proposition 3.2 we can see that M satisfies conditions (i), (ii), and (iii) of Lemma 1.2.
If u y ∈ {3k − 1, 3k} and u x < 2k, it is not difficult to see that we can always find an M -unhindered shortest u, x ′ -and u, x ′′ -path.Analogously, if v y > 1 and v x ∈ {2k + 2, 2k + 3k}, we can always find an M -unhindered v, (2k + 2, 1)-and v, (2k + 3, 0)-path.It follows that we can construct an an M -unhindered u, v-path for every u, v that satisfy the above conditions.
Finally, if u y = 3k and u x = 3k 2 then we can an find an M -unhindered u, x ′and u, x ′′ -path, while for v y = 1 and v x = 5k 2 + 3 we can find an M -unhindered v, y ′ -and v, v ′′ -path.It follows that we can construct an M -unhindered u, vpath for this selection of u and v.
The above discussion shows that there exists an M -unhindered u, v-path for every u, v ∈ M where u x ≤ 2k + 1.The proof for u x ≥ 2k + 2 is analogous.
Proof.Since µ(C t C t ) ≤ 3t by Proposition 2.2, we have to show that a mutualvisibility set of cardinality 3t exists for every t ≡ 4 (mod 6).
Let us of an odd the construction is depicted on the right-hand side of Fig. 6.
We can see that 3k+1 are pairwise at distance either k + 1 or k.Thus, using the same arguments as in the proof of Proposition 3.2 we can establish that M satisfies conditions (i), (ii), and (iii) of Lemma 1.2.
In other words, a vertex of M i is obtained from u ∈ M by shifting its first coordinate by δ Si (u x ) positions.Note that M i is a subset of C t+i C t of cardinality 3t.
Proof.The proof is based on the constructions of mutual-visibility sets for the graphs of interest that are available on the web page external document.
We do not give the details here since the reasoning is analogous for all values of t.As an example, we consider the case t = 3.We found a mutual-visibility set with 9 vertices of C s C 3 for every s ∈ [6,18].Moreover, we can apply the construction for C 18 C 3 in a similar manner to the case t ≡ 3 (mod 6) in the proof of Theorem 2.4.Remark 3.10.Mutual-visibility numbers of C s C t , for t ≤ 13 are presented in Table 2.The majority of the results were obtained using a computer, especially through backtracking.Note that the last mutual-visibility number in a row that corresponds to some t always equals 3t.

Table 1 :
Mutual-visibility numbers of P s C t , where t ≤ 17

Table 2 :
Mutual-visibility numbers of C s C t , where t ≤ 13