Question: Explain how you would use hash functions to find if your computer contains two identical image files (possibly under different names). Give a pseudocode of
Explain how you would use hash functions to find if your computer contains two identical image files (possibly under different names). Give a pseudocode of your solution. Specify which and how your hash functions are used. Do not use values provided by the file system. Assume that two images M and M' arc considered identical if there is some constant beta such that each pixel of M is obtained the corresponding pixel of M' after multiplying it by beta. That is, M[i, j] = beta middot M'[i, j] for every i, j. Think about beta for example as changing the intensity of the image. Ignore the effect of numeric computation errors caused by truncation. That is, on you computer, (miracle), beta(k/beta) = k, for any integer k. For example, 3(1/3) = 1 and not 0.99999. You could assume that the blue and red values always equal to zero. So M[i, j] is the value of the green level at pixel [i, j]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
