Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.13. A hash function from strings to numbers derives a numerical hash value h(s) from a text string s; for example, by adding up the

1.13. A hash function from strings to numbers derives a numerical hash value h(s) from a text string s; for example, by adding up the numerical codes for the characters in s, dividing by a prime number p, and keeping just the remainder. The point of a hash function is to yield a reproducible result (calculating h(s) twice for the same string s yields the same numerical value) and to make it likely that the hash values for different strings will be spread out evenly across the possible hash values (from 0 to p 1). If the hash function has identical hash values for two different strings, then these two strings are said to collide on that hash value. We count the number of collisions on a hash value as 1 less than the number of strings that have that hash value, so if 2 strings have the same hash value there is 1 collision on that hash value. If there are m strings and p possible hash values, what is the minimum number of collisions that must occur on the hash value with the most collisions? The maximum number of collisions that might occur on some hash value?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

Job type Retail sales, managerial, human resources, etc.

Answered: 1 week ago