Determines all possible ordering combinations