An algorithm for the 〈r, s〉-domination number of a tree

Suppose that at most r units of some commodity may be positioned at any vertex of a graph G = (V,E) while at least s (≥ r) units must be present in the vicinity (i.e. closed neighbourhood) of each vertex. Suppose that the function f : V 7→ {0, . . . , r}, whose values are the numbers of units stationed at vertices, satisfies the above requirement. Then f is called an s-dominating r-function. We present an algorithm which finds the minimum number of units required in such a function and a function which attains this minimum, for any tree.


Introduction
We are concerned with situations in which units of some commodity are to be placed at nodes of a network which may be modelled by a simple undirected n-vertex graph G = (V, E).Units positioned at a vertex v may be used in the vicinity of v, i.e. in the closed neighbourhood N [v] of v, which consists of v and all vertices adjacent to v.For various reasons (e.g. economy, space constraints, environmental issues) at most r units may be located at each vertex v, while at least s units may be required in its vicinity.Specific practical examples of these situations are distributions of guards, parking places, retail items, cash registers or hospital beds among the nodes of some network.The minimum number of units which must be distributed throughout the entire network so as to satisfy the above constraints, is obviously an important parameter.
Formally, positive integers r, s (r ≤ s) are given.An r-function of G is a function f The r, s -domination number of G, denoted by γ r, s; G , is the minimum weight of an s-dominating r-function of G.The study of r, s -domination was initiated in [2].In the special case r = s = 1, γ r, s; G is the well-studied domination number γ(G) [6].A linear algorithm for γ(T ) was given in [3].Other recently studied special cases are r = s = k (called {k}-domination [1,4]) and r = 1, s = k (termed k-tuple domination [1,5,7]).
We present an efficient algorithm here for computing γ r, s; T and a function attaining the minimum, for any tree T .

Theoretical justification for the algorithm
We begin with a simple property of integers.Let 0 < r ≤ s ≤ 2r and let P be the set of all ordered pairs (a, b) of non-negative integers satisfying and 0 ≤ b − a ≤ r.
Proof: By hypothesis and the definitions of x, y, M and Σ, i.e. (x, y) satisfies (2).Also, There are now two cases.
In order that the r-function f satisfies f [v] ≥ s for a leaf v of a tree, it is necessary that s ≤ 2r.Hence the preceding lemma is applicable to our situation.
The algorithm, in fact, solves a more general problem than the one stated in the introduction.Let L(T ) be the set of leaves of T and let h be any function from L(T ) to P .Suppose that for u ∈ L(T ), h(u) = (x u , y u ).Our procedure will calculate µ(T, h), the minimum weight of an r-function f satisfying and It also finds an r-function of minimum weight satisfying ( 7), ( 8) and ( 9), which will be called a µ(T, h)-function.
It is easily seen that any tree T (of order n ≥ 3) has a minimum weight s-dominating r-function in which each leaf has value s − r.Hence γ r, s; T = µ(T, h * ), where h * (u) = (s − r, s) for each u ∈ L(T ).Thus, running the algorithm using h = h * solves our original problem.
The following concept is required for the procedure.Suppose that the tree T (of order at least 3) is rooted at w and that S(T ) is the set of support vertices (i.e.vertices adjacent to leaves) v such that the set and that S(T ) = ∅ ⇒ T is a star with centre w.
We now present an informal overview of the algorithm, which has two principal parts.Full details, theorems proving correctness and a formal statement of the procedure will follow.
Step 1 sequentially assigns a label (i.e. an element of P ) to each vertex of T − w.Initially each u ∈ L(T ) is given the label h(u).Then a label for some v ∈ S(T ) is calculated from the labels of C(v), and C(v) is removed.The set of labels on L(T ) is the function h .The calculation is performed in such a way that a simple equation relates µ(T, h) and µ(T , h ).We now replace (T, h) by (T , h ) and repeat the process.Iterations cease when S(T ) = ∅, at which time all vertices of T − w are labelled.
For u ∈ V (T ) − {w}, let f (u) be the first coordinate of the label of u.A µ(T, h)-function is found from f by computing a value for f (w) and possibly changing some values of f on C(w), as dictated by Step 2 of the algorithm.
We now return to the formal description.The following two theorems show that the algorithm (given in Section 3) for the calculation of µ(T, h) and the construction of a µ(T, h)-function, is correct.
Case 1 x = M .Suppose that f (v) (= f (v)) < x and choose j so that M = y j − x j .Then This contradiction shows that f (v) ≥ x in this case.
Case 2 x = y −r.In this case y −r ≥ M .Therefore y > M and hence y = s−Σ.Suppose that This contradiction shows that f (v) ≥ x and so ( 7) is satisfied in both cases.
To establish (8), firstly assume that y = M .Then Secondly, let y = s − Σ and suppose, to the contrary, that f [v] < y.Then The above implies that f and T satisfy ( 7), ( 8) and ( 9).Hence The result now follows from ( 10) and ( 11).
Let S be a star with centre w, let L(S) = {u 1 , . . ., u k } where k ≥ 2, let h(u i ) = (x i , y i ) for i = 1, . . ., k, and let M , Σ be defined as above.
Proof: If M + Σ ≥ s, then it is easily seen that the function f defined by then a µ(S, h)-function g is found as follows.Set g(w) = M and choose g(u 1 ), . . ., g(u k ) so that It remains to establish that choices are available to satisfy (12).Let g(u i ) = x i + α i for i = 1, . . ., k.Then (12) requires that To satisfy (13) we require that i.e. s ≤ M + kr.But this last inequality is true, because k ≥ 2 and s ≤ 2r.
Algorithm TREEDOM r, s Input: r, s, T (order n ≥ 3), root w / ∈ L(T ), h Step 0 (initialize) µ ← 0 Step 1 (successively label vertices of V − L(T ) − {w}) (At this stage w is the only unlabelled vertex, T is a star with centre w, C(w) = {u 1 , . . ., u k }.) Step 2 We have omitted the obvious details of (14).The algorithm may be implemented in O(n 2 ) time and it is likely that suitable data structures and possible refinements could provide a linear algorithm.We leave this question for future consideration.

Examples
We conclude with two examples in which the algorithm is used to find γ 3, 5 for two small trees.
Example 1 Let T = T 0 be the tree (rooted at w) depicted in Figure 1 then increase the x(u i )s as necessary so that each x(u i ) ≤ r and Σ + M = s.(14) µ ← µ + Σ + M Output: function x and µ Stop.

Example 2
(a).Initially each leaf u is labelled with h * (u) =(2,5).The edges of the subtrees T 1 , T 2 and T 3 produced by the successive iterations of Step 1 are depicted by means of black lines, with deleted vertices and edges in grey, in Figure1(b), (c) and (d).For each i = 0, 1, 2, the vertex v i will receive the next label and C(v i ) will be deleted.The computed label for v i is shown in T i+1 .In Step 2 x(w) is set to 3.This value together with the first coordinates of the labels of V (T ) − {w} forms the 3-function with weight γ 3, 5; T depicted in Figure1(e).Let T be the path P 7 rooted at the central vertex w.When the algorithm is used as in Example 1, the labels at the termination of Step 1 are depicted in Figure2(a) and Step 2 sets x(w) to 2. In this case the first coordinates of the labels and x(w) do not 3-dominate w and Step 2 increases the first coordinates of C(w) accordingly.A solution is given in Figure2(b).