View metadata, citation and similar papers at core.ac.uk brought to you by CORE
provided by Elsevier - Publisher Connector
Journal of Computer and System Sciences 66 (2003) 349–370 http://www.elsevier.com/locate/jcss
An efficient fully polynomial approximation scheme for the Subset-Sum Problem Hans Kellerer,a, Renata Mansini,b Ulrich Pferschy,a and Maria Grazia Speranzac a Institut fu¨r Statistik und Operations Research, Universita¨t Graz, Universita¨tsstr. 15, A-8010 Graz, Austria b Dipartimento di Elettronica per l’Automazione, Universita` di Brescia, via Branze 38, I-25123 Brescia, Italy c Dipartimento Metodi Quantitativi, Universita` di Brescia, Contrada S. Chiara 48/b, I-25122 Brescia, Italy Received 20 January 2000; revised 24 June 2002
Abstract
Given a set of n positive integers and a knapsack of capacity c; the Subset-Sum Problem is to find a subset the sum of which is closest to c without exceeding the value c: In this paper we present a fully polynomial approximation scheme which solves the Subset-Sum Problem with accuracy e in time Oðminfn Á 1=e; n þ 1=e2 logð1=eÞgÞ and space Oðn þ 1=eÞ: This scheme has a better time and space complexity than previously known approximation schemes. Moreover, the scheme always finds the optimal solution if it is smaller than ð1 À eÞc: Computational results show that the scheme efficiently solves instances with up to 5000 items with a guaranteed relative error smaller than 1/1000. r 2003 Elsevier Science (USA). All rights reserved.
Keywords: Subset-sum problem; Worst-case performance; Fully polynomial approximation scheme; Knapsack problem
1. Introduction
Given a set of n items En ¼f1; y; ng each having a positive integer weight wj ð j ¼ 1; y; nÞ and a knapsack of capacity c; the Subset-Sum Problem (SSP) is to select a subset E of En such that the corresponding total weight wðEÞ is closest to c without exceeding c: Formally, the SSP