Question

1. Using closed hashing with double hashing to resolve collisions insert the following keys into a...

1. Using closed hashing with double hashing to resolve collisions insert the following keys into a table with 11 slots, numbered 0 through 10. The hash functions to be used are H1(k)k(mod11) and H2(k)- Rev(k + 1) (mod11) The function REV reverses the decimal digits like Rev(376) 673. Show the hash table after all nine keys have been inserted. Be sure to indicate how H1 and H2 are used. Keys: 4, 3, 2, 8, 33, 17, 24, 35, 46

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
1. Using closed hashing with double hashing to resolve collisions insert the following keys into a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Double hashing is scheme for resolving collisions that uses two hash functions HCk, m) and hCk,m)....

    Double hashing is scheme for resolving collisions that uses two hash functions HCk, m) and hCk,m). It is similar to linear hashing except that instead of changing the index by 1, the value of the second hash function is used From the view of the general scheme, the Io(k, mHCk, m) Hi(k, m) -(H(k, m)+ h(k,m)) mod m H2 (k, m) = (H(k, m)+ 2 h(k,m)) mod m hash functions are. Hi (k, m) (H(k , m)+ h(k , m))...

  • Part 5. Suppose that your hash function resolves collisions using the open addressing method with double...

    Part 5. Suppose that your hash function resolves collisions using the open addressing method with double hashing. The double hashing method uses two hash functions h and h'. Assume that the table size N = 13, h(k) = k mod 13, h'(k) = 1 + (k mod 11), and the current content of the hash table is: 0 1 2 3 6 7 8 9 10 11 12 4 17 5 98 If you insert k = 14 to this...

  • 5. Hashing (a) Consider a hash table with separate chaining of size M = 5 and...

    5. Hashing (a) Consider a hash table with separate chaining of size M = 5 and the hash function h(x) = x mod 5. i. (1) Pick 8 random numbers in the range of 10 to 99 and write the numbers in the picked sequence. Marks will only be given for proper random numbers (e.g., 11, 12, 13, 14 ... or 10, 20, 30, 40, .. are not acceptable random sequences). ii. (2) Draw a sketch of the hash table...

  • 3. (20 points) In open addressing with double hashing, we have h(k,i) hi(k)+ih2(k) mod m, where h...

    3. (20 points) In open addressing with double hashing, we have h(k,i) hi(k)+ih2(k) mod m, where hi(k) and h2(k) is an auxiliary functions. In class we saw that h2(k) and m should not have any common divisors (other than 1). Explain what can go wrong if h2(k) and m have a common divisor. In particular, consider following scenario: m- 16, h(k) k mod (m/8) and h2(k)-m/2 and the keys are ranged from 0 to 15. Using this hash function, can...

  • Insert elements into a hash table implemented using chain hashing, as an array of linked list...

    Insert elements into a hash table implemented using chain hashing, as an array of linked list in which each entry slot is as a linked list of key/value pairings that have the same hash (outcome value computed using certain hash function). You are allowed to use “Hash Function”, h(k) = k % x where, x is the value you will need to decide to use, that you find appropriate for this implementation. The main requirements are the following: 1. Input:...

  • 05. 6 points) Complete the following hash table using closed hashing with quadratic probing.M- 19...

    05. 6 points) Complete the following hash table using closed hashing with quadratic probing.M- 19. Follow the sequence of insertions, searches and deletions in the operations table, filling in the sequence of probes and whether the operation succeeded. Hash Table Index Value Operation Insert Insert 2 Insert 26 Insert 46 Insert 83 Search 45 Search 29 Delete 46 Insert 6 Insert 102 Search 8 Probe Success? (YIN) 10 15 16 17 18 05. 6 points) Complete the following hash table...

  • 1. Suppose that a hash table contains hash_size = 13 entries indexed from 0 through 12...

    1. Suppose that a hash table contains hash_size = 13 entries indexed from 0 through 12 and that the following keys are to be mapped into the table: 24    34    33    55    46    38    37 The hash function determines the hash address by first summing all digits of a key (in ordinary decimal representation) and then applying % hash_size.    Answer the following questions. Assume that double hashing g(k) = 7 – (k mod 7) is used. Present the hash table...

  • Problem 7 Given the following keys 16, 27, 52, 38, 10. 67. 56, 32, 4, 71.33,...

    Problem 7 Given the following keys 16, 27, 52, 38, 10. 67. 56, 32, 4, 71.33, 15. Assume address is calculated by K% 17 l. (6%) Calculate the home addresses of the given keys: (4%)Show the contents of the hash table, using progressive overflow"?lysM) collisions where M 17 2. to resolve 0 10 12 13 6 14 16 (2%) Assuming that every key has the same probability number of accesses to look for a key in the table you built...

  • Implement a software program in C++ t stores and searches the Student records using double-hashing algorithm.  Double...

    Implement a software program in C++ t stores and searches the Student records using double-hashing algorithm.  Double hashing uses the idea of applying a second hash function to key when a collision occurs.   The software program will be based on the following requirements: Development Environment: If the software program is written in C++, its project must be created using Microsoft Visual Studio 2017. If the software program is written in Java, its project must be created using NetBeans v8.2. Algorithm: If...

  • Please select file(s) Select file(s) Q9 Double 15 Points Consider inserting the keys 10, 22, 31,...

    Please select file(s) Select file(s) Q9 Double 15 Points 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 the auxiliary hash function l'(k) = k. Illustrate the result of inserting these keys using linear probing, using quadratic probing with c1 3, and using double hashing with h1(k) = k and h2(k) = 1 + (k mod (m – 1)). See Cormen p.272 1 and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT