MHB Algorithm: maximize sum of increasing functions

Click For Summary
The discussion centers on finding an algorithm to maximize the sum of increasing functions under a constraint on their inputs. The user, David, seeks to determine values \( n_i \) for multiple increasing functions such that the sum of these values does not exceed a specified limit \( N \), typically around 500. For two functions, exhaustive search is feasible, but the complexity increases with more functions. A suggested solution is the Downhill Simplex method (Nelder-Mead), which David plans to incorporate into a larger optimization framework. The conversation highlights the challenge of integrating heuristic solutions for subproblems within this optimization context.
Pereskia
Messages
15
Reaction score
2
Hi!

(Not sure which forum to pick for this question. This looked like the best one. I apologies if it is not)

I have a number of functions (say m functions) with integer domain. All functions are increasing. (Increasing in the sense not decreasing, $f(n+1) \ge f(n)$.) I want an algorithm to find $n_i$ for $1 \le i \le m$ such that $\sum_i^m n_i \le N$ that maximizes $\sum_i^m f(n_i)$.

$m$ is usually small (2 or 3) but can be larger as well and $m$ = 2 can be solved reasonably fast by exhaustive search, $m\ge3$ takes more time. Typically $N\approx 500$.

Is there any known algorithm?

Regards
David
 
Mathematics news on Phys.org
Pereskia said:
Hi!

(Not sure which forum to pick for this question. This looked like the best one. I apologies if it is not)

I have a number of functions (say m functions) with integer domain. All functions are increasing. (Increasing in the sense not decreasing, $f(n+1) \ge f(n)$.) I want an algorithm to find $n_i$ for $1 \le i \le m$ such that $\sum_i^m n_i \le N$ that maximizes $\sum_i^m f(n_i)$.

$m$ is usually small (2 or 3) but can be larger as well and $m$ = 2 can be solved reasonably fast by exhaustive search, $m\ge3$ takes more time. Typically $N\approx 500$.

Is there any known algorithm?

Regards
David

Hi Pereskia! Welcome to MHB! (Wave)

How do the different functions tie in?
I only see the single $f$, so we seem to have $m$ numbers instead of $m$ functions.
 
Hi!

Sorry, I want to maximize $\sum_{i=1}^m f_i(n_i)$. I lost the index $i$.

Regards
David
 
I like Serena said:
Then I think you are looking for the Downhill Simplex method (Nelder-Mead), which is also called the Amoeba method.

Thank you. I will add this method to my tool box.

I will however need the optimum in this case. It will be one part of a larger optimization algorithm. I don't know how the other parts will work with heuristic solutions to the subproblems.

Regards
David
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 3 ·
Replies
3
Views
823
  • · Replies 2 ·
Replies
2
Views
779
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
9
Views
3K
  • · Replies 125 ·
5
Replies
125
Views
19K
Replies
3
Views
2K
Replies
5
Views
2K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 18 ·
Replies
18
Views
4K