We develop a general framework, called \emph{approximately-diverse dynamic programming (ADDP)} that provides PTASs for generating a collection of $k>1$ maximally diverse solutions to various packing and covering problems. Given an approximation factor $0\le c\le 1$, this framework also allows for maximizing diversity in the larger space of $c$-optimal solutions. We showcase the power and limitations of our technique via three applications. 1. Given an input to the knapsack problem, an integer $k$ and a $c\le 1$, we give an algorithm that runs in time $n^{O(1/\epsilon)}\text{poly}(k)f(\epsilon,\delta,\gamma)$ and returns $k$ solutions, each with value within $c(1-\delta)$ of optimal, weight at most $(1+\gamma)$ of the knapsack, and with diversity at least $(1-\epsilon)$ of any optimally diverse collection of $c$-optimal solutions. 2. Given a planar graph $G$, an integer $k$ and a value $c\le 1$, we give algorithms running in time $2^{O(kf(\delta,\epsilon))}n^{O(1/\epsilon)}$ that return $(1-\epsilon)$-apx. diverse $(1-\delta)c$-optimal independent sets or vertex covers. When $k=O(\log n)$, this gives a PTAS. This is the \emph{first PTAS for diverse variants for any NP-complete problem}. 3. We show how to generate diverse solutions for a geometric variant of the knapsack problem - the rectangle packing problem by [Coffman, Garey, Johnson, and Tarjan 1980]. In this problem, we are given a set of axis-aligned rectangles and a square knapsack, and the goal is to pack as many rectangles as possible into the knapsack. We present a poly-time algorithm that returns $k$ distinct solutions, where each solution achieves a profit of at least $(1-\epsilon)$ times the optimal value and fits into a $(1+\epsilon)$-enlarged knapsack. In this case, the diversity is at least $(1-\epsilon)$ of that of any collection of $k$ container based solutions.
翻译:暂无翻译