Patent ID: 7886055

Claim:
A method comprising: receiving a request to perform resource allocation in a system having plural tiers; in response to the request, determining, by at least one processor based on conditions relating to a target computation time and solution quality of an answer to the request, which of plural resource allocation algorithms to select; selecting, by the at least one processor, one of the plural resource allocation algorithms in response to the determining, wherein selecting one of the plural resource allocation algorithms comprises selecting one of: a first resource allocation algorithm to provide an approximate solution, and a second resource allocation algorithm to provide an optimal solution by solving for a multi-choice knapsack problem, wherein the multi-choice knapsack problem includes plural sets of items that correspond to the plural tiers, wherein solving the multi-choice knapsack problem selects an item from each of the sets, each selected item representing an amount of resources for a respective one of the tiers, wherein the first resource allocation algorithm has a smaller computational time than the second resource allocation algorithm; and using the selected resource allocation algorithm to allocate resources for the plural tiers of the system.