|
|
|
|
|
by contravariant
724 days ago
|
|
Interesting, not often you see a non-associative variant of commutativity. It confused me for a bit that 'h' itself is not commutative, but summing arbitrary sequences is order independent provided you start with the same seed and sum from left to right. Edit: Not sure the definition of phi is right though, once you have h(a, h*(T + S)) you're pretty much stuck since the commutativity doesn't allow you to rearrange things from that point. I think I understand the gist, you want to start accumulating from a different seed, except that h(a, h*(T)) is not the hash of T if you replace the seed with a. You'd need something like: h_s*({}) = s
h_s*(T + {x}) = h_s*(h_s(T), h(x))
phi(T) = (a => h_a*(T))
then commutativity could be written h_(h_s*({a}))({b}) = h_(h_s*({b}))({a})
which is slightly more symmetric, but maybe not better. |
|