# No Free Lunch Theorems

No Free Lunch Theorems for Search is the title of a 1995 paper of David H. Wolpert and William G. Macready, and No Free Lunch Theorems for Optimization the title of a follow-up from 1997.

In these papers, Wolpert and Macready show that for any algorithm, any elevated performance over one class of problems is offset by performance over another class, i.e. that on average each algorithm works as well as a blind search.

Intelligent Designers love these No Free Lunch Theorems (often abbreviated to NFL), as they seem to indicate that - for instance - evolutionary algorithms have to get some additional information from somewhere to work.

Usually they neglect the fact that an algorithm has to work only on a certain class of functions, and not on all functions. Wolpert himself has repudiated William Dembski's interpretation of the theorems as lending support to intelligent design.

## Mathematical formulation of the Sharpened No Free Lunch Theorem

While the original NFL theorems looked at the class of all functions, the Sharpened NFL theorem is formulated for smaller classes with a special property, i.e., being closed under permutation.

First, some definitions have to be introduced in the way as they seem popular in the literature when talking about the NFL and such. This set of definition can be found - for instance - in a paper of Andrea Valsecchi and Leonardo Vanneschi:

• $\mathcal{X},\mathcal{Y}$ are finite sets.
• $f:\quad \mathcal{X} \rightarrow \mathcal{Y}$ is a function
• a trace of length m over $\mathcal{X}$ and $Y$ is a sequence of couples Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \langle (x_1,y_1), \dots, (x_m,y_m) \rangle such that $X$ and Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): y_i = f(x_i)\, Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \forall i = 1,2,\dots,m
• a trace is called simple if an element of $\mathcal{X}$ appears at most once in it
• T is the set of all possible traces over the sets $\mathcal{X}$ and $Y$
• a search operator is a function $X$
• g is non-repeating if $X$ (here, $t^\mathcal{X} = \{x_1,x_2,\dots,x_m\}$ for the trace Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \langle (x_1,y_1), \dots, (x_m,y_m) \rangle , and $Y} = \{y_1,y_2,\dots,y_m\$ )
• if $t \in T$ is simple and Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): g is non-repeating, then also Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): t' = t \| (g(t),f \circ g(t)) is a simple trace. Here Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \| is the concatenation operator
• a deterministic search algorithm Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): A_g\, is an application $A_g: ((\mathcal{X} \rightarrow \mathcal{Y}) \times T) \rightarrow T$ with Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \forall t \in T: \quad A_g(f,t)= t \| (g(t),f \circ g(t)) , where g is a search operator.
• Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): A_g\, is called non-repeating if g is non-repeating
• for convenience, we'll drop the g and speak of a search-algorithm A.
• a deterministic non-repeating search algorithm will be called algorithm for short
• Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): A^m(f,t) is the m-th iteration of A to trace t, defined by Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): A^0(f,t) = t , $m+1$
• Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): A^m(f) = A^m(f,\langle \rangle) , where Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \langle \rangle is the empty trace.
• A set of functions $Y}^\mathcal{X$ is called closed under permutation (c.u.p) if $\forall f \in F$ and for each permutation Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \sigma of $\mathcal{X}$ ($S}_\mathcal{X$ ), we have $(f\circ \sigma) \in F$.

Now, at last, the Sharpened NFL:

Sharpened NFL: Let Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): A, B be two deterministic non-repeating search algorithms and let $Y}^\mathcal{X$ be c.u.p. Then $1,..., |\mathcal{X}| \$ $(A^m(f))^\mathcal{Y}:f \in F\$ $(B^m(f))^\mathcal{Y}:f \in F\$