Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Suppose you are given two sets A and B, each containing n positive integers. You can choose to reorder each set however you like.

5. Suppose you are given two sets A and B, each containing n positive integers. You canchoose to reorder each set however you like. After reordering, let ai be the ith element ofset A, and let bi be the ith element of set B. You then receive a payoff of Qni=1 abii. Give anefficient algorithm that will maximize your payoff. Prove that your algorithm maximizesthe payoff, and state its running time

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question