Mathematical Programming Formulation

The mixed integer linear programming formulation shown here matches Williams (2013). An alternative approach (not shown) formulates the model as a longest-path problem in a directed acyclic network, with node $(i,j)$ corresponding to folds after positions $i$ and $j$ and not between, and with arcs of the form $(i,j) \rightarrow (j,k)$.