Is there a circular hash function?

Posted by Phil H on Stack Overflow See other posts from Stack Overflow or by Phil H
Published on 2010-04-06T13:24:53Z Indexed on 2010/04/06 13:33 UTC
Read the original article Hit count: 127

Filed under:
|
|

Thinking about this question on testing string rotation, I wondered: Is there was such thing as a circular/cyclic hash function? E.g.

h(abcdef) = h(bcdefa) = h(cdefab) etc

Uses for this include scalable algorithms which can check n strings against each other to see where some are rotations of others.

I suppose the essence of the hash is to extract information which is order-specific but not position-specific. Maybe something that finds a deterministic 'first position', rotates to it and hashes the result?

It all seems plausible, but slightly beyond my grasp at the moment; it must be out there already...

© Stack Overflow or respective owner

Related posts about hashing

Related posts about string