Algorithm to minimize average difference between height

Assignment Help Data Structure & Algorithms
Reference no: EM1346953

Q1) Let the following problem. The input consists of n skiers with heights p1, p2, . . . , pn, and n skies with heights s1, s2, . . . , sn. The problem is to assign each skier a ski to minimize the average difference between the height of a skier and his/her ski. Give a greedy algorithm to solve this minimization problem. Give pseudocode and write its asymptotic running time. Prove that your algorithm is correct.

Reference no: EM1346953

Questions Cloud

Job order cost-process cost systems : Describe the similarities and differences between job order cost and process cost systems.
Job order costing system at burlington clock works : Burlington Clock Works manufactures fine, handcrafted clocks. The firm uses a job-order costing system, and manufacturing overhead is applied on the basis of direct-labor hours.
Question related to effective communication : Question related to Effective communication - describe the basic process of effective communication, show the importance of communication in providing excellent customer service
Define the magnitude of the induced electric field : The heat of vaporization of ethyl alcohol is about 200 cal/g. If 2.8kg of it were allowed to vaporize in the refrigerator, how many grams of ice would be formed from 0 °C water.
Algorithm to minimize average difference between height : The problem is to assign each skier a ski to minimize the average difference between height of a skier and his/her ski. Give pseudocode and write its asymptotic running time.
Explain why study pure competition if actual purely : Explain why study pure competition if actual purely competitive markets do not exist? What can we learn from highly competitive markets. Briefly discuss.
Explain appropriate promotions strategy : Discuss and explain about an appropriate promotions strategy for the groups listed above. In doing so compare & contrast two (2) promotions strategies.
Building effective teams - communication issues : How did the team deal with it and also, they want you to suggest a communication strategy that would have prevented these issues.
Find out the magnitude of the work for the process : A 1200 kg car carrying four 84 kg people travels over a rough washboard dirt road with corrugations 4m apart which causes the car to bounce on its spring suspension.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Explaining instruction format of operation code field

Operation code field, a mode field, to specify one of seven addressing modes, a register address field to specify one of 60 processor registers, and memory address. Specify instruction format and number of bits in each field if the instruction ..

  Computing entropy of plaintext message

Compute the entropy of the plaintext message?

  Different applications of data structure

What are the different applications of Data Structure

  Computing total number of keys needed in symmetric cipher

Determine the total number of keys that are needed for organization if symmetric cipher is used.

  Write the selection sort algorithm

Write the selection sort algorithm

  Compare the average behavior of insertion sort

Compare the average behavior of insertion sort for n elements with that of the n insertions into an initially-empty straight array implementation of a priority queue

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Determining hash value of modified file

Determine hash value of modified file look like, as compared with original hash value?

  Factors-principles considering indecency regulation issues

What factors and principles should the federal government take into account when considering indecency regulation issues?

  Write a c++ program to find the intersection

Write a C++ program to find the intersection, A set is a collection of distinct entities regarded as a unit, being either individually specified or (more usually) satisfying specified conditions.

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Data structures assignment requiring c++ program

You should build enough new roads such that if City A was reachable from City B via some old roads, City A must be reachable from City B via some new roads.

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