Case study: An event company asks you to design the data structure and program prototype for their running event system. The participant for the running event is expected to reach more than 1000 in various categories. You decided to use hashing function method to store the information for each participant's BIB number in the hash table. To begin the problem solving, suppose that 10 registered runners need to be stored in a hash table, HT, with a size of 13. The sample BIB number of the runners are: 101, 102, 103, 104, 107, 111, 121, 217, 157, and 185. Furthermore, you set the hash function to determine the index of the participant in the HT as: hash (BIB) = BIB % table size (or 13) However, if the hash index given by hash(BIB) is already occupied (collision), the linear probing hash function will be used as: hash (BIB) = (Hash(BIB)+1) % 17 and, further collision with hash function: hash (BIB) = (Hash (BIB)+2) % 17 or, hash(BIB) = (Hash(BIB) + n) % 17, where n is probe increment. Refer to the given function description. According to the above requirements, create a program to 1. store the participant's BIB number in the hash table, and 2. find a bib number 3. print out the content of the hash table. Given the description of the following function: Hash function to calculate the index based on the given bib, linear probe and Hash Table size, tableSize @param bib is the number of a participant @param probe if probe is 0 then index bibitableSize -else if probe>0 then index (hash (bib) +probe) $17 @param table Size - HT size @return index "/ int Hash (int bib, int probe, int tableSize) {
Case study: An event company asks you to design the data structure and program prototype for their running event system. The participant for the running event is expected to reach more than 1000 in various categories. You decided to use hashing function method to store the information for each participant's BIB number in the hash table. To begin the problem solving, suppose that 10 registered runners need to be stored in a hash table, HT, with a size of 13. The sample BIB number of the runners are: 101, 102, 103, 104, 107, 111, 121, 217, 157, and 185. Furthermore, you set the hash function to determine the index of the participant in the HT as: hash (BIB) = BIB % table size (or 13) However, if the hash index given by hash(BIB) is already occupied (collision), the linear probing hash function will be used as: hash (BIB) = (Hash(BIB)+1) % 17 and, further collision with hash function: hash (BIB) = (Hash (BIB)+2) % 17 or, hash(BIB) = (Hash(BIB) + n) % 17, where n is probe increment. Refer to the given function description. According to the above requirements, create a program to 1. store the participant's BIB number in the hash table, and 2. find a bib number 3. print out the content of the hash table. Given the description of the following function: Hash function to calculate the index based on the given bib, linear probe and Hash Table size, tableSize @param bib is the number of a participant @param probe if probe is 0 then index bibitableSize -else if probe>0 then index (hash (bib) +probe) $17 @param table Size - HT size @return index "/ int Hash (int bib, int probe, int tableSize) {
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![Case study:
An event company asks you to design the data structure and program prototype for their running
event system. The participant for the running event is expected to reach more than 1000 in
various categories. You decided to use hashing function method to store the information for each
participant's BIB number in the hash table.
To begin the problem solving, suppose that 10 registered runners need to be stored in a hash
table, HT, with a size of 13. The sample BIB number of the runners are: 101, 102, 103, 104, 107,
111, 121, 217, 157, and 185.
Furthermore, you set the hash function to determine the index of the participant in the HT as:
hash (BIB) = BIB % table size (or 13)
However, if the hash index given by hash(BIB) is already occupied (collision), the linear probing
hash function will be used as:
hash (BIB) = (Hash (BIB)+1) % 17
and, further collision with hash function:
hash (BIB) = (Hash(BIB)+2) % 17
or, hash(BIB) = (Hash (BIB) + n) % 17, where n is probe increment. Refer to the given function
description.
According to the above requirements, create a program to
1. store the participant's BIB number in the hash table, and
2. find a bib number
3. print out the content of the hash table.
Given the description of the following function:
1+
Hash function to calculate the index based on the given bib,
linear probe and Hash Table size, tableSize
@param bib is the number of a participant
@param probe if probe is 0 then index
bibitablesize
-else if probe>0 then index (hash (bib) +probe) #17
@param table Size - HT size
@return index
+/
int Hash (int bib, int probe, int tableSize) {
}](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6669a35d-d21a-4fa5-892d-738e8d72b17c%2Fb99cb40b-e90e-4c0e-b78d-65faf2218aa5%2F4lnrlr_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Case study:
An event company asks you to design the data structure and program prototype for their running
event system. The participant for the running event is expected to reach more than 1000 in
various categories. You decided to use hashing function method to store the information for each
participant's BIB number in the hash table.
To begin the problem solving, suppose that 10 registered runners need to be stored in a hash
table, HT, with a size of 13. The sample BIB number of the runners are: 101, 102, 103, 104, 107,
111, 121, 217, 157, and 185.
Furthermore, you set the hash function to determine the index of the participant in the HT as:
hash (BIB) = BIB % table size (or 13)
However, if the hash index given by hash(BIB) is already occupied (collision), the linear probing
hash function will be used as:
hash (BIB) = (Hash (BIB)+1) % 17
and, further collision with hash function:
hash (BIB) = (Hash(BIB)+2) % 17
or, hash(BIB) = (Hash (BIB) + n) % 17, where n is probe increment. Refer to the given function
description.
According to the above requirements, create a program to
1. store the participant's BIB number in the hash table, and
2. find a bib number
3. print out the content of the hash table.
Given the description of the following function:
1+
Hash function to calculate the index based on the given bib,
linear probe and Hash Table size, tableSize
@param bib is the number of a participant
@param probe if probe is 0 then index
bibitablesize
-else if probe>0 then index (hash (bib) +probe) #17
@param table Size - HT size
@return index
+/
int Hash (int bib, int probe, int tableSize) {
}
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY