Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 11, Problem 4P
(a)
Program Plan Intro
To identify whether family H of hash function is universal if it’s 2-Universal.
(b)
Program Plan Intro
To show that family H of hash function is universal but not 2-Universal.
(c)
Program Plan Intro
To determine that modified family H’ of hash function from family H is 2-Universal class.
(d)
Program Plan Intro
Find the probability of advisory succeeds in bob’s fooling in to accepting is at most 1/m where m is the message sent by Alice.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Prove the theorem Suppose that a hash function h is chosen randomly from a universal collection of hash functions and has been used to hash n keys into a table T of size m, using chaining to resolve collisions. If key k is not in the table, then the expected length E Œnh.k/ of the list that key k hashes to is at most the load factor ˛ D n=m. If key k is in the table, then the expected length E Œnh.k/ of the list containing key k is at most 1 C ˛.
Given a known set of keys, a perfect hash function is one that translates every key to adifferent bucket index. For example, given the set of keys {'alpha', 'beta', 'gamma', 'delta’},the following is a perfect hash function:m = 4; hash(k) = (initial letter of k - 'a') modulo 4a. Under what circumstances does it make sense to seek a perfect hash function? Explain.b. How can a perfect hash function be exploited in implementing a hash table? Explain.c. Given the following set of keys:{CA, MX, US}find a perfect hash function with m = 3,d. Given the following set of keys:{AT, BE, DE, DK, ES, FI, FR, GR, IE, IT, LU, NL, PT, SE, UK}find a perfect hash function with m < 20.
Computer Science
(a) Let h be a collision resistant hash function. Now consider the following function H that is defined for binary strings of even length. Let x = x1||x2 with x1 ∈ F2n and x2 ∈ Fn2 . Then
H(x) = h(x1 ⊕ x2).
Prove that this function is not collision resistant.
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
- Consider a hash table of size m = 8 with hash function h(k) = (3k+2) mod m. Draw the tablethat results after inserting, in the given order, the following values: 13, 49, 33, 26, 38, 87, 26,67 Handle collisions by linear probing.arrow_forwardpython In simple uniform hashing, each key is assumed to have equal probability to map to any ofthe hashes in a given table of size m. Given an open-address table of size 100 and 2random keys, what is the probability that they hash to the same value? What is theprobability that they hash to different values?arrow_forwardProve that In a hash table in which collisions are resolved by chaining, a successful searchtakes average-case time ‚.1C˛/, under the assumption of simple uniform hashing.arrow_forward
- #. Consider a hash table of size 11 with hash function h(x) = x mod 11.Draw both hash tables (Closed-Bucket and Open-Bucket) that results after inserting, in the given order, the following values: 45, 12, 35, 67, 25, 52, 88, 70, 68, 53, 55arrow_forwardConsider a CBHT (closed bucket hash table) in which the keys are student identifiers. Assume that the number of buckets m = 100 and hash function hash (id) = first two digits of id. #Starting with an empty hash table, show the effect of successively adding the following student identifiers: 000014, 990021, 990019, 970036, 000015, 970012, and 970023. Show the effect of deleting 000014 from the hash table.arrow_forwardGiven the following keys {336,121,613, 93, 63, 17, 10, 53} for insertion into a hash table, and using a hash function h(k)= k mod m, m = 11, show the resulting:(i) Quadratic probing hash table(ii) Linear probing hash table(iii) Separate chaining hash tablearrow_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_forwardProve that, under the assumption of simple uniform hashing, a successful search in a hash table with collisions handled by chaining takes average-case time.1C/.arrow_forwardSuppose we are hashing integers with 7-bucket hash table using the hash function h(i) = I mod 7. Show the resulting closed hash table with linear resolution of collisions (i.e., handling collisions with separate chaining) if the perfect cubes 1, 8, 27, 64, 125, 216, 343 are inserted.arrow_forward
- Is it always the case that a hash table of size m contains exactly m linked lists? I've been trying to understand the value of hash functions without success. Throw in a real-world case study to back up your claims.arrow_forwardGiven an array A {361,313, 163,179, 334, 659, 969, 934} and a hash functionh(x) = (x mod 11), show the results: (The answers must show where the collision occurs.) (1). Separate chaining hash table. (2). Hash table using linear probing. (3). Hash table using quadratic probing. (c1 = 0, c2 = 1) (4). Hash table with second hash function h2 (x) = 7 − (x mod 7).arrow_forwardAnswer the following questions for a hash table of size T storing n items: What are the main operations that a hash table supports and what is the average and worst time complexity, respectively, of each operation?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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