## A complete anytime algorithm for number partitioning (1998)

Venue: | Artificial Intelligence |

Citations: | 31 - 3 self |

### BibTeX

@ARTICLE{Korf98acomplete,

author = {Richard E. Korf},

title = {A complete anytime algorithm for number partitioning},

journal = {Artificial Intelligence},

year = {1998},

volume = {106},

pages = {181--203}

}

### Years of Citing Articles

### OpenURL

### Abstract

Given a set of numbers, the two-way partitioning problem is to divide them into two subsets, so that the sum of the numbers in each subset are as nearly equal as possible. The problem is NP-complete, and is contained in many scheduling applications. Based on a polynomial-time heuristic due to Karmarkar and Karp, we present a new algorithm, called Complete Karmarkar Karp (CKK), that op-timally solves the general number-partitioning problem, and signif-icantly outperforms the best previously-known algorithm for large problem instances. By restricting the numbers to twelve signi cant digits, CKK can optimally solve two-way partitioning problems of ar-bitrary size in practice. For numbers with greater precision, CKK rst returns the Karmarkar-Karp solution, then continues to nd better so-lutions as time allows. Over seven orders of magnitude improvement in solution quality is obtained in less than an hour of running time. CKK is directly applicable to the subset sum problem, by reducing it to number partitioning. Rather than building a single solution one element at a time, or modifying a complete solution, CKK constructs subsolutions, and combines them together in all possible ways. This approach may be e ective for other NP-hard problems as well. 1 1

### Citations

11403 |
Computers and Intractability: A Guide to the Theory of NP-Completeness
- Garey, Johnson
- 1979
(Show Context)
Citation Context ..., divide the job processing times into two subsets, so that the sum of the times in each subset are as nearly equal as possible. This is the two-way number partitioning problem, 2swhich is NP-complete=-=[3]-=-. The generalization to k-way partitioning with k machines is straightforward, with the cost function being the di erence between the largest and smallest subset sums. This basic problem is likely to ... |

604 | Where the Really Hard Problems Are
- Cheeseman, Kanefsky, et al.
- 1991
(Show Context)
Citation Context ...earch is terminated. This phenomenon has been observed in a number of di erent constraintsatisfaction problems, such as graph coloring and boolean satis ability, and has been called a phase transition=-=[7, 2, 14]-=-. In a constraint-satisfaction problem, the di culty increases with increasing problem size as long as no solution exists, since the entire problem space must be searched. For some problems however, a... |

532 |
Optimization by simulated annealing: An experimental evaluation. Part 1, graph partitioning
- Johnson, Aragon, et al.
- 1989
(Show Context)
Citation Context ...f this paper is to extend the KK heuristic to a complete algorithm. While the idea is extremely simple, it doesn't appear in Karmarkar and Karp's paper[10], nor in any subsequent papers on the problem=-=[15, 8]-=-. At each cycle, the KK heuristic commits to placing the two largest numbers in di erent subsets, by replacing them with their di erence. The only other option is to place them in the same subset, rep... |

273 | Limited discrepancy search
- Harvey, Ginsberg
- 1995
(Show Context)
Citation Context ...ristic of separating the two largest numbers in di erent subsets. An alternative search strategy, which has the same linear space requirement as depth- rst search, is called limited discrepancy search=-=[5]-=-. Limited discrepancy search (LDS) is based on the idea that in a heuristically ordered search tree, a left branch is preferable to a right branch. Instead of searching the tree left to right, LDS sea... |

225 |
Solving time-dependent planning problems
- Boddy, Dean
- 1989
(Show Context)
Citation Context ...rder polynomial time, they often consume very little time on modern computers, with no way of improving their solutions given more running time. In between these two classes are the anytime algorithms=-=[1]-=-, which generally nd better solutions the longer they are allowed to run. One of the most common types of anytime algorithms are local search algorithms, which make incremental modi cations to existin... |

224 | Hard and easy distributions for SAT problems
- Mitchell, Selman, et al.
- 1992
(Show Context)
Citation Context ...earch is terminated. This phenomenon has been observed in a number of di erent constraintsatisfaction problems, such as graph coloring and boolean satis ability, and has been called a phase transition=-=[7, 2, 14]-=-. In a constraint-satisfaction problem, the di culty increases with increasing problem size as long as no solution exists, since the entire problem space must be searched. For some problems however, a... |

82 |
Computing partitions with applications to the knapsack problem
- Horowitz, Sahni
- 1974
(Show Context)
Citation Context ...ce complexity is linear in the number of elements. This approach is impractical for problems larger than 40 elements, however, because of its time complexity. 2.2 Horowitz and Sahni Horowitz and Sahni=-=[6]-=- showed how to dramatically reduce the running time of this algorithm by trading space for time, as follows: Arbitrarily divide the original set of n numbers into two subsets, each containing n=2 numb... |

68 |
Solving partitioning problems with genetic algorithms
- Jones, Beltramo
- 1991
(Show Context)
Citation Context ...ngs of the problem, but their best results outperform the KK solution by only three orders of magnitude, compared to the seven orders of magnitude CKK achieves in less than an hour. Jones and Beltramo=-=[9]-=- applied genetic algorithms to the problem, but don't mention the Karmarkar-Karp heuristic. Their technique fails to nd an optimal solution to the single problem instance they ran, while the KK soluti... |

66 | Improved limited discrepancy search
- Korf
- 1996
(Show Context)
Citation Context ...uring the rst iteration of LDS, rather than after the entire left subtree has been searched as in depth- rst search. Searching the tree in this order involves some overhead relative to depthrst search=-=[13]-=-. Thus, in the cases where no perfect partition exists, and the entire tree must be searched, depth- rst search is preferable. However, in cases where there is a perfect partition, LDS often nds it fa... |

33 | From approximate to optimal solutions: A case study of number partitioning
- Korf
- 1995
(Show Context)
Citation Context ... subpartitions, and combines them together in all possible ways. This new problem space may be e ective for other combinatorial optimization problems as well. Some of this work originally appeared in =-=[12]-=-. 2 Previous Work We begin with algorithms that nd optimal solutions, but are limited in the size of problems that they can solve, then consider polynomial-time approximation algorithms, and then opti... |

27 |
Probabilistic analysis of optimum partitioning
- Karmakar, Karp, et al.
- 1986
(Show Context)
Citation Context ...ke to predict where the hardest problems are, for a given precision of values. To do this, we need to know the value of the optimal subset di erence for a given problem class. Karmarkar and Karp et al=-=[11]-=- showed that for a set of independent trials of partitioning n real numbers from zero to one, the median value of the minimum subset di erence is ( p n=2 n ), or c p n=2 n for some constant c. We can ... |

21 |
A T = O(2n/2), S = O(2n/4) algorithm for certain NP-complete problems
- Schroeppel, Shamir
- 1981
(Show Context)
Citation Context ...n about n = 50. However, for problems of this size or smaller, we have reduced the time complexity from O(2 n )toO(2 n=2 ), a very signi cant reduction. 2.3 Schroeppel and Shamir Schroeppel and Shamir=-=[16]-=- improved on the algorithm of Horowitz and Sahni by reducing its space complexity from O(2 n=2 )toO(2 n=4 ), without increasing its asymptotic time complexity. What the Horowitz and Sahni algorithm re... |

21 |
A Study of Complexity Transition on the Asymmetric Travelling Salesman Problem
- Zhang, Korf
- 1996
(Show Context)
Citation Context ...quently. In that case, the problem gets easier with increasing size, since once any solution is found, the search can be terminated. 16sThis complexity transition also appears in optimization problems=-=[2, 18]-=-, as long as there exist optimal solutions that can be recognized as such without comparison to any other solutions. This is the case with number partitioning, where a subset di erence of zero or one ... |

17 |
The differencing algorithm LDM for partitioning: a proof of a conjecture of Karmarkar and
- Yakir
- 1996
(Show Context)
Citation Context ... di erencing operations dramatically reduce the size of the remaining numbers. The more numbers we start with, the more di erencing operations, and hence the smaller the size of the last number. Yakir=-=[17]-=- recently con rmed Karmarkar and Karp's conjecture 10sthat the value of the nal di erence is O(1=n log n ), for some constant [10]. 2.7 Making the Greedy Heuristic Complete Both these algorithms run i... |

5 | The number partition phase transition
- Gent, Walsh
- 1995
(Show Context)
Citation Context ... median number of nodes are those of size 36. If we look at mean node generations instead, the hardest problems are of size 38, since the outliers have a larger e ect on the mean than the median. See =-=[4]-=- for more detail on this complexity transition in number partitioning. We would like to predict where the hardest problems are, for a given precision of values. To do this, we need to know the value o... |

5 |
The dierencing method of set partitioning
- Karmarkar, Karp
- 1982
(Show Context)
Citation Context ...ing, including several that are limited by their memory requirements to problems of less than 100 elements. We then present an elegant polynomial-time approximation algorithm due to Karmarkar and Karp=-=[10]-=-, called set di erencing or the KK heuristic, which dramatically outperforms the greedy heuristic. Our main contribution is to extend the KK heuristic to a complete algorithm, which we call Complete K... |

2 |
Phase transitions in arti cial intelligence systems. Arti cial Intelligence 33:155{171
- Huberman, Hogg
- 1987
(Show Context)
Citation Context ...earch is terminated. This phenomenon has been observed in a number of di erent constraintsatisfaction problems, such as graph coloring and boolean satis ability, and has been called a phase transition=-=[7, 2, 14]-=-. In a constraint-satisfaction problem, the di culty increases with increasing problem size as long as no solution exists, since the entire problem space must be searched. For some problems however, a... |

2 |
Easily searched encodings for number partitioning, to appear
- Ruml, Ngo, et al.
- 1996
(Show Context)
Citation Context ...f this paper is to extend the KK heuristic to a complete algorithm. While the idea is extremely simple, it doesn't appear in Karmarkar and Karp's paper[10], nor in any subsequent papers on the problem=-=[15, 8]-=-. At each cycle, the KK heuristic commits to placing the two largest numbers in di erent subsets, by replacing them with their di erence. The only other option is to place them in the same subset, rep... |