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

4. You have n files with data on your hard drive, files have sizes m? GB,.. mn G

ID: 3713859 • Letter: 4

Question

4. You have n files with data on your hard drive, files have sizes m? GB,.. mn GB. You want to save them on clouds for backup. You have accounts on K file hosting services. On each of these services first p GB are free, and you have to pay if you exceed the limit. You want to save your files on that clouds in such a way that you do not have to pay for additional space. Is it possible to do so? If the answer is yes, how to do it? Represent this problem as an algorithmic problem. What is this algorithmic problem? Is it possible to solve it in a polynomial time? What algorithm would you use to find a solution? Explain you answers.

Explanation / Answer

Solution:

Yes, it is possible to do so.

How to do it?

We will arrange the files in such a way that the capacity of each stack is smaller than or equal to p and then we will push the stack of files on the servers.

This problem can be represented as algorithmic problem as given below:

This algorithmic problem is almost same as bin packing problem.

Yes, it can be solved in polynomia time.

Algorithm:

I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)

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