Demonstrate that the hash function
H(x) = (7x + 13) mod 31
is not weakly collision resistant, for H(5), by showing how easy it
is to find such a collision.
please show your work!!
Demonstrate that the hash function H(x) = (7x + 13) mod 31 is not weakly collision...
Assume a Hash table has 7 slots and the hash function h(k) = k mod 7 is used. The keys 14, 3, 11, 6, 10, 4, 20, and 17 are inserted in the table with collision resolution by chaining. Assume that the keys arrive in the order shown. (a) Show the hash table obtained after inserting all 8 keys. [Show only the final table] (b) Under the assumption that each key is searched with probability 1/8, calculate expected number of...
Suppose we use the hash function h(x) = x mod 7 (i.e. h(x) is the remainder of the division of x by 7) to hash into a table with 7 slots (the slots are numbered 0, 1,…, 6) the following numbers: 32, 57, 43, 20, 28, 67, 41, 62, 91, 54. We use chaining to handle collisions. Which slot contains the longest chain?
Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x) = x (mod () 10), show the resulting: a. Separate chaining hash table b. Hash table using linear probing c. Hash table using quadratic probing d. Hash table with second hash function h2(x) = 7 - (x mod 7) *Assume the table size is 10.
10. Submission In this question you will work with a hash table that uses double hashing. The hash table is size 11, the primary hash function is h(K)-K mod 11, and the secondary hash function is hp(K)-(K mod9) +1 Take an empty hash table. Take your student number and split it into 4 2-digit integers. Insert each of these 2-digit numbers in the order in which they appear in your student number into the empty heap. Then insert the values...
(g - 6 pts) Construct a hash table of the given array using a hash function H(K) = K mod 5. (h - 6 pts) For the hash table of (g), determine the average number of comparisons for a successful search and the worst case number of comparisons for an unsuccessful search. (i - 9 pts) Consider the elements of the array assigned to you are known only one at a time. Construct a sequence of priority queues (as max...
11. Dra The size The hash function used is: the contents of the 13 hash tables below. Show your work for partial r hash table is HOk)-k mod 7 13, 17, 6, 24, 3 a) Resolve collisions with chaining b) Double hashing, where W20)-7-0mod 5) 0 1 1 2 2 3 3 4 4 5 5 6 6 c) What is the load factor for the table a? d) What is the load factor for the table b? f) Is...
3. Given input (89, 18, 49, 58, 69), h)k(mod 10) g) Iymod 8), and a hash function f(k) h(k) +j-g(k) (mod 10), show the resulting hash table. Solve collisions with double hashing. 3. Given input (89, 18, 49, 58, 69), h)k(mod 10) g) Iymod 8), and a hash function f(k) h(k) +j-g(k) (mod 10), show the resulting hash table. Solve collisions with double hashing.
Demonstrate how you can construct an Iterative Hash h function using the Merkle- Damgard Design. Use as your compression function f:{0, 1}^v times {0, 1}^b rightarrow {0, 1}^v, AES with 512-bit keys. Explain what the values of v and b will be in your compression function and where in the block cipher (AES) are you using the blocks of the message you want to hash. Using the iterative hash function you just create above, show how a digest for a...
Given the hash function: H(key) = key/2; Hash table size = 7 and index = H(key)% Hash table size Show how the hash table below looks after adding the following (key, value) pairs, (illustrate your strategy for collision handling) (3000, “A”) (3232, “B”) (1223, “C”) (4569, “K”) (6767, “F”) (1234, “P”) (2324, “F”) (3422, “G”) (1231, “R”) index Key Value 0 1 2 3 4 5
Given input { 66, 28, 43, 29, 44, 69, 19 } and a hash function h(x) = x mod 10, show the resulting hash table: 1) Using Separate Chaining 2) Using Linear Probing 3) Using Quadratic Probing