Discuss the optimality of your algorithm

Assignment Help Computer Engineering
Reference no: EM133368713

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, ... Sm, m the 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 m 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.

Reference no: EM133368713

Questions Cloud

Population of russia and the eurasian republics : Which of the following has/have limited the population of Russia and the Eurasian republics? What was the goal of the European Union when it was formed?
Program will return the era in the history of the usa : Rows necessary to load the information from the UnitedStatesErastxt Download UnitedStatesErastxt file and load that file into the array
What was the firm cash flow to creditors during 2022 : What was the firm's cash flow to creditors during 2022? Note: A negative answer should be indicated by a minus sign. Do not round intermediate calculations
Dance parties depicted in the kings of the world : What function do the dance parties depicted in "The Kings of the World" by Laura Mora Ortega serve?
Discuss the optimality of your algorithm : CS 627 Colorado Technical University Discuss the optimality of your algorithm. Is it guaranteed to return an optimal result? * What is the Big-O time complexity
What is the annualized return on your investment : You buy a stock for $11,500. It annually pays a dividend of $375 per year for 10 years after which you sell the shares for $9,125. What is the annualized return
What is the most you should pay for the annuity : You have a chance to buy an annuity that pays $1,200 at the beginning of each year for 8 years. You could earn 5% on your money in other investments
Write a calculator program that inputs two numbers : CSC 600 National University College Write a calculator program that inputs two numbers, defined as text fields. Create a third text field for the output
Describe events that led to the zootsuit riot : Describe the events that led to the Zootsuit riot. Elaborate on the role the media played during the Zootsuit riots.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Compare static and dynamic linking

Compare static and dynamic linking. What are the shortcomings of 3GLs in meeting the requirements of modern applications?

  What is redundant data and why should it be avoided

What are the advantages of using relational databases in the development of interactive web applications.

  Topic of mobile computing and its business implications

brief synthesis and summary of the two articles. How are the topics of the two articles related. What information was relevant and why

  Note down a command, assuming your home directory

What will the permission section of an ls -l listing for filex look like after setting the following permissions.

  Purpose of the open systems interconnection

explain when and why the International Standards Organization developed the OSI model.

  Questionwe define the escape problem as follows we are

questionwe define the escape problem as follows. we are given a directed graph g v e picture a network of roads. a

  Create the logic for a dice game

Create the logic for a dice game. The application randomly "throws" five dice for the computer and five dice for the player.

  What are the advantages of using a compiled language

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you choose to use an interpreted language?

  Write a python code that continues to ask the user to enter

Write a PYTHON code that continues to ask the user to enter numbers until enter -999. Print the total. Note: don't include-999 in the total.

  List and briefly define three classes of intruders

List and briefly define three classes of intruders. What are three benefits that can be provided by an intrusion detection system?

  What is the shell that will be used

CIT 371 Northern Kentucky University What is the shell that will be used? What value is used for the variable prefix? For bindir (fill in the value prefix

  Questionyour companys it department experiences a great

questionyour companys it department experiences a great deal of conflict in connection with its projects. there is a

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd