I don't think those algorithms give correct answers because you could have
hash(a) = hash(c)
hash(b) = hash(d)
a != c, b != d
hash(x) = hash(a)
hash(y) = hash(b)
and the conclusion would be the tables have x and y, which is false.
Where does your problem come from?
Andres.
On 3/31/14 1:21 , Anas YOUSFI wrote:
> Thanks for you all,
>
> I know that hash(x) == hash(A) ==> x = A not always true. The aim is
> to compare two algorithms :
>
> *- _First Algorithm :_*
> 1- A table contains two informations : hash(a) and hash(b)
> 2- given x and y : ( x always different to y : x!=y)
> 3- if ( (hash(x) == hash(a) *and* hash(b) == hash(y))
> *or (*hash(x) == hash(b) *and* hash(y) == hash(a)))
> 4- write : The table contains x and y
> * - _Second Algorithm :_*
> 1- A table contains one information : hash(a,b)
> 2- given x and y : ( the order of x and y is not important,
> and x!=y)
> 3- if hash(x,y) == hash(a,b)
> 4- write : The table contains x and y.
>
> i want to use the second one, because i'll avoid to store data twice
> and make just one comparison operation. I know that i can replace the
> line 3 of the seconde algorithme by :
> *hash(x,y) == hash(a,b) or hash(y,x) == hash(a,b)*
> For making this operation more quickly, i'm looking if there is any
> hash function that verify the condition : hash(x,y) = hash(Y,X) ==>
> X=x and Y=y Given that *x is always different to y
>
> *
> I will testing paul proposition: hash(a,b) = hash(a) XOR hash(b)*
> *
> <mailto:
webs...@gmail.com>>:
> <mailto:
hash-function...@googlegroups.com>.
> <mailto:
hash-fu...@googlegroups.com>.
> --
> You received this message because you are subscribed to the Google
> Groups "Hash Functions" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
hash-function...@googlegroups.com
> <mailto:
hash-function...@googlegroups.com>.
> <mailto:
hash-fu...@googlegroups.com>.