Question

Consider the universal hash function ha(x) = ((a * z)%p)%s for p = 7 and 8-4; e the random parameter a was chose a 2. If the

Algorithms

0 0
Add a comment Improve this question Transcribed image text
Answer #1

In the hash function ha(x) = ((a*x)%p)%s . Since a=2, therefore a*x will be the set of even number.

Now let's test the output ha(x) for x= 0,1,2,3,4,5,6 . Since p = 7 and s=4.

ha(0) = ((2*0)%7)%4 = 0 % 4 = 0

ha(1) = ((2*1)%7)%4 = 2 % 4 = 2

ha(2) = ((2*2)%7)%4 = 4% 4 = 0

ha(3) = ((2*3)%7)%4 = 6 % 4 = 2

ha(4) = ((2*4)%7)%4 = 1 % 4 = 1

ha(5) = ((2*5)%7)%4 = 3 % 4 = 3

ha(6) = ((2*6)%7)%4 = 5 % 4 = 1

So we can see that out of 4 possible output of ha(x) which are 0,1,2,3, output 3 occurs only once for x = 5 while every other output occurs twice.

Thus from above distribution of x, we get that output 3 is less probable.

Please comment for any clarification.

Add a comment
Know the answer?
Add Answer to:
Consider the universal hash function ha(x) = ((a * z)%p)%s for p = 7 and 8-4; e the random parame...
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
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