Disjoint subsets of integers having a constant sum

Disjoint subsets of integers having a constant sum

Discrete Mathematics North-Holland 82 (1990) 7-11 DISJOINT SUBSETS CONSTANT SUM OF INTEGERS HAVING A Kiyoshi AND0 Nippon Ika University, Nakaha...

262KB Sizes 0 Downloads 48 Views

Discrete Mathematics North-Holland

82 (1990) 7-11

DISJOINT SUBSETS CONSTANT SUM

OF INTEGERS

HAVING

A

Kiyoshi AND0 Nippon Ika University,

Nakahara,

Kawasaki

211, Japan

Severino GERVACIO MSU-Iligan

Institute of Technology,

Tibanga, Iligan City, Philippines

Mikio KANO Akashi

Technological

College,

Uozumi,

Akashi

674, Japan

Received 29 January 1987 Revised 17 May 1988 We prove that for positive integers n,m and k, the set (1, 2, . , n} of integers disjoint subsets having a constant sum m if and only if 2k - 1 G m c n(n + 1)/(2k).

contains

k

1. Introduction

Suppose that a set (1, 2, . . . , n} of integers contains k disjoint subsets Al, Aa, . . . , Ak such that the sum of all elements of each Ai is equal to m. Then km=i

z i=l

n(n + 1)

xS1+2+***+n=

2

XEA,

.

Hence m c r,(n + 1)/(2k). Let x1
n(n + 1) 2k

(1)

.

For example, let n = 11, m = 16 and k = 4. Then {1,2, . . . , ll} contains four disjoint subsets AI = (1, 4, ll}, AZ = (6, lo}, A3 = (7, 9}, A4 = (3, 5, S} with sum 16. Note that if m = n(n + 1)/(2k), then the disjoint subsets AI, A*, . . . , A, give a partition of (1, 2, . . . , n}. 0012-365X/90/$3.50

0

1990, Elsevier

Science

Publishers

B.V. (North-Holland)

8

K. Ando

Next

assume

et al.

that a set (1, 2, . . . , n} of integers has a partition A, UA2 U each A, contains n/k elements and the sum of all elements of

. . . U Ak such that

each Ai is equal to n(n + 1)/(2k). Then we easily observe that both n and n(n + 1)/2 are divisible by k, and n/k 3 2. The next result shows that this necessary condition is sufficient for the existence of such a partition. Theorem 2. Let n and k be positive integers such that n is divisible by k. Then the set (1, 2, . . . , n} of integers has a partition AI U A, U . . . U Ak such that each Ai contains nlk elements and the sum of all elements of each Ai is equal to n(n + 1)/(2k) if and only if n(n + 1)/2 is divisible by k, and n/k 22. Note that this result can be extended to an arbitrary arithmetic progression by only replacing each integer i by the ith term a - d + id. That is, an arithmetic A, UA2 U . . . U progression {a, a + d, a + 2d, . . . , a + (n - l)d} has a partition Ak such that each Ai contains n/k elements and has the constant sum n(2a + (n - l)d)/(2k) if and only if both n and n(n + 1)/2 are divisible by k, and n/k Z=2. We conclude

this section

by giving

a conjecture.

Conjecture. Let k, n, m be positive integers. Then the set { 1,3, . . . ,2n - l} of odd integers contains k disjoint subsets having a constant sum m if and only if one of the following two conditions holds: cn2/k, n2-mkZ2, andmZ4n-2ornf4k. (i) m is even, 4ksm or9k
paper.

2. Proofs of theorems For convenience, we use the following defined on a set X.

c (f(x>;x

E-v

notation

for an integer

valued

function

f

= c f(x). xex

We first prove the sufficiency was discussed in the preceding

of Theorem section.

1. Note

that necessity

in the theorem

Proof of Theorem 1. We prove the sufficiency by induction on n. We may assume is easy for n = 2, 3, 4, 5. Let k 2 2 since the theorem is true for k = 1. Verification 2k - 1 s n(n + 1)/(2k) implies 2k - 1 G n. If n 2 6. Observe that the condition

9

Subsets of integers with constant sum

m sn, then we can obtain the desired k disjoint subsets AI = {m}, A2 = where k-l
and

2k+lsn.

(2)

We consider four cases. Case 1. 2n < m. LetL,={n_2k+l,n}, L,={n-2k+2,n-l},...,L,={n-2k+k,nk+l}. Then C(x;xeL,)=2n-2k+l for all i, lsisk. Let m’=m-2n+ 2k - 1 and n’ = n - 2k. Then we show that m’ and n’ are positive integers which satisfy the following condition. 2k-lsm’ Since2k+lsn, follows that

G n’(n’ + 1)/(2k). 2Gkand2n=zm,

(3) wehaven’>O,

m’>Oand2k-lsm’.

It

m’k=mk-k(2n-2k+l)~n(n+l)/2-~$I(~(x;xpLI)) =1+2+**

*+n-((n’+l)+(n’+2)+...+n)

=1+2+**

*+n’=n’(n’+1)/2.

Hence m’ < n’(n’ + 1)/(2k). Consequently, (3) holds. By the induction hypothesis, the set (1, 2, . . . , n’} contains k disjoint subsets M,, M2, . . . , Mk with sum m’. ThenL,UM,, LzUM2,. . ., Lk U Mk are k disjoint subsets of (1, 2, . . . , n}, as required. Case 2. m<2n and 4ksn. Suppose m G 2n - 2. Then 2k - 16 m s (n - l)n/(2k) since m 6 2(n - 1) = 4k(n - 1)/(2k) sn(n - 1)/(2k). By the induction hypothesis, we can obtain k disjoint subsets with sum m from (1, 2, . . . , n - l}. Thus we may assume m=2n-1. Let n’=n-2 and k’=k-1. Then 2k’-l~m~n’(n’+1)/(2k’) since the former inequality follows from (l), and the latter follows from mk’=mk-mGn(n+1)/2-(n-l+n) =1+2+**

*+ n’ = n’(n’ + 1)/2.

Therefore, the set (1, 2, . . . , n - 2) contains k - 1 disjoint subsets Ak_-l with sum m. By adding a subset Ak = {n 1, n}, we have k A,, AZ,. . . , disjoint subsets of (1, 2, . . . , n} with sum m.

10

K. Ando et al.

Case 3. m < 2n, n < 4k and m is odd. Put f = (2n -m + 1)/2. Then t is a positive integer. Let Al = {m -n, n}, A,={m-n+l,n-l},..., A,={m-n+t-l,n-t+l}. Then AIUAZU . ..UA.={m-n,m-n+l,..., n} sincem-n+t=n--t+l. Ifkstweare done,soweassumetOby(2), and 2k’ - 1 G m by (1). The inequality m 6 n’(n’ + 1)/(2k’) follows from mk’=mk-mtcn(n+1)/2-~~(x;xEAj) i=l

=1+2+**

. + rz’ = n’(n’

+ 1)/2.

Therefore, 2k’ - 1 G m 6 n’(n’ + 1)/(2k’). By the induction hypothesis, n’} contains k -t disjoint subsets Bi, &, . . . , Bk+ with sum m. (172, f * * 3 Consequently, we have desired k is disjoint subsets AI, . . . , A,, B1, . . . , Bk+. Case 4. m < 2n, n < 4k and m is even. Put I = (2n - m)/2. Then t is a positive ,Al={m-n+t-1, {m-n+l,n-l},... A,UA2U..

integer. Let AI = {m -n, n-t+l}. Then

*UA,={m-n,m-n+l,.

n}, AZ=

. .,n}\{m/2},

since m-n+t=n-t=m/2. If kst we are done, so we assume t
s n’(n’ + 1)/(2k’).

Assume (4) holds. L1, L2, . . . , Lk, with

Let

(4)

Then (1, 2, . . . , n’} contains k’ disjoint subsets sum m’. Therefore, we obtain k disjoint subsets &UL,. . . > Lkv-2 U Lk,--l, Lks U {m/2} with sum m from

A,, . . . >A, LlULz, {1,2,. . .,n}. We now prove (4). The inequality 2k’ - 1~ m’ holds if and only if m G (8n - 8k + 6)/3. Since m
=1+2+-e

.+n’=n’(n+1)/2.

This completes the proof of the theorem. We next prove Theorem

0

2.

Proof of Theorem 2. We shall prove only the sufficiency because the necessity is shown in Section 1. Let r be any positive integer. Then a set {r + 1, r + into the desired k subsets 2 f . . * 7 r + 2k) of integers can be partitioned

Subsets of integers with constant sum

11

{r + 1, r + 2k}, {r + 2, r + 2k - l}, . . . , {r + k, r + k + l} with sum 2r + 2k + 1. Hence, if n is divisible by 2k, then the set (1, 2, . . . , n} can be partitioned into desired k disjoint subsets since (1, 2, . . . , n} can be partitioned into disjoint subsets (2ki + 1, 2ki + 2, . . . , 2ki + 2k}, 0 s i s (n/2k) - 1. Therefore we may assume that II is not divisible by 2k. Then k must be odd since n(n + 1)/2 is divisible by k. Put k = 2t + 1. We now show that a set (1, 2, . . . , 3k) = (192, * . . , 6t + 3) can be partitioned into k disjoint subsets having constant sum, and with three elements each. For every i, 1 c i s t, define A2i--1 = {i, 3t + 1 + i, 6t + 5 - 2i) Azi = {t + i + 1, 2t + 1 + i, 6t + 4 - 2i},

and set A zl+l = {t + 1, 4t + 2, 4t + 3).

Then A,, AZ, . . . , A,,,, give a desired partition of (1, 2, . . . , 3k). Since n/k 2 3, we can partition (1, 2, . . . , n} into (1, 2, . . . , 3k) and (3k + 2ki + 17 . . . , 3k + 2ki + 2k}, 0 s i s (n - 3k)l(2k) - 1. Each subset can be partitioned into k disjoint subsets with constant sum and of constant cardinality, and so we can conclude that the set { 1,2, . . . , n} can be partitioned into desired k disjoint subsets.

0