Page 1

WEIGHTED MULTI-CONNECTED

LOOP NETWORKS

¨OYSTEIN J. R¨ODSETH

University of Bergen, Department of Mathematics,

All´ egt. 55, N-5007 Bergen, Norway

Abstract

Given relatively prime integers N,a1,...,ak, a multi-connected

loop network is defined as the directed graph with vertex set Z/NZ =

{0,1,...,N −1}, and directed edges i → r ≡ i+aj (mod N). If each

edge i → i+ajis given a positive real weight wjfor j = 1,...,k , then

we have a weighted multi-connected loop network. The weight of a

path is the sum of weights on its edges. The distance from a vertex to

another is the minimum weight of all paths from the first vertex to the

second. The diameter of the network is the maximum distance, and

the average diameter is the average distance in the network. In this

paper we study the diameter and the average diameter of a weighted

multi-connected loop network. We give a unified and generalized pre-

sentation of several results in the literature, and also some new results

are obtained.

1 Introduction

Let N ≥ 1,a1,...,ak be integers and w1,...,wkpositive real numbers. A

multi-connected loop network is defined as the directed graph with vertex set

Z/NZ = {0,1,...,N − 1} and directed edges i → r ≡ i + aj (mod N). We

assume that the network is strongly connected, which is equivalent to the

assertion

gcd(N,a1,...,ak) = 1. (1)

For each j, we give each of the edges i → i + aj (mod N) the weight wj.

The resulting network is called a weighted multi-connected loop network.

The weight of a directed path is the sum of weights on its edges. The

distance d(i,j) from a vertex i to a vertex j is the minimum weight of all

paths from i to j. The diameter D = DN(a1,...,ak;w1,...,wk) is given as

D = maxd(i,j), and the average diameter A = AN(a1,...,ak;w1,...,wk) is

1

Page 2

the average of all the distances d(i,j) in the network. Since the network is

vertex symmetric, we have

D = max

0≤j<Nd(0,j),A =1

N

N−1

?

j=0

d(0,j). (2)

For many applications it is a natural requirement of a network that the

diameter is small. Often it is, however, more important that the average

diameter is small. Of course, a network is particularly nice if it satisfies both

these requirements.

In the literature on loop networks partial answers to two problems are

given. We will designate these two problems as the local problem and the

global problem. The local problem consists in designing an algorithm pro-

ducing D and/or A, given the input N,a1,...,ak;w1,...,wk. The global

problem is, given N and w1,...,wk, to find a sequence a1,...,akwhich min-

imizes D and/or A.

Suppose that all the ai are positive, and put wi = ai, i = 1,...,k.

By Lemma 3 of Brauer and Shockley [1], we then have that D − N is the

“Frobenius number” of the sequence N,a1,...,ak, which is the largest integer

which cannot be represented by the linear form Nx0+ a1x1+ ··· + akxkin

non-negative integers xi. By the theorem of Selmer [15], we also have in this

case that A−(N −1)/2 is the number of non-negative integers which cannot

be represented in this way. For results on the corresponding local problem,

see [5], [11], [12], [16]. In [14] we gave some results on the corresponding

global problem. Also an upper bound problem has been studied in this case,

see [3], [4], [13].

Next, for arbitrary integers ai, put all the wi = 1. Then we are back

to the problems studied by Wong and Coppersmith [19], which arouse from

Stone’s description [18] of a “particular organization of a multimodule mem-

ory, designed to facilitate parallell block transfer in the high-speed memory

of a computer system”.

For k = 2 and arbitrary weights, a solution to the local problem is given

by Cheng and Hwang [2]. This solution is a rather simple lifting to general

weights w1, w2of (a variant of) the algorithm of Greenberg [5] for the case

w1 = a1, w2 = a2(the Frobenius case). As Cheng and Hwang remark, a

corresponding lifting can easily be done with our results [11]. We shall do

this at the beginning of Section 3. This we do because it gives us a good

starting point for the study of the global problem for k = 2. However, a

coarse worst case analysis indicates that Cheng and Hwang’s algorithm is

much faster than the one given in Section 3. For the local problem for k = 2,

we therefore recommend the use of Cheng and Hwang’s algorithm.

Wong and Coppersmith [19] showed that

√3N − 2,

DN(1,s;1,1) ≥

AN(1,s;1,1) ≥5

9

√3N − 1. (3)

2

Page 3

On the other hand, Hwang and Xu [6] constructed an s (dependent on N)

satisfying

√3N + 2(3N)1/4+ 5, N ≥ 6348.

However, they did not consider AN(1,s;1,1).

In Section 2 of this paper we give some reduction formulas for A and D, in

Section 3 we give the results corresponding to (3) for DN(a1,a2;w1,w2) and

AN(a1,a2;w1,w2), in Section 4 we use a simplified version of Hwang and Xu’s

construction [6] to give an s such that a1= 1, a2= s is close to minimizing

DN(a1,a2;1,1) and AN(a1,a2;1,1) simultaneously, and in Section 5 we give

some general bounds for D and A.

DN(1,s;1,1) <(4)

2 Reduction formulas

We now put tj= tj(N;a1,...,ak;w1,...,wk) = d(0,j). Then

tj= min{

k

?

i=1

wixi|

k

?

i=1

aixi≡ j (mod N)}, (5)

where all the xiare non-negative integers, and the formulas (2) become

D = max

0≤j<Ntj,A =1

N

N−1

?

j=0

tj.(6)

Clearly, we have

DN(a1,...,ak;w1,...,wk) = w1DN(a1,...,ak;1,w2

w1,...,wk

w1,...,wk

w1),(7)

AN(a1,...,ak;w1,...,wk) = w1AN(a1,...,ak;1,w2

w1). (8)

Suppose that c is an integer prime to N, and let b be the multiplicative

inverse of c mod N. Then

tbj(N;a1,...,ak;w1,...,wk) = tj(N;a1c,...,akc;w1,...,wk). (9)

As j runs through a complete residue system mod N, so does bj. Hence, by

(6),

DN(a1,...,ak;w1,...,wk) = DN(a1c,...,akc;w1,...,wk),(10)

AN(a1,...,ak;w1,...,wk) = AN(a1c,...,akc;w1,...,wk). (11)

In particular, if 1 ≤ d|ai, i = 1,2,...,k, by (1), we then have gcd(d,N) =

1, and by (10) and (11),

DN(a1,...,ak;w1,...,wk) = DN(a1

d,...,ak

d;w1,...,wk),

3

Page 4

AN(a1,...,ak;w1,...,wk) = AN(a1

d,...,ak

d;w1,...,wk).

Next, suppose that 1 ≤ d | N and d | ai for i = 1,2,...,k − 1. By

(1), we then have gcd(d,ak) = 1. Putting j = dq + akr, 0 ≤ r < d, and

xk= dy + z, 0 ≤ z < d,we now have, by (5),

tdq+akr(N;a1,...,ak;w1,...,wk) = min{

k−1

?

i=1

wixi+ wkdy + wkz },

where the minimum is taken over all sequences of non-negative integers

x1,...,xk−1,y,z satisfying

k−1

?

i=1

ai

dxi+ aky ≡ q (modN

d) ∧ z = r.

Thus we have

tdq+akr(N;a1,...,ak;w1,...,wk)

= tq(N

d;a1

d,...,ak−1

d

,ak;w1,...,wk−1,dwk) + wkr,

and it follows by (6) that

DN(a1,...,ak;w1,...,wk)

= DN/d(a1

d,...,ak−1

d

,ak;w1,...,wk−1,dwk) + wk(d − 1),(12)

AN(a1,...,ak;w1,...,wk)

= AN/d(a1

d,...,ak−1

d

,ak;w1,...,wk−1,dwk) +1

2wk(d − 1).

For k = 2, the formula (12) is given by Cheng and Hwang [2] in their Theorem

2.1(iii).

Now, let αN(1,s) denote the sequence u0,u1,..., where

ui= #{j | tj= i, 0 ≤ j < N},

Hwang and Xu [6] call s and s′equivalent skip distances if αN(1,s) =

αN(1,s′). A rather complicated deduction lead them to their Theorem 7,

which states that s and N + 1 − s are equivalent skip distances. An imme-

diate consequence of this result is that

tj= tj(N;1,s;1,1).

DN(1,s;1,1) = DN(1,N + 1 − s;1,1),

and, as remarked by Hwang and Xu, this shows that “one needs at most

compute diameters for half of the skip distances to find the optimal one”.

4

Page 5

We now generalize the notion of equivalent skip distances to “equivalent

skip sets”, and prove Theorem 1 below, which shows us how to generate

classes of equivalent skip sets.

So, let α = αN(a1,...,ak) denote the sequence u0,u1,..., where

ui= #{j | tj= i, 0 ≤ j < N},

and where tj= tj(N;a1,...,ak;1,...,1). Then we have

DN(a1,...,ak;1,...,1) = max{i | ui?= 0},

AN(a1,...,ak;1,...,1) =1

(13)

N

?

i≥0

iui. (14)

We shall say that two sets of integers {a1,...,ak} and {a′

equivalent skip sets, if (1) and the corresponding condition for a′

and

αN(a1,...,ak) = αN(a′

1,...,a′

iare satisfied,

k} are

1,...,a′

k).

Clearly, by (13) and (14), equivalent skip sets have the same diameter, and

also the same average diameter.

The sequence α only depends on the residues of aimod N. We therefore

consider the ai as elements of Z/NZ. Then α is uniquely determined by

the subset B = {0 = a0,a1,...,ak} of Z/NZ, where we have introduced an

artificial element a0= 0. For c ∈ Z/NZ, we put

c + B = {c + b | b ∈ B},

Theorem 1 The sequence α is (defined and) invariant under the following

two types of transformations

c ∗ B = {cb | b ∈ B}.

B −→ c ∗ B, for gcd(c,N) = 1,

B −→ −ai+ B, for i = 1,2,...,k.

(15)

(16)

Proof. Let b be the multiplicative inverse of c mod N. Then the invariance

of α under (15) is an immediate consequence of (9) and the definition of α.

For ∅ ?= C ⊆ Z/NZ and a nonnegative integer h, let hC denote the set of

sums of h elements of C, repetitions being allowed. Also, write |C| = #C.

By (5), we then have that tj(N;a1,...,ak;1,...,1) is the smallest h ≥ 0 for

which there exists an element n ∈ hB such that n ≡ j (mod N). We thus

have u0= 1, and

uh= |hB \ (h − 1)B| = |hB| − |(h − 1)B|,

Clearly, |h(−ai+ B)| = | − hai+ hB| = |hB| for all h ≥ 0, so that

|hB| − |(h − 1)B| = |h(−ai+ B)| − |(h − 1)(−ai+ B)|,

h ≥ 1.

h ≥ 1.

5