A Hashing based retrieval system for digits images.
A hash table is a data structure which implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of slots, from which the desired value can be found. Due to the imperfection of hash functions; collisions can occur sometimes in our hash table.To overcome this collision we used separate chaining method and linear probing method.
Given an image as an array of integers, a hash code is computed for every image. The computed hash codes will be used to populate a hash table.
For retrieval purposes an array is given that represents an image. Then you will be asked to:
- know its label if it was previously inserted.
- add it to the hash table.
- remove it from the hash table.
A text file is provided containing the images (in the form of a vector with the last element in the vector being the image ID) to be put in the hash table. Hash collision issues are solved using both linear probing and separate chaining. With a given image check in the hash table if it is present or not,if it is present then the ID retrieved is returned to check if your retrieval was correct or not. Data set is from the THE MNIST DATABASE of handwritten digits.