
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Given the array of size 13, and the hashing function h(x) = x%13, at which array location would data with key value 33 be stored? Assuming 45 and 71 have already been inserted in the array and the quadratic probing is used for collision.
Question options:
|
A. 7 |
|
B. 10 |
|
C. 9 |
|
D. 2 |
|
E. 11 |
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.Similar questions
- Using the values provided below, show the hash key and what the hash table will look like when using the two different techniques indicated. The hash function used is based upon the first letter of the person's last name. The array size is 27 Index 0 is not used The letter 'A' will go to index 1, 'B' to index 2, etc Separate chaining Open addressing with linear probing i_table = ( h(k) + j ) mod S where i is the index of the underlying array,h is the hash function,j is the iteration of the probe, andS is the size of the table Values needing to be hashed (in order from top to bottom) Big Bird The Penguin Jackie Chan The Joker The Riddler Lewis Carroll Arthur Doyle Clark Kent Clive Lewis Lois Lane Yogi Bear Charles Dickens Geoffrey Chaucer Mr Ranger William Shakespeare John Tolkien Fred Rogersarrow_forwardYou are asked to insert the following values into the hashing table size 9: 9, 18, 19, 27, 8, 17. Use linear probing if there is a collision. Your answer will be in the form of the order of inserted elements. The order of inserted elements:: 9 18 19 - - 27 8 - 17 The order of inserted elements: 9 18 19 27 - - 17 - 8 O The order of inserted elements: 9 18 19 27 17 - - -8 O The order of inserted elements: 9 18 19 27 8 - -17 -arrow_forwardGiven the following hash map array of size 10 (horrible array sizell) and a hashing function of num%arraysize: Array: 1 2 3 4 6. 30 43 54 25 27 If you were to next insert 73 into the map using linear probing, what index would it be placed at?arrow_forward
- 1. Suppose you use hashing with separate chaining. The array is size 7, and the hashing function is hash(k) = k % 7. What is the result of putting these keys into the hash table in this order: 18, 11, 20, 12, 22, 25. 2A. Repeat Question 1, but using hashing with linear probing instead. Don't resize. B. Suppose we have put these keys in Question 2A. What is the result if we now delete 18?arrow_forward8. Insert the following keys one-by-one into an initially empty hash table of size 7. Use the hash function h(x) = x mod 7 Show the result for {10, 1, 18, 15, 26, 11, 19} (a) a separate chaining hash table (do not rehash if the load factor becomes too large). (b) a table with linear probing, i.e. using the probing function f(i) = i. For parts (c) and (d), it is possible that you will not be able to insert some of the keys into the table. If you find such a key, rehash the table into a new table of size 11. You need to modify the hash function h(x) accordingly to adjust for the new table size. You do not have to change g(x) for part (d). Do not rehash earlier for any of the tables (even if the load factor becomes too large). (c) a table with quadratic probing, i.e. using the probing function f(i) = i² (d) a table that uses double hashing with a secondary hash function, i.e. f(i) = i* g(x), where the secondary hash function is g(x) = 5 - (x mod 5).arrow_forward2. Suppose you have the following hash table, implemented using linear probing. The hash function we are using is the identity function, h(x) = x. 0 9 1 A B с D E 18 2 3 4 S 12 3 14 7 8 a) In which order could the elements have been added to the hash table? There are several correct answers, and you should give all of them. Assume that the hash table has never been resized, and no elements have been deleted yet. 12, 14, 3, 9, 4, 18, 21 12, 9, 18, 3, 14, 21,4 12, 3, 14, 18, 4, 9, 21 9, 12, 14, 3, 4, 21, 18 9, 14, 4, 18, 12, 3, 21 6 4 21arrow_forward
- Show the result when we insert the keys 5; 28; 19; 15; 20; 33; 12; 17; 10 into a hash table with collisions resolved by linked list at each slot. Let the hash table have 9 slots, and let the hash function be h(x) = (2x+1) mod 9. (You are expected to draw the final hash table)arrow_forwardUse the following values to answer the questions bellow 66 47 87 900 126 140 145 500 177 285 393 395 467 566 620 735Store the values into a hash table with ten buckets, each containing three slots. If a bucket is full, use the next (sequential) bucket that contains a free slot.arrow_forwardAnswer the following ture or false question 1. The 9-entry hash table that results from using the hash function, h(i) = (2i+7) mod 9, to hash the keys 12, 5, 13, 4, 10, 19, 8, 3, and 28, assuming collisions are handled by linear probing as follows: 0 1 2 3 4 5 6 7 8 10 19 3 28 12 8 13 4 5 Group of answer choices True False 2. Here is how the built-in sum function can be combined with Python’s comprehension syntax to compute the sum of all numbers in an n x n data set, represented as a list of lists: sum(sum(subset) for subset in data) Group of answer choices True False 3. Here is the comparison for asymptotic growth rate: (logn) < (n) < (nlogn) < (n^2) < (n^3) < (2^n) Group of answer choices True False 4. Here is the Python’s list comprehension syntax to produce the list of this 26 characters ['a', 'b', 'c', ..., 'z']: [chr(k) for k in range(97, 123)] Group of answer choices True Falsearrow_forward
- Given the hash function: h(i) = i % 13Show the array after inserting the following keys: 18, 41, 22, 44, 59, 32, 31, 73, in this order. Use linear probing to resolve collisions.arrow_forwardLinear hash index:Consider the Extendible Hashing index shown in figure below.A bucket is split each time an overflow page gets created Show the state of the index after each operation:a) Insertion of entry 2b) Insertion of entry 40c) Insertion of entry 39arrow_forward3. Consider an example of hash table of size 30, and the following items are to be stored. Design the hash table and the final array in the obtained indexes. (14, 22) (11, 18) (52,71) (41, 20) (30, 29) (33,64)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

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...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

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
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY