
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Course : Data Structure and
In this Problem, you are required to insert some keys into a hash table, using given hash functions. You have to
- Draw a Hash table with the inserted keys.
Write total number of collisions encountered when a particular collision resolution technique is used.
- size=13, H(X) = sum of Ascii codes of key % HTSIZE
Keys: Mia, Bea, Zoe, Jan, Ada, Sam, Leo, Meo, Ben, Tim, Ted, Zod
Use quadratic probing:
H’(X) = [H(X) +f(i))] % HTSIZE where f(i)=i2 where i=0,1,2,….
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 3 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-science and related others by exploring similar questions and additional content below.Similar questions
- Will like for original work, please do not copy and paste from another Chegg answer. Describe a scenario where you would want a very fast hashing algorithm. Describe another scenario where you would want one that is relatively slow.arrow_forwardSuppose these names have the following hash values. Each leaf can only hold 4 entries. Insert them into the extendible hash table shown below. Note that the first two names have already been inserted. Illustrate each operation that occurs. Bob 0100 Sue 1000 Tim 1110 Ron 0010 Ann 1010 Jan 1101 Ben 0001 Don 0101 Tom 1111 Sam 1011 (1) (1) Bob 0100 Sue 1000arrow_forwardA hash table with non-negative integer keys has a modulo hash function of key % 15. Hash function index range: 0 to Ex: 5 Item 110 will go in bucket Ex: 26arrow_forward
- import hashlib def hash_function(password, salt, al): if al == 'md5': #md5 hash = hashlib.md5(salt.encode() + password.encode()) hash.update(password.encode('utf-8')) return hash.hexdigest() + ':' + salt elif (al == 'sha1'): #sha1 hash = hashlib.sha1() hash.update(password.encode('utf-8')) return hash.hexdigest() + ':' + salt elif al == 'sha224': #sha224 hash = hashlib.sha224() hash.update(password.encode('utf-8')) return hash.hexdigest() + ':' + salt elif al == 'sha256': #sha256 hash = hashlib.sha256() hash.update(password.encode('utf-8')) return hash.hexdigest() + ':' + salt elif al == 'blake2b': #blake2b512 hash = hashlib.blake2b() hash.update(password.encode('utf-8')) return hash.hexdigest() + ':' + salt else: print("Error: No Algorithm!") if __name__ == "__main__": # TODO: create a list called hash_list that contains # the five hashing algorithsm as strings # md5, sha1, sha224, sha256, blake2b hash_list =…arrow_forwardPlease solve thisarrow_forwardUsing double Hashing, insert items with keys: 69, 86, 33, 47, 17, 55 into an empty hash table. tableSize: 7 hash1(x) = x mod tableSize. hash₂(x) = R-(x mod R), R is a prime number smaller than tableSize hash1(x) + hash2(x) mod tableSizearrow_forward
- The following hash table uses linear probing for collision resolution and the hash code value calculation simply returns the full integer value of the key. Based on the data in this table, list two possible different valid orders that the data could have been inserted into it. List the inserted value order with a space between each value and no commas. 0 42 1 14 2 21 3 4 5 19 6 Blank # 1 A Blank # 2 A/arrow_forwardCSC 472 Introduction to Database Systems Project Consider the hashing approach for computing aggregations. If the size of the hash table is too large to fit in memory, then the DBMS has to spill it to disk. During the Partition phase, a hash function h1 is used to split tuples into partitions on disk based on targethash key. During the ReHash phase, the DBMS can store pairs of the form (GroupByKey -> RunningValue) to computethe aggregation. Which of the following is FALSE ? Group of answer choices The Partition phase will put all tuples that match (using h1) into the same partition. To insert a new tuple into the hash table, a new (GroupByKey -> RunningValue) pair is inserted if it finds a matching GroupByKey. A second hash function (e.g., h2) is used in the ReHash phase. The RunningValue could be updated during the ReHash phase.arrow_forwardWrite the lines of code to insert the key (book's ISBN) and value ("book") pair into "my_hash_table".arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education