> 0. Assume a 10 million message archive. > 1. What percentage of permalinks need another click? > 2. What percentage of permalinks will result in a list of more than 10 > matches?
Ignoring cross posts, for a 4 character hash: 1. Approximately 90% 2. Approximately 50% Ignoring cross posts, for a 13 character hash: 1. Effectively 0% 2. Effectively 0% Pick message count and collision tolerance, and hash size will follow. -Jeff ========== simulation code #!/usr/bin/python import random hashlength = 4 message_count = 10000000 database = {} collisions = 0 for i in range(message_count): n = random.randint(0, pow(2, 5 * hashlength)) if n in database: collisions += 1 database[n] += 1 else: database[n] = 1 over_ten_collisions = 0 for i in database: if database[i] > 10: over_ten_collisions += database[i] p1 = (100.0 * collisions) / float(message_count) p2 = (100.0 * over_ten_collisions) / float(message_count) print("Percent coliisions %f" % p1) print("Percent over ten collisions %f" % p2) _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9