Need a Coder -- 2
Budget: $10 – $30 USD
Every J Number consists of the letter J
followed by 8 digits. For example, “J12345678”.
The project is to create a custom hash function for J Numbers. You’re only interested in the
function’s performance: how well it avoids collisions without any collision resolution. No
need to create a hash table, only create the hash function and test it in the following four ways:
• 100 randomly generated J Numbers hashed for an array with a length of 127.
• 500 randomly generated J Numbers hashed for an array with a length of 512.
• 1000 randomly generated J Numbers hashed for an array with a length of 1024.
• 25000 randomly generated J Numbers hashed for an array with a length of 27000.
Keep track of how many times a collision occurred in both cases. You could create
arrays of the appropriate length and increment each index that is the result of the hash function. If, at
the end of the test, index 4 contained a 3, it means there were two collisions for that index.
followed by 8 digits. For example, “J12345678”.
The project is to create a custom hash function for J Numbers. You’re only interested in the
function’s performance: how well it avoids collisions without any collision resolution. No
need to create a hash table, only create the hash function and test it in the following four ways:
• 100 randomly generated J Numbers hashed for an array with a length of 127.
• 500 randomly generated J Numbers hashed for an array with a length of 512.
• 1000 randomly generated J Numbers hashed for an array with a length of 1024.
• 25000 randomly generated J Numbers hashed for an array with a length of 27000.
Keep track of how many times a collision occurred in both cases. You could create
arrays of the appropriate length and increment each index that is the result of the hash function. If, at
the end of the test, index 4 contained a 3, it means there were two collisions for that index.