Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

The multimedia/mobile company you work for is currently attempting to transfer large media files from older disks to newer disks (on various servers). The task of simply copying over all of these files in any haphazard order is fairly straightforward; however, you believe that you can improve upon a haphazard approach and hope to improve the efficiency of storage space on the new disks. You have a collection of m disks, but you believe that if you smartly organize the media files onto the disks, you may not need to use all m disks.

You plan to design a greedy algorithm to efficiently transfer media to storage devices. Note that this is an optimization problem. Optimization problems have a general structure and consist of some quantity to be maximized or minimized under some list of constraints. In this problem, you have n files (f1, ..., fn) with corresponding sizes (in MBs) s1, ... sn. Your goal is to store these files onto m disks, d1, ..., dm, that have corresponding storages amounts t1, ..., tm. Note that one file cannot be spread across multiple disks. In this problem, the goal is to minimize the amount of storage that is not used on each disk (that is used). This should also minimize the total number of number of disks being used. That is, you would like to fill up each disk as much as possible while leaving a minimally small amount of unused storage. (In the perfect case, each disk would be perfectly filled, and there would be no unused storage.) If there are any disks left unused, you will be able to return them for a refund.

Part 1

  • Design a greedy algorithm using pseudocode that solves this optimization problem of transferring files to disk while minimizing unused storage. The inputs to this algorithm are the number of files n, corresponding sizes (in MBs) s1, ... snthe number of disks, and corresponding storages amounts t1, ..., tm. The algorithm should return an array map [i] which contains the disk index of which the ith media file should be stored.
  • Comment your pseudocode for increased readability.

Part 2

  • Discuss the optimality of your algorithm. Is it guaranteed to return an optimal result?
  • What is the Big-O time complexity of this algorithm in terms of and n? Justify your answer.

Part 3

  • If you were to solve this problem using a brute force or exhaustive search method, what would be the time complexity? Justify your response.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91945116
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Show how an 8x1 multiplexer can be constructed from 4x1

Show how an 8x1 multiplexer can be constructed from 4x1 multiplexers and 2x1 multiplexers and no logic gates.

Analyze the time complexity of the following ternary search

Analyze the time complexity of the following ternary search algorithm: identify two points that subdivide a sorted array into three parts. If the given number is equal to one of these two points, we are done. Otherwise, ...

Question part 2 1using the major business performance

Question: Part 2: 1. Using the major business performance management (BPM) processes, describe the general process of how the case study organization will collect data that are relevant to the following: • Strategize • P ...

Naomi always eats bagels with 1 ounce of cream cheese each

Naomi always eats bagels with 1 ounce of cream cheese. Each bagel eaten in this way provide 15 units of utility. Excess cream cheese or excess bagels do not add to Naomi's utility. Explain the nature of Naomi's utility f ...

Question is it ethical for a potential employer to use the

Question: Is it ethical for a potential employer to use the Internet this way? Is it legal? What if an angry ex-boyfriend or ex-girlfriend posted some things, pretending to be you? How might this affect your chances for ...

Question suppose you work in the it department of global

Question : Suppose you work in the IT department of Global Hotels, a multinational hotel chain. Global Hotels runs several specialized business support systems, including a guest reservations system that was developed in ...

Is there any drawbacks to hashingwhat is hash value and why

Is there any drawbacks to hashing? What is hash value and why do you think that it is important

Write a program to calculate the average temperature for

Write a program to calculate the average temperature for the year and determine the hottest month of the year. In your main method, the program should collect the user input of the average Fahrenheit temperatures for eac ...

Going to concerts and reading books take time and money

Going to concerts and reading books take time and money. Suppose a book costs $10 and takes 3 hours to read and a concert costs $20 and takes 3 hours. For a person with $80 to spend and 18 hours for these activities: a. ...

When talking about economics and the history of it for the

When talking about Economics and the history of it. For the past recessions the U.S. has had, do we look at it mostly on the loan side of the banks or what causes most recessions?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As