Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You have stored a huge number of images, and you are running out of disk space.

ID: 3853021 • Letter: Y

Question

You have stored a huge number of images, and you are running out of disk space. 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. Your algorithm should be as efficient (in space and running time) as possible. Assume images are stored as raw data. That is, images are given as matrix of pixels, and for each pixel, we are given the RGB values, as numbers between 0 and 255. If you prefer, think about these images as ASCII documents that you could read sequentially, one character after the other. Assume that beside the memory used for storing the files, you could use only 1MB of fast-access memory. of data. You have over 10000 files, each over a 2GB long.

Explanation / Answer

You can use any already existing hash functions to do this.

Hope this helps.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote