Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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 S. . Part 1 (1 points): How large is the universe size U? . Part 2 (9 points): You decide to use the following hash function h:U-> [1 220] Pick twenty random pixels pi, P2,.., p2o. So for example, p1 might end up being the pixel at position (10,20) Given any image I, compute h(I) as follows * 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 [I1...220 The question: Argue that h is not universal by exhibiting a pair of images 11, 12, for which Pr[h(h) = h(b) is significantly larger than 1/220. (State what the probability is.) 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 S. . Part 1 (1 points): How large is the universe size U? . Part 2 (9 points): You decide to use the following hash function h:U-> [1 220] Pick twenty random pixels pi, P2,.., p2o. So for example, p1 might end up being the pixel at position (10,20) Given any image I, compute h(I) as follows * 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 [I1...220 The question: Argue that h is not universal by exhibiting a pair of images 11, 12, for which Pr[h(h) = h(b) is significantly larger than 1/220. (State what the probability is.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago