CSCI312: Hashing

In this assignment, you will design a hash function suitable for use in the GetHashCode/hashCode method of a C#/Java object that represents a student. The use-case for this algorithm is within a classroom-based application where the maximum room capacity is less than 50 seats. Because of this, the hashing algorithm is to be designed to map an 8- digit student id (1 to 99,999,999, inclusive) into a 2-digit space (0-99, inclusive). Using the student number as a perfect hash is impractical as it is 8-digits long, (the resulting array would be quite large since the student id would consume 3.2 GB of RAM itself).  Since the student id is a unique identifier, a hashing function will be developed to map the student id into a smaller space of just 100 elements (0 to 99). Develop a hash algorithm to accomplish this task.


Demonstrate your solution using the following values for the StudentId: 99,999,999, 99,999,999, 75,000,000, 50,000,000, 25,000, 15,000, 10,000, 5000, and 1.


You may use C++, VB, C#, or Java to implement this program as long as the following requirements are met. A C++, VB, or C# project must be created using Visual Studio 2019. Java programs must be created in the Eclipse project format or provided in source code form with instructions on how to compile and run the program. Regardless of the language used, the entire project must be submitted as a single ZIP file that contains the project folder, source code, and documentation.

Need a custom answer at your budget?

This assignment has been answered 6 times in private sessions.

© 2020 Codify Tutor. All rights reserved