You are on page 1of 1

The Islamia University of Bahawalpur

Department of Computer Science


Assessment
Subject: Design & Analysis of Algorithms
Class: MCS Semester: 4th
Assessment Type: Quiz Assessment #: 5
Assignment Title Hashing Submission Date: 31-12-2020

General Assignment Guidelines:

1. Unless another format is specified for a particular assignment, all assignment submissions should be
in either .pdf format or in some format that can be read by Microsoft Word.
2. Every assignment must have attached a proper filled cover sheet / top sheet
3. Submit only your original work, copy solution will not be consider and may awarded with negative
marks

Problem 1: Define a hash table of size m to store the following set of numbers, write hash
function for each set separately in a way minimum collision will occur to store such data. If there is
any collision occur while storing these elements then provide their solution along with operational
cost (i.e. search)

Dataset Data Elements


Set – 1 4322 1234 4563 6171 6173 1473 9090 1022
Set – 2 122 211 131 311 200 333 201 303
Set – 3 3456753221 135073311 234063780 135073311

Problem 2: The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty
hash table of length 10 using open addressing with hash function h(k) = k mod 10 and
linear probing. What is the resultant hash table?

You might also like