Hash collision Probability

This is a discussion on Hash collision Probability within the General Discussions forums, part of the Community Boards category; Hi all I would like to know from where this equation came: Hash collision Probability = 2^-n = 1/2^n Please ...

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    3

    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!
    Last edited by Salem; 08-02-2012 at 08:03 AM. Reason: font abuse

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,256
    This thread was split from trouble with hash function implementing.

    Quote 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.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Aug 2012
    Posts
    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++..
    Last edited by Salem; 08-02-2012 at 08:03 AM. Reason: more font abuse

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,256
    Quote 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?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    Aug 2012
    Posts
    3
    ok i find the solution
    it is basic propability calculation cames form Statistic.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hash function to hash key into geographic coordinate
    By dominic_tran201 in forum C++ Programming
    Replies: 2
    Last Post: 02-11-2011, 10:03 AM
  2. Hash tables / hash maps
    By dlwlsdn in forum C Programming
    Replies: 3
    Last Post: 05-26-2010, 12:45 PM
  3. Replies: 12
    Last Post: 04-09-2010, 03:42 PM
  4. probability
    By sycamorex in forum Windows Programming
    Replies: 0
    Last Post: 11-25-2006, 06:10 AM
  5. probability
    By billytsc in forum C++ Programming
    Replies: 0
    Last Post: 10-18-2001, 03:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21