3 Problem 3 (10 points total) You have a set S of 220 (about a million) black and white images. Each image is 30x30 pixels, and each pixel is either white or black. You want to build a dictionary that will allow you to search whether a given image is already in » Part 1 (1 points): How large is the universe size U? ·Part 2 (9 points): You decide to use the following hash function 220] [1 Pick twenty random pixels pı,P2 end up being the pixel at position (10,20) Given any image I, compute h(I) as follows : U , p20. So for example, pı might , k we will construct a 20-bit number from I. Check whether I is black or white at pixel pı: if black, make the leading digit a 0, if white make it a 1. Check whether I is black or white at p2 to determine the second digit, and so forth. Let h(I) be the resulting 20-bit number. Note that because h(I) is 20 bits, we indeed have h(I) E [1...20 The question: Argue that h is not universal by exhibiting a pair of images I, /2, for which Pr[h(1i) -h(/2)] is significantly larger than 1/220. (State what the probability is.)

3 Problem 3 (10 points total) You have a set S of 220 (about a million) black and white images. Each image is 30×30 pixels, and each pixel is either white or black. You want to build a dictionary that will allow you to search whether a given image is already in » Part 1 (1 points): How large is the universe size U? ·Part 2 (9 points): You decide to use the following hash function 220] [1 Pick twenty random pixels pı,P2 end up being the pixel at position (10,20) Given any image I, compute h(I) as follows : U , p20. So for example, pı might , k we will construct a 20-bit number from I. Check whether I is black or white at pixel pı: if black, make the leading digit a 0, if white make it a 1. Check whether I is black or white at p2 to determine the second digit, and so forth. Let h(I) be the resulting 20-bit number. Note that because h(I) is 20 bits, we indeed have h(I) E [1…20 The question: Argue that h is not universal by exhibiting a pair of images I, /2, for which Pr[h(1i) -h(/2)] is significantly larger than 1/220. (State what the probability is.)



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *