a short note on the weighted sub-partition mean of integers

3
Operations Research Letters 37 (2009) 356–358 Contents lists available at ScienceDirect Operations Research Letters journal homepage: www.elsevier.com/locate/orl A short note on the weighted sub-partition mean of integers Peter Szabó Technical University of Košice, Department of Aerodynamics and Simulations, Rampová 7, 040 21 Košice, Slovak Republic article info Article history: Received 12 September 2008 Accepted 15 April 2009 Available online 3 May 2009 Keywords: Partition of positive integers Weighted sub-partition mean Triangular Toeplitz matrix Eigenvalue abstract In this note we study weighted sub-partitions (i 1 ,..., i l ) of positive integers on a number n with the greatest sub-partition mean l k=1 w(i k )/l, where w :{1,..., n}→ R + is a weight function. We show that this problem is closely related with the problem of computing the eigenvalue of a Toeplitz matrix in a specific form. © 2009 Elsevier B.V. All rights reserved. 1. Introduction A partition is a way of writing an integer n as a sum of positive integers where the order of the addends is not significant. The number of all partitions is expressed by an asymptotic formula [see [1]] P (n) 1 4n 3 e π 2n/3 . The sequence (i 1 ,..., i l ) of positive integers is called a sub- partition on the integer n when l k=1 i k n and l > 1. It will be assumed that w :{1,..., n}→ R + is a weight function and R + is the set of nonnegative real numbers. By w i we denote the value w(i) for every i and assume that w = (w 1 ,...,w n ) T 6 = (0,..., 0) T . If (i 1 ,..., i l ) is a sub-partition on the integer n, then the value ( l j=1 w i j )/l is called a sub-partition mean. Let SP (n,w) denote the maximum of all sub-partition means associated to the weight function w :{1,..., n}→ R + . It is to be noted that if l = 1 (i.e. the number of addends in sub-partition is equal to 1) then SP (n,w) = max i=1,...,n w i . An estimate of the number of all sub-partitions on the integer n may be derived as SubP (n) = P (1) +···+ P (n). The number SubP (n) rises to infinity exponentially; hence trying all sub- partitions (i 1 ,..., i l ) for the calculation of SP (n,w) = max l X k=1 w i k /l ! is not efficient. E-mail address: [email protected]. 2. Representing weighted sub-partitions of integers For every weight function w = (w 1 ,...,w n ) T , a special matrix A w = (a ij ), a ij = w i-j for i > j, a ij = 0 for i j and a directed acyclic graph (DAG) G w = (V , E ) can be associated, where V = {1,..., n + 1} are vertices and E ={(i, j)|i > j; i, j = 1,..., n + 1} are edges of graph G w with weight function w G (i, j) =-w(i - j) for all (i, j) E . If (i, j) E then edge (i, j) is incident from vertex j. A w = 0 0 0 ... 0 w 1 0 0 0 w 2 w 1 0 . . . . . . . . . . . . 0 w n ... w 1 0 . The matrix A w is called the sub-partition matrix with respect to the weight function w. A path p =hv 0 ,...,v k i in graph G = (V , E ) is a sequence of vertices {v 0 ,...,v k } and edges (v i-1 ,v i ) E for i = 1,..., k without repetition of vertices. If v 0 = v k then p is a cycle. If G is a weighted graph the weight W (p) of a path or a cycle p in graph G is the sum of the weights of the traversed edges. Let G(s v) denote the set of all paths from the vertex s to the vertex v. The following theorem shows that a path in G w corresponds directly to a sub-partition of the integer n. Theorem 1. Let w :{1,..., n}→ R + be a weight function. The sequence (i 1 ,..., i l ) is a sub-partition of number n if and only if there exists a path p =h1, i 1 + 1, i 1 + i 2 + 1,..., i 1 +···+ i l + 1i in graph G w . Proof. Suppose that (i 1 ,..., i l ) is a sub-partition of n, namely i j > 0 for j = 1,..., l and l j=1 i j n. It follows at once that 0167-6377/$ – see front matter © 2009 Elsevier B.V. All rights reserved. doi:10.1016/j.orl.2009.04.003

Upload: peter-szabo

Post on 29-Jun-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Operations Research Letters 37 (2009) 356–358

Contents lists available at ScienceDirect

Operations Research Letters

journal homepage: www.elsevier.com/locate/orl

A short note on the weighted sub-partition mean of integersPeter SzabóTechnical University of Košice, Department of Aerodynamics and Simulations, Rampová 7, 040 21 Košice, Slovak Republic

a r t i c l e i n f o

Article history:Received 12 September 2008Accepted 15 April 2009Available online 3 May 2009

Keywords:Partition of positive integersWeighted sub-partition meanTriangular Toeplitz matrixEigenvalue

a b s t r a c t

In this note we study weighted sub-partitions (i1, . . . , il) of positive integers on a number n with thegreatest sub-partition mean

∑lk=1 w(ik)/l, where w : {1, . . . , n} → R+ is a weight function. We show

that this problem is closely related with the problem of computing the eigenvalue of a Toeplitz matrix ina specific form.

© 2009 Elsevier B.V. All rights reserved.

1. Introduction

A partition is a way of writing an integer n as a sum of positiveintegers where the order of the addends is not significant. Thenumber of all partitions is expressed by an asymptotic formula[see [1]]

P(n) ≈1

4n√3eπ√2n/3.

The sequence (i1, . . . , il) of positive integers is called a sub-partition on the integer n when

∑lk=1 ik ≤ n and l > 1. It will

be assumed that w : {1, . . . , n} → R+ is a weight function andR+ is the set of nonnegative real numbers. By wi we denote thevalue w(i) for every i and assume that w = (w1, . . . , wn)

T6=

(0, . . . , 0)T. If (i1, . . . , il) is a sub-partition on the integer n, thenthe value (

∑lj=1wij)/l is called a sub-partition mean. Let SP(n, w)

denote the maximum of all sub-partition means associated to theweight function w : {1, . . . , n} → R+. It is to be noted that ifl = 1 (i.e. the number of addends in sub-partition is equal to 1)then SP(n, w) = maxi=1,...,nwi.An estimate of the number of all sub-partitions on the integer

n may be derived as SubP(n) = P(1) + · · · + P(n). The numberSubP(n) rises to infinity exponentially; hence trying all sub-partitions (i1, . . . , il) for the calculation of

SP(n, w) = max

(l∑k=1

wik/l

)is not efficient.

E-mail address: [email protected].

0167-6377/$ – see front matter© 2009 Elsevier B.V. All rights reserved.doi:10.1016/j.orl.2009.04.003

2. Representing weighted sub-partitions of integers

For every weight functionw = (w1, . . . , wn)T, a special matrixAw = (aij), aij = wi−j for i > j, aij = 0 for i ≤ j and a directedacyclic graph (DAG) Gw = (V , E) can be associated, where V ={1, . . . , n+1} are vertices and E = {(i, j)|i > j; i, j = 1, . . . , n+1}are edges of graph Gw with weight function wG(i, j) = −w(i − j)for all (i, j) ∈ E. If (i, j) ∈ E then edge (i, j) is incident from vertex j.

Aw =

0 0 0 . . . 0w1 0 0 0

w2 w1 0...

.... . .

. . . 0wn . . . w1 0

.Thematrix Aw is called the sub-partitionmatrixwith respect to theweight functionw.A path p = 〈v0, . . . , vk〉 in graph G = (V , E) is a sequence

of vertices {v0, . . . , vk} and edges (vi−1, vi) ∈ E for i = 1, . . . , kwithout repetition of vertices. If v0 = vk then p is a cycle. If G isa weighted graph the weightW (p) of a path or a cycle p in graphG is the sum of the weights of the traversed edges. Let G(s → v)denote the set of all paths from the vertex s to the vertex v.The following theorem shows that a path in Gw corresponds

directly to a sub-partition of the integer n.

Theorem 1. Let w : {1, . . . , n} → R+ be a weight function. Thesequence (i1, . . . , il) is a sub-partition of number n if and only if thereexists a path p = 〈1, i1 + 1, i1 + i2 + 1, . . . , i1 + · · · + il + 1〉 ingraph Gw .

Proof. Suppose that (i1, . . . , il) is a sub-partition of n, namelyij > 0 for j = 1, . . . , l and

∑lj=1 ij ≤ n. It follows at once that

P. Szabó / Operations Research Letters 37 (2009) 356–358 357

1 2 3 4 5-w1

-w2

-w3-w3

-w4

-w2 -w2

-w1 -w1 -w1

Fig. 1. Graph Gw .

((ij+ij−1+· · ·+i1+1), (ij−1+· · ·+i1+1)) is an edge of graphGw forevery j = 1, 2, . . . , l (for convenience, it is assumed that i0 = 0).These edges and the vertices 1, i1+1, i1+i2+1, . . . , i1+· · ·+il+1form a path p in graph Gw .Provided that p = 〈1, i1 + 1, i1 + i2 + 1, . . . , i1 + · · · + il + 1〉

is a path in graph Gw , it follows that ij > 0 for j = 1, . . . , l and∑lj=1 ij+1 ≤ n+1, namely (i1, . . . , il) is a sub-partition of number

n. �

The path p in the graph Gw is given by the sub-partition(i1, . . . , il) if p = 〈1, i1+ 1, i1+ i2+ 1, . . . , i1+· · ·+ il+ 1〉. If p isgiven by the sub-partition (i1, . . . , il) then the length of the path p(denoted by |p|) equals l. The next claim follows from Theorem 1.

Theorem 2. Let w : {1, . . . , n} → R+ be a weight function. If thepath p in the graph Gw is given by the sub-partition (i1, . . . , il) thenthe weight of the path p equals W (p) = −

∑lj=1wij and the sub-

partition mean of (i1, . . . , il) equals−W (p)l .

Proof. If (i1, . . . , il) is the corresponding sub-partition to the pathp then ((ij+ ij−1+ · · · + i1+ 1), (ij−1+ · · · + i1+ 1)) are edges ofGw with weights −wij for every j = 1, 2, . . . , l, namely W (p) =−∑lj=1wij . Therefore the sub-partition mean of (i1, . . . , il) is

equal to (∑lj=1wij)/l = −

W (p)l . �

Let SP(n, w) denote the maximum of all sub-partition meansassociated to the weight functionw : {1, . . . , n} → R+.

Theorem 3. Let w : {1, . . . , n} → R+ be a weight function and letGw = (V , E) be the associated graph to the functionw. Then

SP(n, w) = maxp∈Gw(1→j)

j∈V

−W (p)|p|= − min

p∈Gw(1→j)j∈V

W (p)|p|

. (1)

Proof. For each sub-partition (i1, . . . , il) we can associate a pathp from graph Gw with sub-partition mean −

W (p)l . According to

Theorem 1 path p contains the vertex 1. Therefore, it is sufficientto consider only 1→ j paths in Gw to calculate the value SP(n, w).

Fig. 1 shows a graph Gw , where w = (w1, w2, w3, w4), n = 4.The path p = 〈1, 2, 3, 5〉 in Gw corresponds to a sub-partition(1, 1, 2) of number 4 and vice versa. The weight of path p equalsW (p) = −w1 − w1 − w2.

3. Calculation of optimal mean path weights

Let w : {1, . . . , n} → R+ be a weight function. The graphGw = (V , E) is a directed acyclic graph (DAG) with negativeweight-edges. V = {1, 2, . . . , n + 1}, and 1 � 2 � · · · � n + 1is the topological sort of vertices. Generally, an acyclic graph istopologically sorted if there is a path from vertex u to vertex v;then u precedes v (u � v) in topological sort.

An algorithm, based on the depth-first search can be appliedto the calculation of optimal mean path weights as in formula (1);see [2]. It is not true in general that if the mean path weight from 1to j is optimal then the mean path weight of its subpath is optimal.Therefore the best paths in our case shall be stored not in thepredecessor graph as in the classical shortest paths algorithm, butas sequences of nodes.

4. Max-algebra and sub-partition mean of integers

The calculation of 1→ j paths was derived using an algorithmfor the calculation of eigenvalue and eigenvector of a triangularToeplitz matrix in max-algebra. Generally, the class of n × ntriangular Toeplitz matrices is defined by

Tn(t, α) =

t0 α α . . . αt1 t0 α α

t2 t1 t0. . .

......

. . .. . . α

tn . . . t1 t0

where α ∈ Rmax = R∪ {−∞} and t = (t0, t1, . . . , tn)T, ti ∈ Rmaxfor i = 0, . . . , n. Let w : {1, . . . , n} → R+ be a weight functionandwe let t0 = 0,α = 0 and ti = wi for i = 1, . . . , n. Theweightedsub-partition matrix A = (aij) ∈ Tn(t, 0) is a triangular Toeplitzmatrix, where aij = wi−j for i > j and aij = 0 for i ≤ j.The eigenvalue λ(B) ∈ R and eigenvector x = (x1, . . . , xn)T 6=

(−∞, . . . ,−∞)T of a matrix B = (bij) are defined as a solution ofequationsmax{bi1 + x1, bi2 + x2, . . . , bin + xn} = λ(B)+ xifor i = 1, . . . , n, where bij ∈ R ∪ {−∞} for i, j = 1, . . . , n.Max-algebra requires some conventions for doing arithmetic

with infinities, for any real number a: a + (−∞) = (−∞) +a = −∞. The value −∞ denotes something that is unreachable.A summary of concepts, methods, applications and combinatorialcharacter of max-algebra can be found in [3]. For detailedinformation, refer to [4,5].Nowwe need to define the concept of the cycle mean. The cycle

mean of cycle c = 〈c1, . . . , ck, c1〉 is defined as W (c)k . A basic resultsays that the maximum of these is equal to the eigenvalue λ(B);see [4]. This eigenvalue is unique if thematrix is irreducible, i.e., theassociated digraph is strongly connected.Suppose that A = (aij) ∈ Tn(tw, 0) and tw = (0, w1, . . . , wn)T.

We consider the graph G′w = G′ = (V , E ′), E ′ = {(i, j)|i, j =1, . . . , n + 1} with the weight function wG′(i, j) = aij = w(i − j)for i > j and wG′(i, j) = aij = 0 for i ≤ j. The matrix A =(aij) ∈ Tn(tw, 0) defined as above is irreducible as its digraph G′w iscomplete. More information about the eigenproblem can be foundin [3,6]. An eigenproblem of Toeplitz matrices in another specificform has been studied in [7].

Theorem 4. Let w : {1, . . . , n} → R+ be a weight function. IfA = (aij) ∈ Tn(tw, 0) and tw = (0, w1, . . . , wn)T then

λ(A) = maxp∈Gw(1→j)

j∈V

−W (p)|p| + 1

. (2)

Proof. Weshow thatwe can assign to each cycle c fromG′w = G′ an

1→ j path from Gw = G and the edge (j, n) ∈ E ′ which altogetherform a cycle c ′ whose cycle mean is greater than or equal to thecycle mean of c .Indeed, we can decompose c into k subpaths where the indices

are increasing and k subpaths where they are decreasing. In thesubpaths with increasing indices the weights of edges are all zero.Further each path with decreasing indices can be completed byan edge with zero weight (with increasing indices), to form acycle. Among these k cycles we find a cycle c ′ with the greatest

358 P. Szabó / Operations Research Letters 37 (2009) 356–358

cycle mean. This cycle mean is greater than or equal to the cyclemean of the initial cycle c , as the maximum is always greater thanor equal to the arithmetic mean. Now it remains to note that themaximum over the cyclemeans of such cycles c ′ is exactly (2). �

Theorem 4 means that the problem of computing the greatestcyclemean of a Toeplitzmatrix (in a specific form) is closely relatedwith the problem of computing the greatest sub-partition mean,and both can be solved by the same algorithm.

Acknowledgements

The author wishes to thank all those involved in this researchfor their help and support.

References

[1] G.H. Hardy, S. Ramanujan, Asymptotic Formulae in Combinatory Analysis,in: Proc. London Math. Soc., vol. 17, 1918, pp. 75–115.

[2] T.H. Cormen, Ch.E. Leiserson, R.L. Rivest, Introduction to Algorithms, twenty-fifth printing, McGraw-Hill Book Company, 2000.

[3] P. Butkovič, Max-algebra: The linear algebra of combinatorics? Linear Algebraand its Applications 367 (2003) 313–335.

[4] R.A. Cuninghame-Green, Minimax Algebra, in: Lecture Notes in Econ. andMath.Systems, vol. 166, Springer-Verlag, Berlin, 1979.

[5] B. Heidergott, G.J. Olsder, J. van der Woude, Max Plus at Work. Modeling andAnalysis of Synchronized Systems, Princeton University Press, 2004.

[6] P. Butkovič, J. Plavka, On the dependence of the maximum cycle meanof a matrix on permutations of the rows and columns, Discrete AppliedMathematics 23 (1989) 45–53.

[7] J. Plavka, Eigenproblem for monotone and Toeplitz matrices in a Max-algebra,Optimization 53 (2004) 95–101.