Tehnical Report CS0483 - 1987 - Computer Science Department

Report 2 Downloads 113 Views
Technion - Computer Science Department - Tehnical Report CS0483 - 1987

...

,

,-

I

TECHNION - Israel Institute of technology Computer Science Department

THE DIOPHANTINE PROBLEM OF FROBENIUS: A CLOSE BOUND

by H. Xral.\fczyk and A. Paz Te~hnical

Report

8483

December 1987



Technion - Computer Science Department - Tehnical Report CS0483 - 1987

The Diophantine Problem of Frob~nius: A Close Bound

I





Hugo Krawczyk AzariaPaz Computer Science Dept. Technion Haif,a, -Israel

ABSTRACT The conductor of n positive integer numbers a l,a2, ... ,an' whose greatest coII1mon divisor is equal'to I, is'defmed as the th.e minimal K, such that for every m ~K , the equation a 1 x 1 + a 2X 2 + ... + an Xn = m, h!ls a solution over the nOI}negative integers. In this note- we give a polYIlomial aigorithm computing'a close bound ~ for the conductor K o( n given positive integers, when n is fixed. The bound B satisfies BIn SK SB .

-2-

.• Technion - Computer Science Department - Tehnical Report CS0483 - 1987

INTRODUCTION

I

Definition: The conductor of n positive integer numbers a 1,a2' ... ,an' whose greatest common divisor is equal to 1, is the minimal K, such that for every m ~K, the equation alxl +a2x2+' .. +an xn,=m has a solution over the nonnegative integers. We denote this minimum by K = K (a 1,a 2' ... ,an)' The Diophantine Problem of Frobenius is to detennine the conductor of n given positive integers {Fro~ra]. In this paper we present an algQrithm f~r the computation of a close bound B for the conductor K. This bound has the prpperty that BIn SK ~B . For fIXed n, the time complexity of the algorithm is bounQed by polynomial in .the length of the input integers

a

al,a2' ... ,an'

Up to the present no polynomial algorithm for the computation of the conductor for n > 3 has been found, not even 'for the case where the number n of integers is not part of the input. For the case of n =2, a very simple solution due to Sylvester is known [Syl]. While no such solution is known for n = 3, it is easy to show that a polynomial algorithm can be derived from the work of Brauer and Shockley [BS] combined with Lenstra's polynomial algorithm for solving integer linear programs with a fixed number of variables [Len]. We are not aware of any polynomial algorithm existing or implied in the literature for the n ~4 case. A non-polynomial algorithm for the computation of the conductor can be found in [Nij] ' b ; Several authors have tried ·tp find a good upper bound for the conductor (see [Sel,Sch] for an extensive bibliog,r~pp.y). Many such bounds have been found but all those bounds are of the order of:~gnitude of ,the square of the minimal aj or higher. The bound we give in this note is, as far as we kno~, the first bound which is, for fIXed n, of the same order of magnitude as fhe conductor and computable in polynomial time. THE MAIN RESULT Let us denote by aj ,IS i S n, the minimal integer a such that there exists a solution over the nonnegative integers to the equation (*) Denote

Theorem 1: Let K be the conductor of n positive integers a 1,a2' ... ,an' whose greatest common divisor is equal to 1, and let B be defined as above then -l



t~r~ '$0. \

!i. ~K ~B n

Proof: First we prove the lower I?ound. We must show that B Sn K. We do this by showin~ for every i ,1 S i ~ n, that (aj -1 )aj ~ K. If this is not true, then it follows from the defJ.nition of K that 'the equation alxl+a2x2+" '+an x n =(aj-l)aj-l, has a

- 3-

.• .

.~~!~t~~·~

Technion - Computer Science Department - Tehnical Report CS0483 - 1987

solution over the nonnegative iriteger~>, implying that the equation

I



,



al x l+ .,. +ai-lxi.:.l+ai+lxi+l+···+anXn=(ai-l-xi)ai-1

has such a solution, contradicting the minimality of ai . To prove the upper bound we shall shpw that f9r any m ~B, there exists a solution to the equation a 1 x 1+ a 2x 2 + ... + an Xn = m. We prove this by showing that if for any m > B a solution exists, then a solution-exists als~ for m';'1. Let ~1'~2' ... '~n' be a solution for such an m. As m > B , there exists some index i, 1 ~ i ~ n, such that ~i > ai -I. On the other l1and, by the definition of aj, there exist nonnegative integers a ,It ... ,a"i-Ita i+l' ... ,a,n suchthat , , , , 1 ala 1+ ... +a i-lai-l - aiai+a i+lai +1+ ... +a nan =-

Combining the two equations we get that

is a (nonnegative) solution for m-1. 0 Theorem 2: The bound B can be cq~.v~ted in polynomial time for every fixed value n. Proof: The equation (* ) can be solved for any value of a as a linear integer program, and therefore every ai can be found by binary-search of the minimal value of a for which a solution to (*) exists. Using Lenstra's polynomial algorithm for the Integer Linear Programming [Len], we can compute the boundB in polynomial-time when n is fixed. 0 Remark 1: In the proof of Theorem 1 we have shown that (ai-I)ai SK. Combining this with the well-known bound K ~(amin-I)(amllX-I) [Bra] (where amin,a max are the minimal and maximal elements, respectively, among a l,a 2, ... ,an)' we get that C1.i < a max' a bound that can be used for initialization in the above binary search for ai . Remark 2: The above -bound also induces a bound for the number of nonnegative integers m for which no sqlution exists to the equation a 1x 1+ a 2 x 2 + ... + an x n = m . This number, denoted by N was also investigated in the literature [NW] and it is easy to prove that K/2SN SK. Thus, our bound provides also a close bound,for N. Namely, B /2n SN S.B .

Technion - Computer Science Department - Tehnical Report CS0483 - 1987

REFERENCES

I

,

[Bra]

A. Brauer, j'On a Problem of Partitions", Amer. J. Math., Vol. 64, 1942, pp. 299-312.

[BS]

A. Brauer and J.E. Shockley; "pn a Problem of Frobenius", J. reine angew. Math., Vol. 211, 1962, pp. 215-~20.

[Fro]

G. Frobenius, "Uber Mani~n aus nicht negative Elementen", S.B Preuss. Akad. Wiss. Berlin, 19q, pp. 456-:4}7.

[Len]

H. W. Len~tra, "Integer Programming with a Fixed Number of Variables", Math. ofOper. Re~·., Vol. 8, 1983, pp. 538-548.

[Nij]

A. Nijenhuis, "A Minimal Path Algorithm fpr the Money Changing Problem", Amer. Math. Monthly, Vol. 86, 1979, pp. 832-·834.

[NW]

A. Nijenhuis and H.S. Wilf, "Representations of Iutegers by Linear Fonns in Nonnegative Intege~", J. NwnberTheory~-Vol. 4,1972, pp. 98-106.

[Sell

E. S. Selmer, "On th,e LiJ.1ear Diophantine Problem of Frobenius in Three Variables", J. reine angew. Math., VOl. 293-294, 1977, pp. 1-17.

[Sch]

A. Schrijver, Theory ofLinear and Integer Programming, Willey, Chichester, 1986.

[Syl]

1. 1. Sylvester, "Mathematical Questions .with their Solutions", Educational Times, Vol. 41, 1884, p. 21.