How to make series circle shift invariant I have a series of numbers. They may be integer, floating, or binary. Length of series is constant. I need criteria which is circle shift invariant. For more information assume series S1, S2, S3, S4 and S5:

S1 = {A, B, C, D, E, F}
S2 = {F, A, B, C, D, E}
S3 = {D, E, F, A, B, C}
S4 = {A, C, D, F, E, B}
S5 = {A, B, C, D, E, G}

where A, B, C, E, F, and G are numbers. S2 and S3 is resulted by shift circle of S1. So the criteria should return same values for these three series. S4 have same number of S1, S2, and S3 but order of numbers are not the same. S5 and S1 are similar so I want to criteria of S1 and S5 be similar.

I want to use them as descriptors in image processing. In other words, I want to make a feature (like LBP, or HOG) rotation invariant. For example mean and variance can be used but I need more. Are there any suggestion?
A possible way to approach the problem would be to extract the maximum values of the discrete circular convolution of each pre-normalized sequence with an NXN matrix formed by the elements of an orthonormal base of the Nx1 sequence space.

The output of this step would be a Nx1 vector that would contain a measure of the similitude of each sequence with the each base sequence. If base sequences are adequately chosen, similar sequences should have similar output vectors, and an operator like mean square difference between outputs should tell how similar are two input sequences.