# Changes between Version 1 and Version 20 of Ticket #10950

Ignore:
Timestamp:
10/24/17 15:34:40 (2 years ago)
Comment:

Unmodified
Removed
Modified
• ## Ticket #10950

• Property Authors changed from to `Jeroen Demeyer`
• Property Summary changed from `The Hash function for matrices suffers from many collisions with permutation matrices` to `The hash function for matrices suffers from many collisions with permutation matrices`
• Property Owner changed from jason, was to nthiery
• Property Dependencies changed from to `#24090`
• Property Branch changed from to `u/jdemeyer/the_hash_function_for_matrices_suffers_from_many_collisions_with_permutation_matrices`
• Property Milestone changed from to `sage-8.1`
• Property Keywords permutation matrices hash added
• Property Commit changed from to `f67a8839d7dfb843a8ed8652a2734b644be579f1`
• ## Ticket #10950 – Description

 v1 }}} In general, we would hope to get n! below: After applying this branch: {{{ sage: len(set([ hash(mat(p)) for p in Permutations(1) ])) 1 sage: len(set([ hash(mat(p)) for p in Permutations(2) ])) 1 sage: len(set([ hash(mat(p)) for p in Permutations(3) ])) 5 sage: len(set([ hash(mat(p)) for p in Permutations(4) ])) 1 sage: len(set([ hash(mat(p)) for p in Permutations(5) ])) 16 sage: len(set([ hash(mat(p)) for p in Permutations(6) ])) 16 sage: len(set([ hash(mat(p)) for p in Permutations(7) ])) 32 sage: len(set([ hash(mat(p)) for p in Permutations(8) ])) 1 sage: def hashmat(p): m = p.to_matrix(); m.set_immutable(); return hash(m) sage: len(set(hashmat(p) for p in Permutations(1))) 1 sage: len(set(hashmat(p) for p in Permutations(2))) 2 sage: len(set(hashmat(p) for p in Permutations(3))) 6 sage: len(set(hashmat(p) for p in Permutations(4))) 24 sage: len(set(hashmat(p) for p in Permutations(5))) 120 sage: len(set(hashmat(p) for p in Permutations(6))) 720 sage: len(set(hashmat(p) for p in Permutations(7))) 5040 sage: len(set(hashmat(p) for p in Permutations(8))) 40320 }}}