Given $N$ functions $f_{i}(t)$, find an expression for the lag times $\tau_{ij}$ which maximise the sum of cross-correlations between the functions, i.e.
$\sum_{i = 1}^{N - 1}\sum_{j = i + 1}^{N}f_{i}(t)*f_{j}(t + \tau_{ij})$
Notes:
There are ${N \choose 2} = N(N - 1)/2$ terms in the summation, but there are only $N - 1$ independent lag times, because $\tau_{ij} + \tau_{jk} =\tau_{ik}$.