Project Specification

  • I would like a Java program that will implement the hashing schemes below. For each of the scheme, print the table after all the data values are stored, along with statistics on collisions, items unable to be stored, plus anything else you think is reasonable or useful.
  • For output, please print the array generated by each scheme. Print out 5 elements across, except schemes 7-8, which should print 3 across.
  • Write a method which handles the hashing using division. Which should accept parameters for the modulo divisor and the bucket size (for Schemes 1 to 8)
  • Write one non-trivial hashing method that does not use division (for Schemes 9 to 11)
  • Include methods to handle collisions using linear probing, quadratic probing and chaining. You may use library list methods to handle the list required for chaining.
  • For the chaining method of collision handling, use open addressing (chaining within table) with a stack to keep track of free space.
  • For quadratic probing, use c1=1 and c2= 3
  • Please include a written analysis that compares the different hashing and collision resolution techniques used for the program. And lists the pros and cons of each scheme.

Hashing Schemes:

  • Use Division modulo 120 on a table size of 120 slots (bucket size = 1), using linear probing to resolve collisions.
  • Use Division modulo 120 on a table size of 120 slots (bucket size = 1), using quadratic probing to resolve collisions.
  • Use Division modulo 120 on a table size of 120 slots (bucket size = 1), using chaining to resolve collisions.
  • Use Division modulo 113 on a table size of 120 slots (bucket size = 1), using linear probing to resolve collisions.
  • Use Division modulo 113 on a table size of 120 slots (bucket size = 1), using quadratic probing to resolve collisions.
  • Use Division modulo 113 on a table size of 120 slots (bucket size = 1), using chaining to resolve collisions.
  • Use Division modulo 41 on a table size of 40 slots (bucket size = 3), (120 total slots) using linear probing to resolve collisions.
  • Use Division modulo 41 on a table size of 40 slots (bucket size = 3), (120 total slots) using quadratic probing to resolve collisions.
  • Use your hash function on a table size of 120 slots (bucket size = 1), using linear probing to resolve collisions.
  • Use your hash function on a table size of 120 slots (bucket size = 1), using quadratic probing to resolve collisions.
  • Use your hash function on a table size of 120 slots (bucket size = 1), using chaining to resolve collisions.

Other Requirements

  • All Input and output should be in separate named text files (eg .. input.txt, output.txt)
  • The program should have one driver class that executes the whole code.
  • The code should be standard JAVA. Java 7 or Java 8
  • Keyboard input is not allowed.
  • GUI is not allowed
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.