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.4, Problem 5E
Program Plan Intro
To find the nonzero value of
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Consider a hash table with open addressing with seven slots. Using the hash function h(x) = x mod 7, insert the keys (15,17,8,23,3,5) into the table in the same order. Use Linear probing and Quadratic probing for collision resolution
Show the results in the two separate tables
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.
Consider a hash table with open addressing with 11 slots. Using the hash function h(x) = x mod 11, insert the keys (52,44,56,61,64) into the table in the same order. Assume that keys 0,1,8,9 already in the table .Use Linear probing and Quadratic probing for collision resolution Show the results in the two separate tables
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 to use RSA with a known key IK to construct a cryptographic hash function H as follow: Encrypt the first block, XOR the result with the second block and encrypt again, etc. Then, the last ciphertext block is the hash value. For example, H(M,M2) = Enc(IK, Enc(IK, M,) O M2) = h. Show that this H does not satisfy the property of second image resistance. That is, we can find N1 and N2 such that H(N,N2)=h.arrow_forwarda) Consider inserting the keys 10, 22, 31, 4, 15, 28, 17, 88, 59 into a hash table of length m = 11 using open addressing with linear probing, we use the hash function h(k, i) = (k+ i) mod m.arrow_forwardGiven input {71, 22, 21, 99, 53, 69, 39} and a hash function h(x) = x mod 10, show the resulting: Hash table with double hash function (Use: h(x)=5-(x mod 5) ) and give the time complexity of search and insert operation with big-oh notation.arrow_forward
- Consider a hash table (hash function and hashing scheme) and its maincharacteristics.Which of the following is FALSE ?O A hash function's output is deterministic.O Linear Probe Hashing is the most basic hash function.O A hash table provides on average O(1) operation complexity.O A hashing scheme handles key collisions after hashing.arrow_forwardInsert into a hash table with open addressing - linear probing with size 12 and hashing function h(x) = 5x mod 12: 31, 24, 51, 73, 89, 4, 103, 21, 33, 55, 81, 62arrow_forwardConsider a hash table of size 8 and hash function: h(k) = k mod table size. In a scenario where collisions are handled by Separate Chaining, show the resulting table after inserting, in the given order, the following keys: 16, 28, 5, 32, 20 Copy the arrow below to any cell as needed. *** SETarrow_forward
- Hey, Given is a hash table with an initial size of 1000 and a hash function that ensures ahashing, where the keys are chosen randomly under the uniformity assumption.me are chosen. After how many insertions do you have to expect a collision probability of more than 80%?of more than 80%?To keep the number of collisions low during hashing, one can reduce the size of the has-hash table after a certain number of insertions. After which number n of inserted elements must the table be increased for the first time, if no collision occurred in the previous n - 1 elements and the probability of a collision in the n-th insertion should be less than 20%?arrow_forwardNow consider the opposite problem: using an encryption algorithm to construct a oneway hash function. Consider using RSA with a known key. Then process a message consisting of a sequence of blocks as follows: Encrypt the first block, XOR the result with the second block and encrypt again, etc. Show that this scheme is not secure by solving the following problem. Given a two-block message B1, B2, and its hash RSAH(B1, B2) = RSA(RSA (B1) +B2) Given an arbitrary block C1, choose C2 so that RSAH(C1, C2) = RSAH(B1, B2). Thus, the hash function does not satisfy weak collision resistance.arrow_forwardConsider an extensible hash table that uses 4-bit hash keys and stores two records per bucket. Simulate the insertion, into an initially empty hash table, of records with (hash values of) keys 1111, 1110, 1101,..., 0001, 0000, in that order. Which combination of i (the number of bits used to index the bucket array) and a set of of keys belong to one bucket at some time during the sequence of insertions? Group of answer choices i = 1; 1110 only. i = 3; 0101 only. i = 2; 1111 only. i = 3; 1000 only.arrow_forward
- A hash table with ordered linear probing maintains an order among keys considered during the rehashing process. When the keys are encountered, say, in increasing order, the performance of a failed lookup approaches that of a successful search. Describe how a key might be inserted into the ordered sequence of values that compete for the same initial table entryarrow_forward10. Consider a hash table that uses the linear probing technique with the following hash function f(x) = (5x+4)%11. (The hash table is of size 11). If we insert the values 3, 9, 2, 1, 14, 6, and 25 into the table, in that order, show where these values would end up in the table? Show all the calculations and actions that needs to perform for the values to be stored. index 0 1 2 3 4 5 8 9 10 valuearrow_forwardConsider a hash table with `n` slots and a hash function that distributes keys uniformly across the slots. Suppose `m` keys are inserted into the hash table, where `m` is much larger than `n`. What is the expected number of collisions? Assume that each key is equally likely to be hashed to any of the `n` slots, and that each key is independent of all other keys. Express your answer in terms of `n` and `m`.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