Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 Problem 2 (10 points total) Let's say you have a set S of n keys, all of which are in the universe U [1..26].
2 Problem 2 (10 points total) Let's say you have a set S of n keys, all of which are in the universe U [1..26]. (As always, assume n much less than JU|) You want to build a dictionary for the set S. You decide to pick your hash function h [1.. .264]-> [1..n in the following way: Let b*- Rand (1....n) For all x let h(x)-11 mod n. The Problem: For every question below, you should briefly explain your answer. Part 1: (5 points) Show that this is not a universal hash function by showing two keys that have a high probability of collision. (state what that probability is.) . Part 2 (3 points): Show a set S of n keys such that with probability at least 1/3, n/2 keys in S all collide in the same spot (ie, there are n/2 keys in S that all hash to the same number.) Part 3 (2 points): For the set S in part 2, what would be expected time to do a search in this hash table in big-O notation
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started