 # How to minimize a function of single integer variable?

Let’s suppose I have a function f(m): \mathbb{N}\rightarrow\mathbb{R}.
What method should I use to minimize it?

The function is supposed to be smooth if we continue it from \mathbb{N} to [1,+\infty).
Also, it’s continuation is either monotonically increasing (minimum for m=1) or has a single local minima which is also the global one (minimum is somewhere in (1,+\infty)).

May be I should adapt some derivative free method to integer input variables?
If it is indeed the right way to go, can anyone suggest a derivative free method which is particularly good for functions of single variable?

Thank you.

If we are talking about methods:
A bisection method with a lot of initial points it’s the most robust method I can think of, and it can be adapted to integer search (simply use div instead of /)
Also, if it’s fron N->R, why not generalize the function to R - >R and use Newton?

My assumption about smoothness is only an assumption: there seems to be no reason to expect that some bad singularities happen. At the same time I can not construct this continuation explicitly.

Bisection method is good for finding zeroes of a function. I did some googling after the initial post and it seems that a good approach is to use Fibonacci search in my case.
Nevertheless, thank you for your help.

1 Like