On 2-limited packings of complete grid graphs

On 2-limited packings of complete grid graphs

Discrete Mathematics ( ) – Contents lists available at ScienceDirect Discrete Mathematics journal homepage: www.elsevier.com/locate/disc On 2-lim...

413KB Sizes 0 Downloads 29 Views

Discrete Mathematics (

)



Contents lists available at ScienceDirect

Discrete Mathematics journal homepage: www.elsevier.com/locate/disc

On 2-limited packings of complete grid graphs Nancy E. Clarke a, *, Robert P. Gallant b a b

Department of Mathematics and Statistics, Acadia University, Wolfville, NS, Canada Division of Science, Grenfell Campus, Memorial University, Corner Brook, NL, Canada

article

info

Article history: Received 5 November 2015 Received in revised form 15 September 2016 Accepted 1 November 2016 Available online xxxx Keywords: Graph packing 2-limited packing Cartesian product Box product Grid graph

a b s t r a c t For a fixed integer t, a set of vertices B of a graph G is a t-limited packing of G provided that the closed neighbourhood of any vertex in G contains at most t elements of B. The size of a largest possible t-limited packing in G is denoted Lt (G) and is the t-limited packing number of G. In this paper, we investigate the 2-limited packing number of Cartesian products of paths. We show that for fixed k the difference L2 (Pk □Pn ) − L2 (Pk □Pn−1 ) is eventually periodic as a function of n, and thereby give closed formulas for L2 (Pk □Pn ), k = 1, 2, . . . , 5. The techniques we use are suitable for establishing other types of packing and domination numbers for Cartesian products of paths and, more generally, for graphs of the form H □Pn . © 2016 Elsevier B.V. All rights reserved.

1. Introduction Many problems of both practical and theoretical interest involve packing objects into a structure. For example, one might want to place as many radioactive containers as possible into a building without, say, any three containers being too near each other. This might be modeled as the problem of selecting a maximum number of vertices from a graph (location of the containers) such that no graph vertex (location) is adjacent (close) to more than three of the selected vertices (containers). In [4], the authors introduce the concept of limited packings in a graph, which generalize the well-known concept of closed-neighborhood packings. Recall that a closed-neighborhood packing in a graph G is a subset P of vertices in G with the property that the closed neighborhoods of these vertices are disjoint, or equivalently that the closed neighborhood of each vertex in G contains at most one vertex from the set P. Limited packings generalize this latter point of view. Definition 1. For a natural number t, a t-limited packing B in an undirected graph G is a set of vertices in G such that the closed neighborhood of any vertex in G contains at most t members of B. In other words, B is a t-limited packing in G provided

∀v ∈ V (G), |N [v] ∩ B| ≤ t . The problem of selecting graph vertices in the opening paragraph is equivalent to finding a maximum-size 3-limited packing in a graph. In Fig. 1 we illustrate a 2-limited packing in a graph G. The set of shaded vertices B is a 2-limited packing in G. The graph in Fig. 1 can be obtained as the Cartesian (or box) product of the paths P3 and P5 ; so G ∼ = P3 □P5 . Graphs obtained as the Cartesian product of paths are called complete grid graphs, or simply grid graphs.1 Such graphs naturally arise in applications involving city planning or electrical circuit layouts, for example.

*

Corresponding author. E-mail addresses: [email protected] (N.E. Clarke), [email protected] (R.P. Gallant).

1 Some authors take ‘grid graph’ to refer to subgraphs of a complete grid graph; henceforth by grid graph we mean a complete grid graph. http://dx.doi.org/10.1016/j.disc.2016.11.001 0012-365X/© 2016 Elsevier B.V. All rights reserved.

Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

2

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



Fig. 1. A 2-limited packing of P3 □P5 .

For a given graph G, the size of a maximum cardinality t-limited packing in G is denoted Lt (G) and is called the t-limited packing number of G. The problem of determining whether an arbitrary graph G has a t-limited packing of at least a given size is NP-complete [1]. Limited packings have been discussed by a number of other authors; see for example [2–4,7]. The 2-limited packing shown in Fig. 1 happens to be of largest possible size amongst all 2-limited packings in G, and so L2 (P3 □P5 ) = 8. In this paper we are interested in 2-limited packings and, in particular, the value of L2 (Pk □Pn ) for natural numbers n, k. Our motivation for presenting our results for t-limited packings in terms of the case t = 2 is that 1-limited packings (i.e. 2-packings) have been well-studied. As a result, it is natural to next consider 2-limiting packings as a concrete example of t-limited packings. When k ∈ {1, 2} it is easy to determine a formula in n for L2 (Pk □Pn ), and the case k = 3 can also be handled relatively simply. These cases will be considered later but, to better understand a more complex situation, consider the case when k = 4: Table 1 follows from the results in Section 4.1. This table shows, for small n, the values of L2 (P4 □Pn ) and the values of the growth of this function of n, ∆[L2 (P4 □Pn )] = L2 (P4 □Pn ) − L2 (P4 □Pn−1 ). Table 1 Some 2-limited packing numbers of graphs P4 □Pn . n

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

L2 (P4 □Pn ) ∆[L2 (P4 □Pn )]

3 –

4 1

6 2

8 2

10 2

12 2

13 1

15 2

17 2

18 1

20 2

22 2

24 2

25 1

27 2

In this paper we show that the difference function ∆[L2 (P4 □Pn )] = L2 (P4 □Pn ) − L2 (P4 □Pn−1 ) is eventually periodic as a function of n and that the highlighted ‘2221221’ pattern repeats for n ≥ 4. From this, a closed formula for L2 (P4 □Pn ) follows easily. This paper further shows that, for any natural number k, the values ∆[L2 (Pk □Pn )] are eventually periodic as a function of n with explicit bounds on when the periodicity begins. As a consequence we give simple formulas (in n) for the 2-limited packing number of Pk □Pn , for each k ∈ {1, 2, 3, 4, 5}. The key idea of the paper is that 2-limited packings in a grid graph can be identified with walks in a certain weighted digraph, so that the size of the packing is the weight of the walk. Thus the computation of the size of maximum 2-limited packings in the grid graph becomes the computation of a maximum-weight walk in a digraph of a given length, which is more straightforward. The intuition that maximum-weight walks of longer and longer lengths must incorporate many ‘‘maximum-weight cycles’’ is developed to show an eventual periodicity in the growth of the size of a maximum 2-limited packing of a grid graph Pk □Pn , as n increases. Bounds are determined on the appearance of the periodicity from which we can determine explicit formulas for the 2-limited packing number of grid graphs Pk □Pn , for k ∈ 1, 2, 3, 4, 5 and any n. The technique is easily seen to generalize to the computation of 2-limited packing numbers of graphs of the form G□Pn and, more generally, can be applied to the computation of a number of other graph parameters (such as domination number) on graphs of the form G□Pn . For example, the techniques here show why, for any graph H, the domination number γ (H □Pn ) also grows in a regular way (the difference ∆[γ (H □Pn )] is eventually periodic as a function of n). We note that computation of the domination number of a grid is a non-trivial problem [6]. Similar techniques have been considered by other authors; see for example [5] or [8]. A main contribution of our technique is that we transform the problem to a standard graph problem. Another main contribution of this paper is that we prove the eventual periodicity of the difference function. We have not found another paper which does this. The paper [8] states, on page 7, that a proof of a similar result is to appear in a forthcoming paper but that paper does not seem to ever have been published. Similar work is also discussed in [9], but the methods are quite different than those we use here. Another difference is that we consider the 2-limited packing problem, something not considered in other papers. 2. Packings and maximum-weight walks The basic idea of this paper is that 2-limited packings in a grid graph are in one-to-one correspondence with weighted directed walks in a particular digraph that we describe in this section. Furthermore, the size of the packing equals the weight of the walk, and so we can reduce the problem of finding a maximum-weight 2-limited packing in a grid graph to that of Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



3

finding a maximum-weight walk (of a given length), which is algorithmically straightforward. In this section, we make this idea more precise. We will use the following notation for a grid graph, and for describing subsets of vertices of such graphs. Definition 2. Let a, α, b, β be integers with a ≤ α and b ≤ β . The grid graph on [a,α]×[b,β] is the graph with vertex set {(i, j)|a ≤ i ≤ α, b ≤ j ≤ β} and with vertices (i, j) and (i′ , j′ ) adjacent provided that |i − i′ | + |j − j′ | = 1. Definition 3. Given subsets u, v of the set {1, 2, . . . , k}, then by (u, v )×(i, i + 1) we mean the set of ordered pairs (u×{i}) ∪ (v×{i + 1}). Similarly (u, v, w )×(i, i + 1, i + 2) = (u×{i}) ∪ (v×{i + 1}) ∪ (w×{i + 2}) and, generally, −1 (u0 , u1 , . . . , um−1 )×(i, i + 1, . . . , i + m − 1) = ∪m s=0 us ×{i + s}. For example, we might imagine the upper left vertex in the grid graph shown in Fig. 1 as being vertex (1, 1) and the lower right vertex as being (3, 5), and call it the grid graph on [1, 3]×[1, 5]. Of course there are other vertex labelings that result in an isomorphic grid graph. The packing illustrated in Fig. 1 is the set {{1, 2}, {3}, {1, 3}, {1}, {2, 3}}×{1, 2, 3, 4, 5}. In the correspondence between walks and 2-limited packings, extending a walk by one step (to obtain a new directed walk) will mean ‘gluing’ something onto the end of a packing that results in a new packing. The following lemma plays a key role in the correspondence. It gives conditions sufficient for ‘gluing’ together two different 2-limited packings of grid graphs to obtain a new 2-limited packing. Lemma 4. Suppose that G1 is a grid graph on [1, k]×[1, n] and G2 a grid graph on [1, k]×[n, n + 1], and that B is a 2-limited packing in G1 and B′ a 2-limited packing in G2 . Suppose further that 1. B ∩ ({1, 2, . . . , k}×{n}) = B′ ∩ ({1, 2, . . . , k}×{n}), and that 2. (B ∪ B′ ) ∩ {1, 2, . . . , k}×{n − 1, n, n + 1} is a 2-limited packing in the grid graph on [1, k]×[n − 1, n + 1]. Then B ∪ B′ is a 2-limited packing in the grid graph G on [1, k]×[1, n + 1]. Proof. We show that each vertex v in the graph G has |N [v] ∩ (B ∪ B′ )| ≤ 2. Suppose v = (x, y). If y < n, then any vertex in N [v] has a second coordinate that is at most n, and so property (1) ensures N [v] ∩ (B ∪ B′ ) = N [v] ∩ B and the cardinality of this last set is at most 2 (because B is a 2-limited packing). If y = n, then any vertex in N [v] has a second coordinate in {n − 1, n, n + 1} and so, by property (2) , |N [v] ∩ (B ∪ B′ )| ≤ 2. If y = n + 1, then any vertex in N [v] has a second coordinate in {n, n + 1}, and so property (1) ensures N [v] ∩ (B ∪ B′ ) = N [v] ∩ B′ and thus, since B′ is a 2-limited packing, we again have that the cardinality of the last set is at most 2. □ We will now interpret packings in a complete grid graph as directed walks in a certain directed graph. The directed graph is defined such that extending a length n − 1 walk in the digraph by one arc is equivalent to extending a 2-limited packing of Pk □Pn (viewed as a k-row by n-column grid of vertices, some of which are in the packing) by one column. It is not enough, however, to simply make vertices of the digraph represent a packing of one column; each vertex must represent a packing of several columns. In slightly more detail: most vertices in the digraph represent the possible packings of Pk □P2 , and we define vertices adjacent when we can glue the packings represented by the vertices together using Lemma 4. In this way, one new arc in the walk gives one new column of the packing. The first arc of the walk encodes two columns of the packing; this requires a special start vertex in the digraph and also explains why the correspondence involves n − 1 and n in the previous paragraph. The full graph and part of the graph for the cases k = 2 and k = 3 are illustrated in Figs. 2 and 3, respectively. The following definition makes these ideas precise. Definition 5. Let k be a natural number. The vertex set of the weighted directed graph Dk consists of

• all the pairs (u, v ), where u, v ⊆ {1, . . . , k} and (u, v )×(1, 2) is a 2-limited packing in the grid graph on vertices [1, k]×[1, 2], and • an additional vertex Z (different from any of the above). The arc set of Dk consists of

• an arc from Z to (u, v ) of weight |u| + |v| for each vertex (u, v ), and • an arc from (u, v ) to (v, w) of weight |w| for each pair of vertices (u, v ) and (v, w) such that (u, v, w )×(1, 2, 3) is a 2-limited packing in the grid graph on [1, k]×[1, 3]. Walks starting at vertex Z correspond to packings of a grid graph. The first arc Z → (u, v ) of the walk represents the first two columns u, v of a packing of a grid graph, and the weight |u| + |v| of this first arc is the number of vertices in the first two columns that are packing vertices. Each subsequent step (u, v ) → (v, w ) of the walk represents a subsequent column w of the packing, and the weight |w| of the new arc is the number of vertices in the new column in the packing. Consequently the weight of the walk is the size of the packing. We state this connection more formally as Proposition 6. Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

4

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



Fig. 2. The digraph when k = 2.

Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



5

Fig. 3. Partial digraph when k = 3.

Proposition 6. Each 2-limited packing in the grid graph Pk □Pn corresponds to a directed walk of length n − 1 starting at vertex Z in graph Dk and, furthermore, in this correspondence the weight of the walk equals the size of the 2-limited packing. Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

6

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



Proof. We claim the function mapping a 2-limited packing (u1 , u2 , . . . , un )×(1, 2, . . . , n) to walk Z , (u1 , u2 ), (u2 , u3 ), (u3 , u4 ), . . . , (un−1 , un ), which is clearly injective, is the desired correspondence. ∑n Let (u1 , u2 , . . . , un )×(1, 2, . . . , n) be a 2-limited packing of size i=1 |ui | in the grid graph on [1, k]×[1, n]. Then Z , (u1 , u2 ), (u2 , u3 ), (u3 ,∑ u4 ), . . . , (un−1 , un ) is a directed walk in the digraph Dk of length n − 1 and of weight (|u1 | + |u2 |) + ( | u3 | ) + · · · + ( | un | ) = |ui |. So for each 2-limited packing, we have a walk starting at vertex Z and of length n − 1 such that the size of the packing is the weight of the walk. ∑n Similarly if Z , (u1 , u2 ), (u2 , u3 ), (u3 , u4 ), . . . , (un−1 , un ) is a directed walk in Dk , necessarily of weight i=1 |ui |, then repeatedly applying∑ Lemma 4 shows that (u1 , u2 , . . . , un )×(1, 2, . . . , n) is a 2-limited packing in the grid graph on vertices [1, k]×[1, n] of size ni=1 |ui |. So for each walk starting at vertex Z and of length n − 1, we have a 2-limited packing such that the weight of the walk is the size of the packing. □ Restricting our attention to maximum-size 2-limited packings, Proposition 6 implies that a maximum-size 2-limited packing in the grid graph on [1, k]×[1, n] corresponds to a maximum-weight directed walk in Dk from the vertex Z of length n − 1; moreover, if we denote by wsn,f the maximum weight of any walk of length n from vertex s to vertex f in digraph Dk , then 1 L2 (Pk □Pn ) = max{wZn− ,f |f ∈ V (Dk )}.

(1)

For example, in Fig. 3 the walk v 0, v 29, v 26, v 6, v 29, v 26, v 6 is a maximum-weight walk from vertex Z of length 6, and the weight of this walk is 10. Therefore L2 (P3 □P7 ) = 10. In fact, for walks of length 3t, the walk starting with vertex v 0 followed by t copies of the cycle v 29, v 26, v 6 is a maximum-length walk in Dk from vertex Z . Thus such walks correspond to maximum 2-limited packings in P3 □P3t +1 . Hence finding maximum-size 2-limited packings in the grid graph on vertices [1, k]×[1, n] is equivalent to finding maximum-weight directed walks in Dk from the vertex Z of length n − 1. This latter problem, and the related determination of a maximum-weight walk in a digraph of a specified length and between a specified pair of vertices, is straightforward and we review it in the next section. 2.1. Maximum-weight walks of a given length Suppose D is a weighted directed graph, such as the digraph Dk in Definition 5, with weight w (a) on arc a and vertices s, f ∈ V (D). We are interested in walks in D from s to f that have a fixed number of arcs, say n. Suppose W = s, a1 , v1 , a∑ 2 , v2 , . . . , vn−1 , an , f , where each vi is a vertex and each ai is an arc, is such a walk. We say this walk has n weight w (W ) = i=1 w (ai ), length len(W ) = n, starts at vertex s, and ends at vertex f . Among all walks from a vertex u to a vertex v with length n, there are walks with maximum weight (since the number of such walks is finite). We call a walk with this maximum weight a maximum-weight walk from u to v of length n. As before, we denote the weight of such a walk by wun,v , which is taken to be −∞ when there are no walks from u to v with length n. A maximum-weight walk from vertex s to any vertex v of length n − 1, followed by a maximum-weight walk from vertex v to vertex f of length 1 is a walk from s to f of length n and hence 1 wsn,f ≥ max{wsn,v−1 + wv, f |v ∈ V (G)}.

(2)

If s, a1 , v1 , a2 , v2 , . . . , vn−1 , an , f is a maximum-weight walk from s to f of length n, then necessarily s, a1 , v1 , a2 , v2 , . . . , vn−1 is a maximum-weight walk from s to vn−1 of length n − 1, and vn−1 , an , f is a maximum-weight walk from vn−1 to f of length 1. From this it follows that equality is achieved in Eq. (2) for some vertex v and hence 1 wsn,f = max{wsn,v−1 + wv, f |v ∈ V (G)}.

(3)

Suppose we are interested in computing the weights of maximum-weight walks between pairs of vertices in a directed graph D, say on vertex set {1, 2, . . . , m}, for walks of length n where 1 ≤ n ≤ Nmax . We can do so by initially defining, for vertices s, f ∈ V (D), ws1,f to be the weight of arc (s, f ) in D, initially defining values wsn,f for n > 1 to −∞, and then using Eq. (3) recursively. This observation underlies the algorithm of Fig. 4, which is simple variation of the familiar Floyd–Warshall algorithm for shortest paths and will compute the values wsn,f for each s, f ∈ V (D) and for each integer n ∈ [1, Nmax ]. Consequently, we can compute, for a given vertex s in a weighted directed graph D having m vertices and a given natural number n, the maximum weight amongst all walks in D of length n starting from a given vertex s by performing this algorithm and then computing the maximum value in the set {wsn,f |1 ≤ f ≤ m}. This algorithm has complexity O(Nmax m3 ). One interpretation of this is that if we think of the digraph having m vertices as fixed, we can compute the weight of a maximum-weight walk of length n in this digraph in time linear in n. As with the Floyd–Warshall algorithm, we can modify this algorithm so that it actually computes a length-n walk of maximum weight, and not just the weight of such a walk. Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



7

Fig. 4. Algorithm: maximum-weight walk of a given length.

3. The eventual periodicity of the growth of wns,f as a function of n For a fixed natural number k, naive methods of computing L2 (Pk □Pn ) result in algorithms whose complexity is exponential in n. The correspondence of the previous section, and the algorithm for finding the length of maximum-weight walks in a digraph, can be used together to determine the 2-limited packing numbers of grid graphs Pk □Pn . With this method, we must construct the digraph Dk , which will have a number of vertices that is exponential in k. However once this is done, we can use this data to compute the value L2 (Pk □Pn ) in time polynomial in n. Therefore such computation would only be practical for small values of k. As discussed in the introduction, our intuition is that maximum-weight walks of longer and longer lengths between a pair of vertices must incorporate and repeat many ‘‘maximum-weight cycles’’. In this section, we follow this intuition and show that, for fixed s, f , the values wsn,f eventually grow (as a function of n) in a regular and periodic way. We also give a bound on n after which the periodic growth is guaranteed to have been established. This means for example that if, for fixed k, we have computed Pk □Pn for values of n up to the point where the periodic growth is known to be established, we then know explicit formulas for the value of L2 (Pk □Pn ) for all n. This idea will allow us, in the next section, to derive explicit formulas for the 2-limited packing number of grid graphs Pk □Pn , for k ∈ 1, 2, 3, 4, 5 and any n. Assume D is a weighted digraph with nonnegative weight wx1,y on the arc from x to y, and suppose s and f are vertices in D. For each n ∈ N, there is a walk from vertex s to f of length n and, among all such walks, a walk with maximum weight. As before, we denote the weight of such a walk as wsn,f . In this section, we will talk of directed cycles which are walks where all vertices except the first and last are different. For a vertex v ∈ V (D) and a directed cycle C , by v ∈ C we mean vertex v is one of the vertices in the directed walk C . Our approach requires us to decompose a walk into cycles connected by smaller walks; this is the focus of the following definition and subsequent lemma. Definition 7. Suppose W1 , W2 are walks in a digraph D such that the last vertex, end(W1 ), of W1 is the same as the first vertex, start(W2 ), of W2 . Then we write the concatenation of these walks as W1 W2 . If C is a directed cycle in D containing the vertex v , and v = end(W1 ) = start(W2 ), then by W1 C e W2 we mean the directed walk consisting of the walk W1 , followed by the walk C repeated e times, followed by the walk W2 . We need Lemma 8 below about decomposing a walk into simple pieces. Lemma 8. Suppose D is a directed graph, and W is a directed walk in D from a vertex s to a vertex f . Then there is a directed walk W ′ in D from s to f of the form W0 C1,1 C1,2 C1,3 . . . C1,e1 W1 C2,1 C2,2 . . . C2,e2 W2 . . .

. . . Wk−1 Ck,1 Ck,2 . . . Ck,ek Wk ,

(4)

where each of the following is true: 1. 2. 3. 4. 5. 6. 7. 8.

k and each ei are nonnegative integers, each Wi is a walk, each Ci,j is a (simple) cycle from vertex end(Wi−1 ) to end(Wi−1 ), the vertices end(W0 ) through end(Wk−1 ) are distinct, each len(Wi ) ≤ |V (D)|, k ≤ |V (D)|, ∑ k i=0 len(Wi ) ≤ |V (D)|(|V (D)| + 1), and the arcs in W ′ are just a rearrangement of the arcs of W . In particular, w (W ′ ) = w (W ).

Proof. The initial walk W , with k = 0, satisfies properties 1, 2, 3, 4, 6, 8; observe properties 5 and 6 imply properties 7. We show a walk satisfying 1, 2, 3, 4, 6, 8 and not satisfying property 5 can be transformed into a similar type of walk W ′ in a way that eventually leads to property 5 being satisfied. Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

8

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



So suppose W is a walk of the form (4) satisfying properties 1, 2, 3, 4, 6 and 8, which does not satisfy property 5. So some Wj has length |V (D)| + 1 or more and so it contains a (simple) cycle C ; suppose Wj can be written as Wj′ CWj′′ . Case 1: If any of the vertices end(W0 ), end(W1 ), . . . , end(Wk−1 ) are in the cycle C , say end(Wl ), then we obtain walk W ′ by performing the following modifications on walk W :

• Cut cycle C from the walk W and insert it (appropriately rotated) after Wl as a new cycle Cl,el +1 . • Replace Wj by Wj′ Wj′′ . Case 2: The other possibility is that none of the vertices end(W0 ), end(W1 ), . . . , end(Wk−1 ) are in the cycle, and this case can only happen if k < |V (D)| since these vertices are distinct. In this case we obtain walk W ′ from walk W as follows:

• For each i > j, relabel each walk Wi as Wi+1 . • For each i ≥ j, relabel each cycle Ci,l as Ci+1,l . • Relabel Wj′ as Wj , relabel Wj′′ as Wj+1 , and relabel C as Cj+1,1 . In each case, we obtain a new walk W ′ in the form of (4) and satisfying conditions 1, 2, 3, 4, 6, 8. If condition 5 is still not satisfied, repeat the process above using W ′ as the input. This cannot go on forever∑ since, every time the process is performed, either the value of k increases (up to a maximum value of |V (D)|) or the value len(Wi ) strictly decreases. So eventually we find a walk W ′ satisfying the properties 1, 2, 3, 4, 6, 8 and also 5, and so also property 7 (since it is implied by properties 5 and 6). Thus the theorem is proved. □ We are interested in ‘‘maximum-weight cycles’’ meaning cycles in D that have the maximum average weight per arc (amongst all cycles in D). In particular let

} { w(C ) ⏐ ⏐ ⏐C is a simple cycle in D .

m = max

len(C )

(5)

We call a cycle a maximum-average-weight cycle in D if it achieves this maximum value. One intuitively expects that walks of maximum weight between a pair of vertices should eventually contain lots of these maximum-average-weight cycles, at least when such a cycle can be touched ‘along the way’. The next few results prove this for pairs of vertices where there is a walk between them that touches a loop and a maximum-average-weight cycle, and when the digraph contains cycles of different average weights. This somewhat technical restriction will be enough for our needs when we apply these results to the digraph Dk of the previous section. Lemma 9. Suppose D is a digraph containing cycles of different average weights and with nonnegative weights w (e) on each arc e, and suppose further that

⏐ { } w (C ) ⏐ • m = max len(C C is a cycle in D is the maximum average arc weight over all cycles in D, ⏐ ) ⏐ ⏐ w (C ) ∗ • C = {C ⏐C is a cycle in D , len(C ) = m} is the set of cycles in D with maximum average arc weight among cycles in D, ⏐ } { w (C ) ⏐ C is a cycle in D with C ̸ ∈ C ∗ is the difference between the maximum average arc weight among • ϵ = min m − len(C ) ⏐ cycles and the next smallest average arc weight among cycles (which again exists since the minimum is over a finite set),

• M = max{w(e)|e ∈ E(D)} is the maximum weight of any arc, and • N = |V (D)|(|Vϵ(D)|+5)M . Then for any n > N, and for any vertices s, f in D such that there is a walk from s to f that contains both a loop vertex and a vertex on a cycle in C ∗ , there exists a maximum-weight walk W in D from s to f of length n that contains cycles C ∈ C ∗ , and moreover the number of arcs of W contained in such cycles is at least n − N. Proof. Suppose W ′ is a maximum-weight walk in D from s to f of length n > N. (A walk of length n between the vertices must exist: Because of the assumptions about vertices s and f , there is a walk from s to a loop vertex and then to f of length |V (D)|(|V (D)|+5)M at most 2|V (D)|. Since ϵ ≤ M, we have n > N ≥ ≥ |V (D)|(|V (D)| + 5) > 2|V (D)| and so by repeating the loop ϵ arc in this walk we obtain a walk from s to f of length n.) Using Lemma 8 with walk W ′ , we obtain a walk W = W0 C1,1 . . . Wk of the same length and weight as W ′ . Walk W may contain cycles Ci,j that are in C ∗ ; let the total number of arcs on such cycles be h. For brevity, let R1 = W0 W1 W2 . . . Wk . Then the weight w (W ) of the walk W is at most (n − len(R1 ) − h)(m − ϵ ) + w (R1 ) + hm. The assumptions about s and f ensure there is a walk from s to f containing both the loop vertex and a vertex on a cycle C ∈ C ∗ with length at most 3|V (D)|. By repeating the loop arc in this walk at most len(C ) times, we obtain a walk R2 (not necessarily a maximum-weight walk) from s to f that contains a vertex of C with len(R2 ) ≡ n (mod len(C )), and with len(R2 ) ≤ 3|V (D)| + len(C ) ≤ 4|V (D)| < N < n. By inserting enough copies of the cycle C into this walk, we obtain a walk from s to f of length n and weight (n − len(R2 ))m + w (R2 ). Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



9

Since W is a maximum-weight walk from s to f of length n, we must have (n − len(R2 ))m + w (R2 ) ≤ w (W ) ≤ (n − len(R1 ) − h)(m − ϵ ) + w (R1 ) + hm and so, upon rearranging, we have

w(R2 ) + len(R1 )(m − ϵ ) − w(R1 ) − len(R2 )m ≤ −ϵ (n − h), and thus len(R2 )m − w (R2 ) + w (R1 ) − len(R1 )(m − ϵ )

ϵ

≥ n − h.

(6)

Now, since

|V (D)|(|V (D)| + 5)M ϵ 4|V (D)|M + |V (D)|(|V (D)| + 1)M = ϵ 4|V (D)|m |V (D)|(|V (D)| + 1)M ≥ + ϵ ϵ

N =



len(R2 )m

ϵ

+

len(R1 )M

ϵ w(R1 ) ≥ + ϵ ϵ len(R2 )m − w (R2 ) + w (R1 ) − len(R1 )(m − ϵ ) ≥ ϵ ≥n − h, by Inequality (6), len(R2 )m

we conclude that h ≥ n − N.



There may be many maximum-average-weight cycles in a digraph D. In this paper we are ultimately interested only in the weights of walks; later we will want to replace some maximum-average-weight cycles in a walk with other maximumaverage-weight cycles, without changing the overall length or weight of the walk. One obvious way to do this is to replace a long maximum-average-weight cycle through a vertex with several copies of a shorter maximum-average-weight cycle when possible. These ‘essential’ cycles are captured by the set E ∗ in Theorem 10, and are the collection of maximum-averageweight cycles through a vertex whose length is not a multiple of a shorter maximum-average-weight cycle through the same vertex. This theorem is the main tool we use in the next section, and essentially says that if n is large enough, the values wsn,f grow in a regular way. Theorem 10. Suppose the conditions of Lemma 9 hold. For each vertex v ∈ V (D) define set Ev∗ = {C ∈ C ∗ |v ∈ C and, for each C ′ ∈ C ∗ with v ∈ C ′ and len(C ′ ) < len(C ), len(C ′ ) ∤ len(C )}, and let E ∗ = ∪v∈V (D) Ev∗ . Let d = lcm{len(C )|C ∈ E ∗ }, and let a∗ = C ∈E ∗ (d − len(C )). Then for any vertices s, f in D such that there is a walk from s to f that contains both a loop vertex and a vertex on a cycle in C ∗ , and for any integer n > N + a∗ , we have



wsn,+f d = wsn,f + dm, where wsn,f denotes the weight of a maximum-weight walk from vertex s to vertex f of length n in D. Proof. Suppose D is a digraph with associated set C ∗ and associated values m, d, N. Assume s, f are arbitrary vertices as stated and that n > N + a∗ . Because of Lemma 9, we may suppose W is a maximum-weight walk from s to f of length n and that W contains a vertex v on some cycle C ∈ C ∗ . By inserting d/len(C ) copies of the cycle C at the vertex v , we obtain a walk W ′ from s to f of length d n + d and weight wsn,f + dm. Therefore wsn,+ ≥ wsn,f + dm. f To finish the proof we establish the inequality in the other direction. Again using Lemma 9, we now suppose W is a maximum-weight walk from s to f of length n + d that contains maximum-average-weight cycles, and the number of arcs on such cycles is at least n + d − N > n − N. The definition of E ∗ ensures that we can replace any maximumaverage-weight cycles in W with cycles from the set E ∗ without changing the walk length or weight and so, without loss of generality, assume that every such maximum-average-weight cycle∑ in W is in E ∗ . If each cycle C ∈ E ∗ occurred in W at most d/len(C ) − 1 times, then these cycles would contribute at most C ∈E ∗ (d/len(C ) − 1)len(C ) = a∗ arcs to W . But then n − N ≤ the number of arcs on such cycles ≤ a∗ , which contradicts the choice of n > N + a∗ . Thus some cycle C ∈ E ∗ occurs at least d/len(C ) times in W . Removing d/len(C ) copies of that cycle from W gives a walk d n+d n ′ W from s to f of length n and weight wsn,+ f − dm. Therefore ws,f ≥ ws,f − dm. □ Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

10

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



4. The growth of L2 (Pk □Pn ) In this section, we apply Theorem 10 to the graph Dk and consequently to the values L2 (Pk □Pn ). Corollary 11. Fix a natural number k. Then there exist positive integers m, d, N ∗ such that, for all integers n > N ∗ , we have L2 (Pk □Pn+d ) = L2 (Pk □Pn ) + dm. Proof. The conditions of Lemma 9 hold when D is the digraph Dk , s is the vertex Z and f is any other vertex in Dk : vertex (∅, ∅) in Dk is a loop vertex and, if (u, v ) is any vertex in Dk (other than Z ) and (a, b) is a vertex on a cycle in C ∗ , then Z , (a, b), (b, ∅), (∅, ∅), (∅, u), (u, v ) is a walk in D from s to f that contains both a loop vertex and a vertex on a cycle in C ∗ . So Lemma 9 and Theorem 10 apply; let N , m, d, a∗ be the values identified in the theorem and let N ∗ = N + a∗ + 1. Then, for n > N ∗ , we have d−1 L2 (Pk □Pn+d ) = max{wZn+ |f ∈ V (Dk )} (by Eq. (1)) ,f 1 = max{wZn− ,f + dm|f ∈ V (Dk )} (by Theorem 10) 1 = max{wZn− ,f |f ∈ V (Dk )} + dm as d, m do not depend on f

= L2 (Pk □Pn ) + dm (again using Eq. (1)).



This theorem proves the result mentioned at the end of the introduction, namely that the difference function ∆[L2 (Pk □Pn )] is eventually periodic, with period (dividing) d. This follows since

∆[L2 (Pk □Pn+d )] − ∆[L2 (Pk □Pn )] = (L2 (Pk □Pn+d ) − L2 (Pk □Pn+d−1 )) − (L2 (Pk □Pn ) − L2 (Pk □Pn−1 )) = (L2 (Pk □Pn+d ) − L2 (Pk □Pn )) − (L2 (Pk □Pn+d−1 ) − L2 (Pk □Pn−1 )) = dm − dm = 0, for n > N ∗ . Also observe that a similar result could be stated about graphs of the form H □Pn and, more generally, about other graph parameters such as the domination number and 2-packing number of graphs of this form using analogues of Lemma 4, Definition 5, and Proposition 6. 4.1. Closed formulas for L2 (Pk □Pn ) for small k

as

⌊The ⌋grid graph on [1, 1]×[1, n], or equivalently the graph P1 □Pn , is just the path Pn and the value of L2 (Pn ) is given in [4] 2n 3

, i.e.

⌊ L2 (P1 □Pn ) =

2n 3



.

If B is a 2-limited packing in the grid graph on [1, 2]×[1, n], then B ∪{(1, n + 2), (2, n + 2)} is a 2-limited packing in the grid graph on [1, 2]×[1, n + 2], from which the inequality L2 (P2 □Pn+2 ) ≥ L2 (P2 □Pn ) + 2 follows. By moving some elements of a maximum 2-limited packing if necessary, one can assume a maximum 2-limited packing in the grid graph on [1, 2]×[1, n+2] that contains {(1, n + 2), (2, n + 2)} and so also does not contain either element of {(1, n + 1), (2, n + 1)}. Removing the last two columns shows L2 (P2 □Pn+2 ) − 2 ≤ L2 (P2 □Pn ). Together this gives L2 (P2 □Pn+2 ) = L2 (P2 □Pn ) + 2. As L2 (P2 □P1 ) = 2 and L2 (P2 □P2 ) = 2, we obtain the following: ⌈n⌉ L2 (P2 □Pn ) = 2 . 2 For larger values of k, we rely on the results of the previous sections. The values d, m in Corollary 11 depend on k; specifically m is the maximum average arc weight amongst cycles in the digraph Dk (see Lemma 9), and d is the least common multiple of the lengths of (essential) maximum-average-weight cycles in Dk (see Theorem 10). For small values of k, it is feasible to explicitly determine the corresponding values of d, m, N , a∗ by constructing the graph Dk and determining the maximum-average-weight cycles in the graph, from which the required values are easily found. More specifically, for a fixed k ∈ N, we can determine the values L2 (Pk □Pn ) using the following method: We construct the digraph Dk from Definition 5. We use the algorithm given in Fig. 4 to compute the values wsn,f , for 1 ≤ n ≤ |V (Dk )|, from which we determine the weights of, lengths of, and vertices on the essential maximum-average-weight cycles (those in E ∗ ) in Dk and a lower bound on ϵ . From this, the values a∗ , m, d and an upper bound on N can be determined from Theorem 10. We then use Fig. 4 to compute the values L2 (Pk □Pn ) = wNn ,D , for 1 ≤ n ≤ N + d + a∗ . For larger values of n, the values of k wnn,Dk and thus L2 (Pk □Pn ) are determined by Theorem 10. From this, a closed formula for L2 (Pk □Pn ) can be determined. We have done this for small values of k. In the cases considered, the periodicity in the growth of L2 (Pk □Pn ) is established much earlier than is guaranteed by Theorem 10, and with an actual period less than and dividing the value d determined above, which we can directly confirm using the computed values. Consequently, simple formulas for the 2-limited packing numbers L2 (Pk □Pn ) are available. Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001

N.E. Clarke, R.P. Gallant / Discrete Mathematics (

)



11

For k = 3, we performed the above procedures and determined that in this case N ≤ 330336, d = 630, m = 4/3, and a∗ ≤ 25395. Applying Theorem 10 assures us that, for n ≥ N + d + a∗ , we have L2 (P3 □Pn+630 ) = L2 (P3 □Pn ) + 840. Using Fig. 4, we computed each of the values wsn,f , for s, f ∈ V (D3 ) and 1 ≤ n ≤ N + d + a∗ , and consequently the values L2 (P3 □Pn ) = max{wZn,f |f ∈ V (D3 )}. From this data we observed that, for integer n ∈ [1, 4], the values of L2 (P3 □Pn ) are 2, 4, 5, 6 and that, for 2 ≤ n ≤ N + d + a∗ , we have L2 (P3 □Pn+3 ) = L2 (P3 □Pn ) + 4. Applying Lemma 12, stated without proof below, thus ensures that, for n ≥ 2, we have L2 (P3 □Pn+3 ) = L2 (P3 □Pn ) + 4, from which Theorem 13 is immediate. Lemma 12. Suppose for function f (n), natural numbers d, p, n0 , N0 , and real µ, we have 1. f (n + d) = f (n) + dµ, for all n > N0 and 2. f (n + p) = f (n) + pµ, for all n ∈ (n0 , N0 + d] (n0 < N0 ). Then f (n + p) = f (n) + pµ, for all n ≥ n0 . Theorem 13. We have L2 (P3 □P1 ) = 2 and, for n ≥ 2, we have

⌊ L2 (P3 □Pn ) = 4

n−2



3

+ [4, 5, 6][(n − 2) mod 3]

(where by [a0 , a1 , . . . , ak , . . .][k], we mean ak ). The same technique was used for k = 4, and we found N ≤ 20379576, d = 7, m = 12/7, and a∗ = 0. Applying Theorem 10 assures us that, for n ≥ N + d + a∗ , we have L2 (P4 □Pn+7 ) = L2 (P4 □Pn ) + 12. Using Fig. 4 we determined L2 (P4 □Pn ), for n ≤ N + d + a∗ , and observed that, for n ∈ [1, 9], the values of L2 (P4 □Pn ) are 3, 4, 6, 8, 10, 12, 13, 15, 17 and that, for 3 ≤ n ≤ N + d + a∗ , we have L2 (P4 □Pn+7 ) = L2 (P4 □Pn ) + 12. Thus, for n ≥ 3, we have L2 (P4 □Pn+7 ) = L2 (P4 □Pn ) + 12, from which Theorem 14 is immediate. Theorem 14. We have L2 (P4 □P1 ) = 3, L2 (P4 □P2 ) = 4 and, for n ≥ 3, we have

⌊ L2 (P4 □Pn ) = 12

n−3



7

+ [6, 8, 10, 12, 13, 15, 17][(n − 3) mod 7].

A variant of this technique was used for k = 5 to confirm the following: Theorem 15. We have L2 (P5 □P1 ) = 4, L2 (P5 □P2 ) = 6, L2 (P5 □P3 ) = 8 and, for n ≥ 4, we have

⌊ L2 (P5 □Pn ) = 34

n−4 16



+ [10, 12, 14, 16, 18, 20, 22, 24, 26, 29, 31, 33, 35, 37, 39, 41][(n − 4) mod 16].

Acknowledgment The first author was partially supported by a grant from the NSERC (261518-2010). References [1] [2] [3] [4] [5] [6] [7] [8] [9]

M.P. Dobson, V.A. Leoni, G.L. Nasini, The multiple domination and limited packing problems in graphs, Inf. Process. Lett. 111 (23–24) (2011) 1108–1113. A. Gagarin, V.E. Zverovich, Bounds and algorithms for limited packings in graphs, (2014). CoRR abs/1407.1637. A. Gagarin, V. Zverovich, The probabilistic approach to limited packings in graphs, Discrete Appl. Math. 184 (2015) 146–153. R.P. Gallant, G. Gunther, B.L. Hartnell, D.F. Rall, Limited packings in graphs, Discrete Appl. Math. 12 (2010) 1357–1364. W. Goddard, Automated bounds on recursive structures, Util. Math. 75 (2008) 193–210. D. Gonçalves, A. Pinlou, M. Rao, S. Thomassé, The domination number of grids, SIAM J. Discrete Math. 25 (3) (2011) 1443–1453. V.A. Leoni, G.L. Nasini, Limited packing and multiple domination problems: polynomial time reductions, Discrete Appl. Math. 164 (2014) 547–553. M. Livingston, Q.F. Stout, Constant time computation of minimum dominating sets, Congr. Numer. 105 (1994) 116–128. A. Spalding, Min-plus algebra and graph domination (Ph.D. thesis), University of Colorado, 1998.

Please cite this article in press as: N.E. Clarke, R.P. Gallant, On 2-limited packings of complete grid graphs, Discrete Mathematics (2016), http://dx.doi.org/10.1016/j.disc.2016.11.001