# Differences between minimization functions?

There's more than 20 functions having to do with minimization

MinMax, ConstrainedMin, NMinimize, NArgMin, FindMinimumCut,
NMinValue, MinLimit, Minimize, DiscreteMinLimit, MinValue, ArgMin,
FindMinimum, BooleanMinterms, FindMinValue, RankedMin, FindArgMin,
MinimalBy, Min, BooleanMinimize, BayesianMinimization, MinDate


What is each of them for? Are there patterns to help remember them?

Looking at Names["*Min*"], we find all functions that involve "Min" in their name.

### function minimization

These symbols have to do with finding local and global minima for functions (i.e. $$f:\mathbb R\to\mathbb R$$)

FindArgMin,   NArgMin,   ArgMin,   (*gives argument(s) of minimum*)
FindMinimum,  NMinimize, Minimize, (*gives list(s) {arg,value}*)
FindMinValue, NMinValue, MinValue  (*gives value(s) of minimum*)


The middle row is all that really matters

• Find*Min is numerical, and iteratively steps toward a local min from a starting point.
• N*Min is semi-numerical, and looks for a global min.
• The right column finds exact non-numerical minima, unless it can't in which case it actually calls the numerical ones.

### discrete minimization

• Min gives the smallest value of a list
• RankedMin gives the $$n$$th smallest value of a list
• MinimalBy allows the use of a function to evaluate smallness. Since different elements could evaluate to the same number, it returns all minimal elements instead of just one

There are other functions that have to do with minimizing on different pieces of data, like booleans, graphs, colors, dates, sequences, etc.

For each of the functions, there's a maximization counterpart (except MinMax which is just {Min@#,Max@#}&).

The functions aren't named perfectly: Minimize being related to MinValue but not to Min is annoying.

• Pretty good synopsis. One thing to note: the exact functions will not invoke numeric counterparts unless the input contains approximate values. Mar 25 at 14:49