Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I efficiently find the subset of activities that stay within a budget and maximizes utility?
    primarykey
    data
    text
    <p>I am trying to develop an algorithm to select a subset of activities from a larger list. If selected, each activity uses some amount of a fixed resource (i.e. the sum over the selected activities must stay under a total budget). There could be multiple feasible subsets, and the means of choosing from them will be based on calculating the opportunity cost of the activities not selected.</p> <hr> <p><strong>EDIT:</strong> There are two reasons this is not the <a href="http://en.wikipedia.org/wiki/Knapsack_problem#0-1_knapsack_problem" rel="nofollow">0-1 knapsack problem</a>:</p> <ul> <li>Knapsack requires integer values for the weights (i.e. resources consumed) whereas my resource consumption (i.e. mass in the knapsack parlance) is a continuous variable. (Obviously it's possible to pick some level of precision and quantize the required resources, but my bin size would have to be very small and Knapsack is <code>O(2^n)</code> in W.</li> <li>I cannot calculate the opportunity cost a priori; that is, I can't evaluate the fitness of each one independently, although I can evaluate the utility of a given set of selected activities or the marginal utility from adding an additional task to an existing list.</li> </ul> <hr> <p>The research I've done suggests a naive approach:</p> <blockquote> <p>Define the <a href="http://en.wikipedia.org/wiki/Power_set" rel="nofollow">powerset</a><br> For each element of the powerset, calculate it's utility based on the items not in the set<br> Select the element with the highest utility</p> </blockquote> <p>However, I know there are ways to speed up execution time and required memory. For example:</p> <ul> <li>fully enumerating a powerset is <code>O(2^n)</code>, but I don't need to fully enumerate the list because once I've found a set of tasks that exceeds the budget I know that any set that adds more tasks is infeasible and can be rejected. That is if <code>{1,2,3,4}</code> is infeasible, so is <code>{1,2,3,4} U {n}</code>, where n is any one of the tasks remaining in the larger list.</li> <li>Since I'm just summing duty the order of tasks doesn't matter (i.e. if <code>{1,2,3}</code> is feasible, so are <code>{2,1,3}</code>, <code>{3,2,1}</code>, etc.). </li> <li>All I need in the end is the selected set, so I probably only need the best utility value found so far for comparison purposes.</li> <li>I don't need to keep the list enumerations, as long as I can be sure I've looked at all the feasible ones. (Although I think keeping the duty sum for previously computed feasible sub-sets might speed run-time.)</li> </ul> <p>I've convinced myself a good recursion algorithm will work, but I can't figure out how to define it, even in pseudo-code (which probably makes the most sense because it's going to be implemented in a couple of languages--probably Matlab for prototyping and then a compiled language later). </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload