I'm looking for an algorithm to "pack" a collection of sets as slices of a sequence. I'm sure somebody must have thought about this before. Specifically the algorithm has
Input: F_1, .., F_n where the F_i are finite subsets of some S
Output: A (shortest) sequence s_1, .., s_m in S such that for all i there is a j where F_i = { s_k | j <= k < j + |F_i| }