MODIFIED: permutations auto-generation in temporal similarity measure