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

  Evaluate the average complexity of an enqueue operation

Evaluate the average complexity of an enqueue operation. Determine the average complexity of the dequeue (remove) operation.

  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.

  Algorithm to divide sixteen digit value by six digit integer

Divide 16 digit value N by six digit integer D obtaining quotient Q and remainder (or sign of the remainder) R by division algorithms.

  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

  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.

  Different applications of data structure

What are the different applications of Data Structure

  Decrypting the ciphertext to recover the plaintext

If you get ciphertext message YPHDCRPBEQTAA, decrypt to recover plaintext.

  Determining public keys for other party in sending message

Determine correct public keys for other party, and assuming that Eve can intercept any messages.

  Contents of registers for independent memory-reference

Find out the contents of registers PC, AR, DR, AC, and IR for two independent memory-reference instructions below. Each instruction starts with given Initial values.

  Explain the fifo structure of the queue

Explain the FIFO structure of the queue Explain how you would implement the queue data structure in its simplest form. Illustrate your answer fully with the necessary sample code

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Explain the sorting techniques selection sort

Explain the following sorting techniques using appropriate algorithms- (i) selection sort (ii) bubble sort

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