1: \begin{abstract}
2: A formulation for the automated generation of algorithms via mathematical programming (optimization) is proposed.
3: The formulation is based on the concept of optimizing within a parameterized family of algorithms, or equivalently a family of functions describing the algorithmic steps.
4: The optimization variables are the parameters -within this family of algorithms- that encode algorithm design: the computational steps of which the selected algorithms consists.
5: The objective function of the optimization problem encodes the merit function of the algorithm, e.g., the computational cost (possibly also including a cost component for memory requirements) of the algorithm execution.
6: The constraints of the optimization problem ensure convergence of the algorithm, i.e., solution of the problem at hand.
7: The formulation is described prototypically for algorithms used in solving nonlinear equations and in performing unconstrained optimization; the parametrized algorithm family considered is that of monomials in function and derivative evaluation (including negative powers).
8: A prototype implementation in GAMS is developed along with illustrative results demonstrating cases for which well-known algorithms are shown to be optimal.
9: The formulation is a mixed-integer nonlinear program (MINLP).
10: To overcome the multimodality arising from nonconvexity in the optimization problem, a combination of brute force and general-purpose deterministic global algorithms is employed to guarantee the optimality of the algorithm devised.
11: We then discuss several directions towards which this methodology can be extended, their scope and limitations.
12: \end{abstract}