Algorithm using pseudocode

Assignment Help Basic Computer Science
Reference no: EM131189029

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.

Reference no: EM131189029

Questions Cloud

Company uses cumulative voting procedures : The shareholders of Motive Power Corp. need to elect three new directors to the board. There are 14, 600,000 shares of common stock outstanding, and the current share price is $10.95. If the company uses cumulative voting procedures, how much will it..
Total number of clock cycles : a) The clock rate for this machine is b) The total number of clock cycles consumed by the entire program is c) What speedup (expressed to two decimal places) would be obtained for this program by making the divide instructions twice as fast? Speedu..
What rate per procedure is required : You have been asked to set a rate for a Surgical-center. Costs are budgeted to be $4,000,000. Per year for projected surgical procedures of 7,000. The Surgical-center expects that 50 percent of its procedures will be Medicare and that Medicare will p..
Employee lifestyle choices and health economics : Determine the extent to which employee lifestyle choices and health economics would factor in to your chosen plan.
Algorithm using pseudocode : 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, ... sn, m the n..
Determine the population of dandelions in your yard : Describe how you would use Sampling to determine the population of dandelions in your yard. What dispersion pattern did you find for the sunflower? Why do you think this is the pattern you see?
History of project best practices : As a newly minted CIO, you have been hired to join a company without a history of project best practices. Suggest strategy and process for your Chief Executive Officer (CEO) to develop standards for your organization that is without any such organ..
Present a process map based on the description above : Present a Process Map based on the description above. If you have to assume things about the process to provide the optimal diagram, please note your assumptions below your diagram
How much should she invest in each fund : A retired woman has $120,000 to invest.  - How much should she invest in each fund if she would like to earn $12,000 per year from her investments?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explain company-s business intelligence products and service

Go to IBM.COM discover all company's business intelligence (BI) products and services Explain their process in minimum of half page to full page.

  Design a program that models the worm behavior

Design a program that models the worm behavior

  Consider a system needed to store information

Consider a system needed to store information about computers in a computer lab at a university, such as the features and location of each computer. Ascertain the domain classes that might be included within the domain model. Discuss whether or not y..

  Is there a clustering, a bimodal distribution

Do the same players excel each year? Is there a clustering, a bimodal distribution?

  Write a boolean method

A random walk begins at a point and repeatedly takes a step in a randomly chosen direction. In our version, the random walk will start at the center of a circle and continue until it goes outside the circle.

  The brazilian federal data processing service

Use the Internet to research the architectures that other government organizations and intelligence agencies use for email privacy, if any. Examine the proposed business ethical problem that the Brazilian Federal Data Processing Service is present..

  Contribution to the overall minimum

Given the M matrix and the penalties csw and cvis , give a dynamic programming algorithm that assigns a community color to each individual at each time step so that the total sum of all the penalty costs incurred by all the individuals is minimize..

  Security models and cloud operations

From the first e-Activity, analyze the industry researched for each security model would be most applicable, and explain why you believe that to be the case. Identify the security models from your findings.

  Discuss how the business requirements drove

Discuss how the business requirements drove the system's initial development. Describe the type and basic uses of the system, how the system has helped the organization, and any likely future development plans.

  Installation options for customer tracking system

Which installation options are available for the Customer Tracking System? Which would you recommend? How can you determine if implementation has been successful?

  Information that is widely available on the web

What are the benefits of using search engines, such as Google, Yahoo!, or Bing? What are some of the limitations and dangers of using information that is widely available on the Web?

  Compare and contrast the binary search trees

Compare and contrast the Binary Search Trees (BST) featuring the balancing operation implemented with the AVL trees.

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