How can I approach creating an efficient algorithm for maximizing value with these specific constraints?

Posted by sway on Programmers See other posts from Programmers or by sway
Published on 2014-04-10T04:20:07Z Indexed on 2014/06/09 9:42 UTC
Read the original article Hit count: 295

Filed under:
|
|

I'm having trouble coming up with an approach that isn't n^2 for this problem. Here's a contrived, simplified version I've come up with:

Let's say you're a company that needs 4 employees to launch in a new city, a manager, two salespeople, and a customer support rep, and you magically know how much impact every candidate will have and how much salary they require to take the job. Your table of potential employees looks something like this:

Name           Position       Salary     Impact
Adam Smith     Manager        60,000     11
Allison Brown  Salesperson    40,000     9
Brad Stewart   Manager        55,000     9
...etc (thousands of records)

What algorithmic approach can be taken to find the maximum "impact" while still filling all the positions and remaining under, say, a 200,000 budget?

Thanks!

© Programmers or respective owner

Related posts about algorithms

Related posts about efficiency