7
Operations Research Letters 30 (2002) 336 – 342 Operations Research Letters www.elsevier.com/locate/dsw Approximation algorithms for fractional knapsack problems Alain Billionnet CEDRIC-IIE, 18 All ee Jean Rostand, 91025 Evry Cedex, France Received 21 March 2000; received in revised form 12 April 2002; accepted 5 May 2002 Abstract We consider the combinatorial optimization problem where the objective function is the ratio of two linear functions. This type of problems can be solved by an algorithm that uses an auxiliary problem with a parametrized linear objective function. We propose for the original problem an approximation scheme based on the one hand upon an approximation scheme for the auxiliary problem and on the other hand upon a constant approximation algorithm for the original problem. As an example of the method we propose an O(n 2 ) time 1 2 -approximation algorithm for the fractional 0-1 knapsack problem (BFKP) which combined with a known approximation scheme for the 0-1 linear knapsack problem running in O(n 3 =) leads to a fully polynomial-time approximation scheme (FPTAS) for BFKP with time complexity O(n 3 =). In the same way we propose an FPTAS for the unbounded fractional knapsack problem with time complexity O(n 2 + n log(1=) + (1=) 3 ). c 2002 Elsevier Science B.V. All rights reserved. Keywords: Combinatorial fractional programming; Fractional knapsack problem; Approximation algorithm; Approximation scheme 1. Introduction The problem of maximizing or minimizing the ra- tio of two real valued functions over a subset D of R n is called a fractional (or hyperbolic) programming problem. In [16] an extensive study of this type of problems is provided which covers various applica- tions as well as major theoretical and algorithmic de- velopments. Of particular interest among fractional programming problems in practice are combinatorial fractional programming problems. A very complete survey on this subject is presented in [15]. We con- sider here the following combinatorial fractional pro- gramming problem: P: max{R(x)=(a 0 + ax)= (b 0 + bx): x D}; E-mail address: [email protected] (A. Billionnet). where a 0 ;b 0 R;a=(a 1 ;:::;a n ) R n , b=(b 1 ;:::;b n ) R n , x =(x 1 ;:::;x n ) R n and D is a nonempty nite subset of R n (n-dimensional real space). A notation such as ax represents the inner product of two vectors. Also the following assumptions are made: bx ¿ 0 for all x D; b 0 ¿ 0;a 0 ¿ 0 and R(x) ¿a 0 =b 0 for some x D. Two important contributions for solving P are due to Megiddo [11] and to Hashizume et al. [6]. Megiddo proved that if min{cx : x D} with c =(c 1 ;:::;c n ) R n is solvable within O(p(n)) com- parisons and O(q(n)) additions, then P is solvable in time O(p(n)(p(n)+ q(n))). In [6] the authors con- sidered the linear auxiliary problem Q() associated with P where is a scalar parameter: Q(): max{(a b)x : x D} and by extending the algorithm proposed by Megiddo for P, the authors prove that an approximation scheme for Q() gives an approximation scheme for problem 0167-6377/02/$ - see front matter c 2002 Elsevier Science B.V. All rights reserved. PII:S0167-6377(02)00157-8

Approximation algorithms for fractional knapsack problems

Embed Size (px)

Citation preview

Page 1: Approximation algorithms for fractional knapsack problems

Operations Research Letters 30 (2002) 336–342

OperationsResearchLetters

www.elsevier.com/locate/dsw

Approximation algorithms for fractional knapsack problemsAlain Billionnet

CEDRIC-IIE, 18 All�ee Jean Rostand, 91025 Evry Cedex, France

Received 21 March 2000; received in revised form 12 April 2002; accepted 5 May 2002

Abstract

We consider the combinatorial optimization problem where the objective function is the ratio of two linear functions. Thistype of problems can be solved by an algorithm that uses an auxiliary problem with a parametrized linear objective function.We propose for the original problem an approximation scheme based on the one hand upon an approximation scheme for theauxiliary problem and on the other hand upon a constant approximation algorithm for the original problem. As an exampleof the method we propose an O(n2) time 1

2 -approximation algorithm for the fractional 0-1 knapsack problem (BFKP) whichcombined with a known approximation scheme for the 0-1 linear knapsack problem running in O(n3=�) leads to a fullypolynomial-time approximation scheme (FPTAS) for BFKP with time complexity O(n3=�). In the same way we propose anFPTAS for the unbounded fractional knapsack problem with time complexity O(n2 + n log(1=�) + (1=�)3). c© 2002 ElsevierScience B.V. All rights reserved.

Keywords: Combinatorial fractional programming; Fractional knapsack problem; Approximation algorithm; Approximation scheme

1. Introduction

The problem of maximizing or minimizing the ra-tio of two real valued functions over a subset D ofRn is called a fractional (or hyperbolic) programmingproblem. In [16] an extensive study of this type ofproblems is provided which covers various applica-tions as well as major theoretical and algorithmic de-velopments. Of particular interest among fractionalprogramming problems in practice are combinatorialfractional programming problems. A very completesurvey on this subject is presented in [15]. We con-sider here the following combinatorial fractional pro-gramming problem:

P: max{R(x) = (a0 + ax)=(b0 + bx) : x∈D};

E-mail address: [email protected] (A. Billionnet).

where a0; b0 ∈R; a=(a1; : : : ; an)∈Rn, b=(b1; : : : ; bn)∈Rn, x=(x1; : : : ; xn)∈Rn and D is a nonempty ?nitesubset of Rn (n-dimensional real space). A notationsuch as ax represents the inner product of two vectors.Also the following assumptions are made: bx¿ 0 forall x∈D; b0 ¿ 0; a0¿ 0 and R(x)¿a0=b0 for somex∈D.Two important contributions for solving P are

due to Megiddo [11] and to Hashizume et al.[6]. Megiddo proved that if min{cx : x∈D} withc= (c1; : : : ; cn)∈Rn is solvable within O(p(n)) com-parisons and O(q(n)) additions, then P is solvable intime O(p(n)(p(n) + q(n))). In [6] the authors con-sidered the linear auxiliary problem Q(�) associatedwith P where � is a scalar parameter:

Q(�): max{(a− �b)x : x∈D}and by extending the algorithm proposed by Megiddofor P, the authors prove that an approximation schemefor Q(�) gives an approximation scheme for problem

0167-6377/02/$ - see front matter c© 2002 Elsevier Science B.V. All rights reserved.PII: S 0167 -6377(02)00157 -8

Page 2: Approximation algorithms for fractional knapsack problems

A. Billionnet / Operations Research Letters 30 (2002) 336–342 337

P with a time complexity bounded by the square ofthe computation time of the approximation scheme forthe auxiliary problem.We prove in this paper that an approximation

scheme A� for Q(�) combined with a �-approximationalgorithm C for P (� constant) give an approximationscheme ASP(�) for P with a time complexity

O

c(C) +

⌈log

�(1−�)�

⌉∑k=1

c(A�=2k+1)

;

where c(C) is the time complexity of algorithm Cand c(A�), the time complexity of the approximationscheme A� for a prescribed guarantee �.The authors of [6] present as an example of

their method a fully polynomial-time approximationscheme (FPTAS) for the fractional 0-1 knapsackproblem (BFKP) with a time complexity

O(

n4 log log Ec�

+ n5(log n+

log(1=�)�

));

where Ec = max{ai; bi : i∈{1; : : : ; n}}. This algorithmmakes use of an FPTAS in O(n4=�) time for the 0-1linear knapsack problem (BLKP). Our approach im-proves this result substantially since we obtain forBFKP an approximation scheme with a time com-plexity O(n3=�) for a prescribed precision � by usingan FPTAS in O(n3=�) time for BLKP together witha 1

2 -approximation algorithm for BFKP running inO(n2) time. In the same way we propose an FP-TAS for the unbounded fractional knapsack problem(UFKP) with a time complexity O(n2 + n log(1=�)+ (1=�)3).This paper is organized as follows: In Section 2 we

show how to derive a general approximation schemefor P from an approximation algorithm for P com-bined with an approximation scheme for Q(�). Sec-tion 3 concerns BFKP. We recall in this section knownresults on BLKP and on the parametric approach toBFKP. We show how to compute an optimal solutionof the continuous relaxation of BFKP and we proposea 1

2 -approximation algorithm for BFKP based on thisoptimal solution. In the same way Section 4 gives a12 -approximation algorithm for UFKP and Section 5presents FPTASs for BFKP and UFKP. Section 6 is aconclusion.

2. A general approximation scheme forcombinatorial fractional programming problems

Let A be an algorithm which, given an instanceI of an optimization problem � with positive ob-jective function c, returns a feasible solution xA(I).Let x∗(I) be an optimal solution of I . A is calledan �-approximation algorithm for � for some0¡�6 1 if and only if, for all instances I of�; c(x∗(I)) − c(xA(I))6 �c(x∗(I)). xA(I) is thencalled an �-approximate solution. We say that an al-gorithm is an approximation scheme for � if, whensupplied with an instance I of � and a guarantee �, itreturns an �-approximate solution.

Lemma 1 (Hashizume et al. [6]). Let �∗ be the opti-mal value of P; and x�

� an �-approximate solution ofQ(�);

(A) (a − �b)x�� ¿�b0 − a0 implies R(x�

�)¿� and�∗ ¿�.

(B) (a−�b)x�� ¡ (1−�)(�b0−a0) implies R(x�

�)¡�and �¿�∗.

(C) (1−�)(�b0−a0)6 (a−�b)x��6 �b0−a0 implies

x�� is an �-approximate solution of P and R(x�

�)is an �-approximate value of �∗.

Suppose that we know a �-approximation algorithm(0¡�¡ 1) C for P and an approximation schemeA� for Q(�). We show below how to construct anapproximation scheme ASP(�) for P by combining Cand A�. The general idea of the algorithm consistsin applying at step k algorithm A� with �= �=2k+1 toQ((�l + �u)=2) knowing that �∗, the optimal value ofP, is between �l and �u. ASP(�) is a kind of binarysearch in the following sense: at each iteration k, eitherwe reduce the current search interval by a factor oftwo, or we obtain a new search interval which is lessthan the initial one divided by 2k .

ALGORITHM ASP(�)begincompute ��, a �-approximate value of �∗

�0l ← ��; �0u ← ��=(1− �)kmax ← �log(�=((1− �)�)�

for k = 1 to k max do�← �=2k+1

�k → (�k−1l + �k−1

u )=2

Page 3: Approximation algorithms for fractional knapsack problems

338 A. Billionnet / Operations Research Letters 30 (2002) 336–342

Apply A� to Q(�k) and let xk be the obtainedapproximate solution(a) if (a − �kb)xk ¿�kb0 − a0 then �k

l ←�k ; �k

u ← �k−1u endif

(b) if (a − �kb)xk ¡ (1 − �)(�kb0 − a0) then�ku ← �k ; �k

l ← �k−1l endif

(c) if (1 − �)(�kb0 − a0)6 (a − �kb)xk 6 �k

b0−a0 then �kl←R(xk); �k

u←R(xk)=(1−�)endif

enddoend

Theorem 1. Let A� be an approximation scheme forQ(�) which operates in time bounded by c(A�) for aprescribed guarantee � and C a �-approximation al-gorithm for P with time complexity c(C). AlgorithmASP(�) is an approximation scheme for P with timecomplexity O(c(C) +

∑�log(�=((1−�)�)�k=1 c(A�=2k+1)) for

a prescribed guarantee �.

Proof. Prove recursively that �ku − �k

l 6 (�0u − �0l )=2k

for all k.

(a) �1u − �1l = �0u − (�0l + �0u)=2 = (�0u − �0l )=21.

(b) �1u − �1l = (�0l + �0u)=2− �0l = (�0u − �0l )=21.

(c) �1u−�1l =R(x1)=(1−�=4)−R(x1)=R(x1)( �4−�)6

�0u(�

4−�) =�0u−�0l4−� 6 (�0u − �0l )=2

1.

Now suppose that �k−1u − �k−1

l 6 (�0u − �0l )=2k−1 and

prove that �ku − �k

l 6 (�0u − �0l )=2k .

(a) �ku − �k

l = �k−1u − (�k−1

l + �k−1u )=2 = (�k−1

u −�k−1l )=26 (�0u − �0l )=2

k .(b) �k

u − �kl = (�k−1

l + �k−1u )=2 − �k−1

l = (�k−1u −

�k−1l )=26 (�0u − �0l )=2

k .(c) �k

u − �kl = R(xk)=(1 − �=2k+1) − R(xk) =

R(xk)( �2k+1−�)6 �0u(

�2k+1−�)

=�0u − �0l2k+1 − �

6 (�0u − �0l )=2k :

Because of Lemma 1, for all k ∈{1; : : : ; kmax} xk isa feasible solution of P such that �k

l 6R(xk)6 �ku and

�kl 6R(x∗)6 �k

u.Moreover �k

u − �kl 6 (�0u − �0l )=2

k . Then R(x∗) −R(xk)6 (�0u− �0l )=2

k and since R(x∗)¿ �0l , (R(x∗)−

R(xk))=R(x∗)6 (�0u−�0l )=(�0l2

k)=�=((1−�)2k) whichimplies, for k = kmax, R(x∗)− R(xkmax )6 �R(x∗).

The time complexity of Algorithm ASP(�) is obvi-ously O(c(C) +

∑kmaxk=1 c(A�=2k+1)) since there are kmax

iterations in the for loop and �� can be computed intime O(c(C)).

Remark. Hashizume et al. [6] propose an approxi-mation algorithm; FRAC(�); for problem P by extend-ing Megiddo’s idea [11]; assuming that an eIcient�-approximate algorithm; PARA(�; �); for Q(�) isavailable. Under appropriate assumptions they showthat FRAC(�) produces an approximate solution to Pthat has the same accuracy � as that of the PARA(�; �).Since their method hinges on Megiddo’s technique;the data must stay linear in the search parameter.They prove that; if PARA(�; �) requires O(p�(n))comparisons and O(q�(n)) additions; the number ofcomparisons and additions of FRAC(�) is equal toO(p�(n)(p�(n) + q�(n))). Our algorithm ASP(�);which essentially performs a binary search for the op-timal ratio; does not hinge on Megiddo’s technique.So; there is no requirement that the data stay linearin the search parameter and this algorithm can handlearbitrary multiplications and divisions in the solutionof the subproblems. On the other hand; ASP(�) givesa general scheme to transfer FPTASs from a linear toa fractional objective setting if a constant factor ap-proximation for the fractional programming problemis available.

3. A 12 -approximation algorithm for the fractional

0-1 knapsack problem (BFKP)

The 0-1 fractional knapsack problem (BFKP) asksfor a 0-1 solution maximizing a fractional objec-tive function under the constraint given by a linearinequality.

BFKP:max{R(x) = (a0+ax)=(b0+bx) : cx

6 d; x∈{0; 1}n};where a0; b0 ∈N , the set of positive integers,a = (a1; : : : ; an)∈Nn, b = (b1; : : : ; bn)∈Nn, c =(c1; : : : ; cn)∈Nn and x = (x1; : : : ; xn). Moreoverwe suppose that maxj=1; :::; n cj6d¡

∑nj=1 cj and

aj=bj¿ a0=b0, j = 1; : : : ; n, to avoid obvious simpli?-cations of the problem. We will denote by BFKP thecontinuous relaxation of BFKP.

Page 4: Approximation algorithms for fractional knapsack problems

A. Billionnet / Operations Research Letters 30 (2002) 336–342 339

BFKP was studied by Nagih [12], and Nagih andPlateau [13], who proposed a Lagrangian duality ap-proach to bound the optimum and ?nd feasible solu-tions. Nagih also presented an application of BFKPto query optimization in information retrieval. Thisapplication results from the reference [5] where it isshown that determining the optimal logical form of aquery in information retrieval can be expressed as aparametric BFKP.The linear auxiliary problem associated with BFKP

is the following 0-1 linear knapsack problem (BLKP)with a scalar parameter �

BLKP(�): max{(a− �b)x : cx6d; x∈{0; 1}n}:Denote by BLKP(�) its continuous relaxation. We re-call in Lemma 2 well-known results concerning BLKP(see, for example, [10]) that we will use in the sequel.

Lemma 2. (i) An optimal solution Ex� of BLKP(�)with at most one fractional variable xs is easily ob-tained by a greedy algorithm due to Dantzig [3]. Thissolution can be found in O(n) time through a median7nding technique by Balas and Zemel [1].(ii) A 1

2 -approximate solution x1=2� of BLKP(�) canbe deduced from Ex� by choosing the best of the twofollowing 0-1 solutions: the 7rst one is obtained bysetting xs to 0 in Ex� and the second is obtained bysetting all variables to 0 except xs which is 7xed to 1.(iii) 1

2 (a− �b) Ex�6 (a− �b)x1=2� 6 (a− �b) Ex�.

Lemma 3 (Dinkelbach [4]). Let E� be an optimalvalue of BFKP. x is an optimal solution of BFKP ifand only if x is an optimal solution of BLKP( E�) andthe optimal value of BLKP( E�) is E�b0 − a0.

Let !(�) denote a problem whose input includes aparameter �∈R. An algorithm A is a linear algorithmfor !(�), if it computes a correct solution of !( E�) foreach ?xed E�, and if the value of each arithmetic ex-pression on each possible execution path of algorithmA is a linear function of parameter �. The followinglemma is a direct consequence of the basic form ofMegiddo’s parametric search [11] recalled by Radzik[15].

Lemma 4. If there exists a linear algorithm A forthe parametric problem BLKP(�) which runs in timeT; then problem BFKP can be solved in O(T 2) time.

The proof of the above lemma is constructive inthe sense that, given a linear algorithm A for problemBLKP(�), Megiddo provides a recipe for developingan algorithm for problem BFKP.

Lemma 5. An optimal solution of BFKP (and an op-timal solution of BLKP( E�); where E� is the optimalvalue of BFKP) with at most one fractional variablecan be computed in time O(n2).

Proof. An optimal solution of BLKP(�) can be de-termined in time O(n) by the algorithm of Balas andZemel [1] for any value of the parameter �. Since thisalgorithm is linear; Megiddo’s technique provides anO(n2) time algorithm for problem BFKP. We obtainan optimal solution of BFKP with at most one frac-tional variable since; for all value of parameter �; thealgorithm of Balas and Zemel provides a solution ofBLKP(�) with at most one fractional variable.

Now we propose a 12 -approximation algorithm

for BFKP which resembles the well-known 12 -

approximation algorithm for the BLKP (see, for in-stance, [10] and Lemma 2).

Theorem 2. A 12 -approximate solution of BFKP can

be computed in O(n2) time by the following method:

(1) Compute the optimal value E� of BFKP and anoptimal solution Ex E� of BLKP( E�) with at most onefractional variable;

(2) Deduce from Ex E� a12 -approximate solution x1=2E�

of BLKP( E�).

This solution is a 12 -approximate solution of BFKP

and the bound is tight.

Proof. The complexity of the algorithm is a conse-quence of Lemmas 2 and 5. Now we have to provethat we obtain a 1

2 -approximate solution for BFKP bythis method. The optimal value of BLKP( E�) is equalto E�b0 − a0 (see Lemma 3). Therefore; by Lemma 2,( E�b0 − a0)=26 (a − E�b)x1=2E� 6 E�b0 − a0. Moreover

x1=2E� is a 12 -approximate solution of BLKP( E�). Condi-

tion (C) of Lemma 1 is thus satis?ed and x1=2E� is a12 -approximate solution of BFKP. To see that 1

2 is tight

Page 5: Approximation algorithms for fractional knapsack problems

340 A. Billionnet / Operations Research Letters 30 (2002) 336–342

consider the series of problems with n= 3:

(BFKPk):max{R(x)=

1+3x1+(k+1)x2+(k+1)x32k+1+x1+x2+x3

:

x1+kx2+kx36 2k; x∈{0; 1}3}

:

It is easy to verify that there are two optimal solu-tions to (BFKPk) with at most one fractional vari-able: (1; 1; k−1

k ) and (1; k−1k ; 1). By Lemma 3 these

solutions are also optimal solutions of BLKP( E�). Thevalue of the 1

2 -approximate solution is thus equal tomax{(k+2)=(2k+2); (k+5)=(2k+3)} and the valueof an optimal solution x∗ is obviously (2k +3)=(2k +3)=1; so the relative error is arbitrarily close to 1

2 fork suIciently large.

Although its worst-case ratio performance is equalto 1

2 the previous approximation algorithm is interest-ing in practice because in most cases, it provides, evenfor large instances (up to 10,000 variables), approxi-mate solutions with a very weak relative gap comparedto the optimal value, at least for randomly generatedinstances [2].

4. A 12 -approximation algorithm for the unbounded

fractional knapsack problem (UFKP)

In this section we consider the problem arising fromBFKP when an unlimited number of items of eachtype is available, i.e. the unbounded fractional knap-sack problem (UFKP) that asks for an integer solutionmaximizing a fractional objective function under theconstraint given by a linear inequality.

UFKP: max{R(x) = (a0 + ax)=(b0 + bx) : cx

6 d; x∈Nn};where a0; b0 ∈N , the set of positive integers,a = (a1; : : : ; an)∈Nn, b = (b1; : : : ; bn)∈Nn, c =(c1; : : : ; cn)∈Nn and x = (x1; : : : ; xn). Moreover wesuppose 06 cj6d and aj=bj¿ a0=b0, j = 1; : : : ; n.We will denote by UFKP the continuous relaxationof UFKP.UFKP was studied by Ishii et al. [8]. These authors

discuss various properties of optimal solutions, inves-tigate how optimal solutions behave as the right-hand

side d of the constraint inequality increases and givetwo algorithms for solving the problem.The linear auxiliary problem associated with prob-

lem UFKP is the following unbounded linear knap-sack problem (ULKP) with a scalar parameter �:

ULKP(�): max{(a− �b)x : cx6d; x∈Nn}:

Denote by ULKP(�) its continuous relaxation. We re-call in Lemma 6 a well-known result concerning theULKP (see, for example, [10]) that we will use in thesequel.

Lemma 6. If there exists an index s such (as −�bs)¿ 0 then an optimal solution Ex� of ULKP(�)is xs = d=cs; xj = 0 for j = s where s is such that(as − �bs)=cs maximizes the ratio (aj − �bj)=cj forj = 1; : : : ; n. This solution can be found trivially inO(n) time.

Theorem 3. A 12 -approximate solution of UFKP can

be computed in O(n) time by the following method:

(1) Determine the index s such that

(a0 + asd=cs)=(b0 + bsd=cs)

=max{(a0+ajd=cj)=(b0+bjd=cj): j=1; : : : ; n};

(2) The solution xs = d=cs�; xj = 0 for j = s is a12 -approximate solution of UFKP and the boundis tight.

Proof. The complexity of the algorithm is obvi-ously O(n). Now we have to prove that we obtaina 1

2 -approximate solution for UFKP by this method.Lemma 3 adapted to UFKP proves that there existsan optimal solution of UFKP with only one positivevariable. That implies that xs = d=cs; xj = 0 for j = sis an optimal solution of UFKP; its value is equal to(a0 + asd=cs)=(b0 + bsd=cs). xs = d=cs�; xj = 0 forj = s is a feasible solution of UFKP and the value ofall feasible solutions of UFKP is less than or equal to(a0 + asd=cs)=(b0 + bsd=cs).Since (a0 + asd=cs�)=(b0 + bsd=cs�)¿ 0:5(a0 +

asd=cs)=(b0 + bsd=cs), xs = d=cs�, xj = 0 for j = s isa 1

2 -approximate solution of UFKP. To see that 12 is

Page 6: Approximation algorithms for fractional knapsack problems

A. Billionnet / Operations Research Letters 30 (2002) 336–342 341

tight consider the series of problems with n= 2:

(UFKPk): max{R(x) =

1 + (k + 1)x1 + kx2k + x1 + x2

:

(k + 1)x1 + kx26 2k; x∈{N}2}

:

It is easy to verify that the 12 -approximate solution

is (1,0) and that the optimal solution is (0,2). Theirrespective values are (k+2)=(k+1) and (2k+1)=(k+2). So the relative error is arbitrarily close to 1

2 for ksuIciently large.

5. Fully polynomial-time approximation schemes(FPTAS) for BFKP and UFKP

Theorem 4. BFKP admits a FPTAS which gives an�-approximate solution in time O(n3=�).

Proof. There exists an FPTAS for BLKP with a timecomplexity equal to O(n3=�) for a prescribed guaran-tee � [7]. Therefore; by Theorem 1; if we choose thisFPTAS for A� combined with the 1

2 -approximation al-gorithm of Section 3 in Algorithm ASP(�) one canderive an FPTAS for BFKP with a time complexityequal to

O

n2 +

�log(1=�)�∑k=1

n3

1=2k+2

= O(n3=�):

This is polynomial in both the input size of BFKP and1=�; implying that ASP(�) is an FPTAS for BFKP.

Remark. There exists an FPTAS for BLKP with atime complexity equal to O(n4=�) (see; for example;[14]). From this FPTAS an FPTAS for BFKP with atime complexity

O(

n4 log log Ec�

+ n5(log n+

log(1=�)�

));

where Ec = max{ai; bi : i∈{1; : : : ; n}}, is proposed in[6]. It is easy to see that from this same FPTAS forBLKP; Algorithm ASP(�) yields an FPTAS for BFKPwith a time complexity equal to

O

n2 +

�log(1=�)�∑k=1

n4

1=2k+2

= O(n4=�):

Algorithm ASP(�) can be used to produce otherFPTASs for BFKP from FPTASs for BLKP. Forexample; the FPTAS for BLKP proposed by Lawler[9] with time complexity O(n log(1=�) + (1=�)4)provides an FPTAS for BFKP with time complexityO(n2 + n(log(1=�))2 + (1=�)4).

Theorem 5. UFKP admits an FPTAS which gives an�-approximate solution in time O(n2 + n log(1=�) +(1=�)3).

Proof. There exists an FPTAS for ULKP with a timecomplexity equal to O(n + (1=�)3) for a prescribedguarantee � [9]. Therefore; by Theorem 1; if we choosethis FPTAS forA� combined with the 1

2 -approximationalgorithm of Section 4 in Algorithm ASP(�) one canderive an FPTAS for UFKP with a time complexityequal to

O

n2 +

�log(1=�)�∑k=1

(

n+1

1=23(k+2)

)

=O(n2 + n log(1=�) + (1=�)3):

This is polynomial in both the input size of UFKP and1=�; implying that ASP(�) is an FPTAS for UFKP.

6. Conclusion

We have proposed in this paper a method to trans-fer FPTASs from a linear to a fractional objectivesetting, provided that a constant factor approximationalgorithm is known for the fractional problem. Themethod is mainly based on the parametric approachto this last problem and on results of Hashizume etal. for approximating combinatorial fractional pro-gramming problems. Moreover we have proposedpolynomial time 1

2 -approximation algorithms forthe 0-1 fractional knapsack problem (based on re-sults of Megiddo for solving fractional problems)and for the unbounded fractional knapsack problem.These algorithms made it possible to de?ne FP-TASs for both problems starting, respectively, fromFPTASs for the 0-1 linear knapsack problem andfrom FPTASs for the unbounded knapsack problem.For example the currently best FPTASs for the 0-1linear knapsack problem and for the unboundedlinear knapsack problem of complexity O(n3=�) and

Page 7: Approximation algorithms for fractional knapsack problems

342 A. Billionnet / Operations Research Letters 30 (2002) 336–342

O(n+ (1=�)3), respectively, yield FPTAS for the 0-1fractional knapsack problem and for the unboundedfractional knapsack problem of complexity O(n3=�)and O(n2 + n log(1=�) + (1=�)3), respectively. Futureresearch would consist in trying to apply the generaltransfer method to other fractional problems.

Acknowledgements

The author wishes to thank the referees for theirvaluable comments and suggestions on previous ver-sions of this paper.

References

[1] E. Balas, E. Zemel, An algorithm for large zero-one knapsackproblems, Oper. Res. 28 (1980) 1130–1154.

[2] A. Billionnet, Computational experience with a12 -approximation algorithm for the hyperbolic 0-1 knapsackproblem, CEDRIC Technical Report No. 105, ConservatoireNational des Arts et MMetiers, Paris, 2000, 9p.

[3] G.B. Dantzig, Discrete variable extremum problems, Oper.Res. 5 (1957) 266–277.

[4] W. Dinkelbach, On nonlinear fractional programming, Manag.Sci. 13 (1967) 492–498.

[5] P. Hansen, M.V. Poggi de Aragao, C.C. Ribeiro, Hyperbolic0-1 programming and query optimization in informationretrieval, Math. Program. 52 (1991) 255–263.

[6] S. Hashizume, M. Fukushima, N. Katoh, T. Ibaraki,Approximation algorithms for combinatorial fractionalprogramming problems, Math. Program. 37 (1987) 255–267.

[7] D.S. Hochbaum (Ed.), Approximation Algorithms forNP-hard Problems, PWS Publishing Company, Boston, 1997.

[8] H. Ishii, T. Ibaraki, H. Mine, Fractional knapsack problems,Math. Program. 13 (1977) 255–271.

[9] E.L. Lawler, Fast approximation algorithms for knapsackproblems, Math. Oper. Res. 4 (4) (1979) 339–356.

[10] S. Martello, P. Toth, Knapsack Problems, Wiley, England,1990, 296p.

[11] N. Megiddo, Combinatorial optimization with rationalobjective functions, Math. Oper. Res. 4 (1979) 414–424.

[12] A. Nagih, Sur la rMesolution des problOemes fractionnaires envariables 0-1, ThOese de Doctorat, UniversitMe Paris 13, France,juin 1996.

[13] A. Nagih, G. Plateau, A Lagrangean decomposition for the0-1 hyperbolic programming problem, Internat. J. Math.Algorithms 1 (2000) 299–314.

[14] C.H. Papadimitriou, K. Steiglitz, Combinatorial Optimization,Algorithms and Complexity, Prentice-Hall, Englewood CliQs,NJ, 1982.

[15] T. Radzik, Fractional combinatorial optimization, in: Z.-Z.Du, P.M. Pardalos (Eds.), Handbook of CombinatorialOptimization, Kluwer Academic Publishers, Dordrecht, 1998,pp. 429–478.

[16] S. Schaible, Fractional programming, in: R. Horst, P. Pardalos(Eds.), Handbook of Global Optimization, Kluwer AcademicPublishers, Dordrecht, 1995, pp. 495–608.