# Thread: Hash collision Probability

1. ## Hash collision Probability

Hi all

I would like to know from where this equation came:
Hash collision Probability = 2^-n = 1/2^n
Please help me!

2. This thread was split from trouble with hash function implementing.

Originally Posted by Mustafa_Ayoob
I would like to know from where this equation came:
Hash collision Probability = 2^-n = 1/2^n
You probably should provide some context, unless you are really talking about why the equation is so, in which case it is a matter of mathematics.

3. no am sorry , but i want to know from where the above equation came? it's used to calculate the collision if happend in hash function, am not talking about programming in c++..

4. Originally Posted by Mustafa_Ayoob
i want to know from where the above equation came? it's used to calculate the collision if happend in hash function
You should be the one telling us that: where did you encounter it, and what is the hash function?

5. ok i find the solution
it is basic propability calculation cames form Statistic.

Popular pages Recent additions