Given two n-bit (cyclic) binary strings, A and B, represented on a circle (necklace instances), let each sequence have the same number (k) of 1's. We are interested in computing the cyclic swap distance between A and B, i.e. the minimum number of swaps needed to convert A to B, minimized over all possible rotations of B. We show that, given the compressed representation of A and B, this distance may be computed in O(k2).
Bibliographical noteFunding Information:
∗Partially supported by the Israel Science Foundation grant 35/05.
- Cyclic strings
- Music retrieval
- Repeated patterns
- Rhythmic/melodic similarity
- Swap distance
ASJC Scopus subject areas
- Computer Science (miscellaneous)
- Computational Mathematics