#### Topic: To create unique identifiers for pair elements

There are elements, each of which has a unique identifier (in the elementary case - their address in storage). It is required to create the identifier for pair elements but so that its value did not depend on the order in which they undertake. It would be possible to use XOR, but there is a probability that its value coincides with other pair. And if to blind identifiers instead of by means of OR the result will depend on the order.

#### Re: To create unique identifiers for pair elements

Hello, 777777w, you wrote: 7> And if to blind identifiers instead of by means of OR the result will depend on the order. How about to sort?

#### Re: To create unique identifiers for pair elements

Hello, 777777w, you wrote: 7> There are elements, each of which has a unique identifier (in the elementary case - their address in storage). It is required to create the identifier for pair elements but so that its value did not depend on the order in which they undertake. It would be possible to use XOR, but there is a probability that its value coincides with other pair. And if to blind identifiers instead of by means of OR the result will depend on the order. In the assumption that identifiers have identical length MIN (A, B) CONCAT MAX (A, B) If it not so - add a separator in between.

#### Re: To create unique identifiers for pair elements

Hello, 777777w, you wrote: 7> There are elements, each of which has a unique identifier (in the elementary case - their address in storage). It is required to create the identifier for pair elements but so that its value did not depend on the order in which they undertake. It would be possible to use XOR, but there is a probability that its value coincides with other pair. And if to blind identifiers instead of by means of OR the result will depend on the order. pair.id = [min (a.id, b.id), max (a.id, b, id)] If is N unique elements. That of unique pairs N * (N-1)