Post · 1 min read· p. 95

A Fun Optimization Problem

I spent the last several hours trying to come up with an efficient algorithm to the following problem:

Problem: Suppose that we have a sequence of ll pairs of non-negative numbers (a1,b1),…,(al,bl)(a_1,b_1),\ldots,(a_l,b_l) such that ∑i=1lai≤A\sum_{i=1}^l a_i \leq A and ∑i=1lbi≤B\sum_{i=1}^l b_i \leq B. Devise an efficient algorithm to find the kk pairs (ai1,bi1),…,(aik,bik)(a_{i_1},b_{i_1}),\ldots,(a_{i_k},b_{i_k}) that maximize

[∑r=1kairlog⁡(air/bir)]+[A−∑r=1kair]log⁡(A−∑r=1kairB−∑r=1kbir).\left[\sum_{r=1}^k a_{i_r}\log(a_{i_r}/b_{i_r})\right] + \left[A-\sum_{r=1}^k a_{i_r}\right]\log\left(\frac{A-\sum_{r=1}^k a_{i_r}}{B-\sum_{r=1}^k b_{i_r}}\right).

Commentary: I don't have a fully satisfactory solution to this yet, although I do think I can find an algorithm that runs in O(llog⁡(l)ϵ)O\left(\frac{l \log(l)}{\epsilon}\right) time and finds 2k2k pairs that do at least $1-\epsilon$ as well as the best set of kk pairs. It's possible I need to assume something like ∑i=1lai≤A/2\sum_{i=1}^l a_i \leq A/2 instead of just AA (and similarly for the bib_i), although I'm happy to make that assumption.

While attempting to solve this problem, I've managed to utilize a pretty large subset of my bag of tricks for optimization problems, so I think working on it is pretty worthwhile intellectually. It also happens to be important to my research, so if anyone comes up with a good algorithm I'd be interested to know.