Shin-Cheng Mu, Yu-Han Lyu, and Akimasa Morihata. In the *6th ACM SIGPLAN workshop on Generic programming (WGP 2010)*, pages 97-108, Sep. 2010. [PDF]

The *fully polynomial-time approximation scheme* (FPTAS) is a class of approximation algorithms that is able to deliver an approximate solution within any chosen ratio in polynomial time. By generalising Bird and de Moor’s *Thinning Theorem* to a property between three orderings, we come up with a datatype-generic strategy for constructing fold-based FPTASs. Greedy, thinning, and approximation algorithms can thus be seen as a series of generalisations. Components needed in constructing an FPTAS are often natural extensions of those in the thinning algorithm. Design of complex FPTASs is thus made easier, and some of the resulting algorithms turn out to be simpler than those in previous works.