Probability of hash collisions

Revision en1, by whatthemomooofun1729, 2023-10-24 10:27:54

Hi, I am trying to check if an array (consisting of the numbers from 1 to N, where N is the length of the array) is a permutation of N elements using hashing. My idea is to assign a randomized value as a hash for each value between 1 and N. The hash value of an array would be them sum of these individual hashes, and I compare this sum to the sum of the hashes for a permutation of length N.

I am wondering, what is the probability of collisions using this type of hashing? I couldn't find much online other than the probability for rolling hashes. Thank you!

Tags hashing

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English whatthemomooofun1729 2023-10-24 10:30:14 0 (published)
en1 English whatthemomooofun1729 2023-10-24 10:27:54 595 Initial revision (saved to drafts)