## Abstract

The following variant of the knapsack problem is considered; Suppose there are n safe deposit boxes, each containing known amounts of m currencies, and there is a certain need for each currency. The problem is to open the minimal number of boxes, in order to collect at least the prescribed amount of each currency. In a technical report, by Y. Dinitz and A. Karzanov, it is shown that this problem is NP-hard, and that its non-degenerate case can be solved within an absolute error of at most m - 1 in O(n^{m+1}) time, assuming m is constant. They also suggested an O(n^{2}) algorithm, with an absolute error of at most 1, for the general case of two currencies. We suggest new combinatorial algorithms with significantly improved runtime for the two and three currency cases (2D,3D). The 2D algorithm runs in O(nlog^{2} n) time, while the 3D algorithm runs in O(n^{2} log^{2} n) time. In addition to linear programming techniques, used in previous works, we also use the parametric search approach of N. Megiddo [10] for decreasing the running time. The degenerate case is formulated as an interesting problem, solved by combinatorial techniques.

Original language | English |
---|---|

Pages | 53-56 |

Number of pages | 4 |

State | Published - 1 Dec 2007 |

Event | 19th Annual Canadian Conference on Computational Geometry, CCCG 2007 - Ottawa, ON, Canada Duration: 20 Aug 2007 → 22 Aug 2007 |

### Conference

Conference | 19th Annual Canadian Conference on Computational Geometry, CCCG 2007 |
---|---|

Country/Territory | Canada |

City | Ottawa, ON |

Period | 20/08/07 → 22/08/07 |

## ASJC Scopus subject areas

- Geometry and Topology