Question

In: Computer Science

Design a universal hashing scheme using matrix operations.

Design a universal hashing scheme using matrix operations.

Solutions

Expert Solution

UNIVERSAL HASHING

  • A universal hash function H is set of hash function with following bound on collisions.
  • When any hash function h H is chosen randomly from H, the probability of collision of any two keys (key i and key j) is bounded as follows:

The number of collisions of key i with any other key can be bounded.

  • Constructing a hash function with this property is not as difficult as it might seem.
    • The crux is having the means to randomize the selection.
  • EXAMPLE: Consider a set of functions F.
    • , Where
  • F is a class of 100 distinct functions, which vary based on some parameter  
  • If we can randomly select i, then we can randomly select function F.

Designing a universal hashing using matrix:

  • Assume
    • Keys are u-bits long.
    • Table size m is a power of 2, m=2b
  • Define hash function h in terms of random 0-1 matrix H, that is b x u.
  • EXAMPLE:

M=4 , H    k Hk

keys:3-bits    ​​​​​​​   

Advantage:This is a universal hash ,i.e,

Disadvantage: Hash computation cost: O(log2  m x log1 |k|)


Related Solutions

Design a hashtable with fundamental operations by using two types of hashing and collision avoidance. (a)...
Design a hashtable with fundamental operations by using two types of hashing and collision avoidance. (a) Design two types of hashing, the first is a simple hash that can be completed with O(1), but it may cause collisions; the second hash is a double hash can be completed with O(1). Put the details of your hash function and analysis in codes comments. (b) When your first hash function has collisions, using separate chaining to solve the collision.
What is Universal Design? Describe the difference between Universal Design of learning and Universal design of...
What is Universal Design? Describe the difference between Universal Design of learning and Universal design of instruction. Create a product, communication, or company according to the principles of Universal Design. How can we promote cultural competence and uphold diversity and inclusion as healthcare professionals?
How is a 2-universal hashing family both uniform and universal? How does this show that any...
How is a 2-universal hashing family both uniform and universal? How does this show that any universal family is not always 2-universal?
find solutions to the following using Excel's matrix operations?
find solutions to the following using Excel's matrix operations?
What is matrix notation and all the matrix operations?
What is matrix notation and all the matrix operations?
Design a memory management scheme for a 48 bit architecture, using various types of paging and/or...
Design a memory management scheme for a 48 bit architecture, using various types of paging and/or segmentation. You should include a clear translation scheme from a 48 bit logical address to a 48 bit physical address including a picture that shows this translation procedure. Then highlight its advantages and disadvantages.
Using Excel matrix operations to balance the following equation xC8H16 + yO2 --> zCO2 + tH2O
Using Excel matrix operations to balance the following equation xC8H16 + yO2 --> zCO2 + tH2O
List the three alternate ways of describing Universal design
List the three alternate ways of describing Universal design
When designing LTC Environments, explain the theories of: a. Supportive Design b. Universal design
When designing LTC Environments, explain the theories of: a. Supportive Design b. Universal design
Suppose that we are using extendable hashing on a file that contains records with the following...
Suppose that we are using extendable hashing on a file that contains records with the following search-key values: (2, 3, 5, 7, 11, 17, 19, 23, 29, 31). Show the final extendable hash structure for this file if the hash function is h(x) = x mod 8 and buckets can hold three records. Recall that: 1. the bucket address table is indexed by the prefix of the binary representation of h(x). 2. Initially i = 0, i.e. the prefix consists...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT