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.

Suppose you are given two sets A and B, each containing n positive integers. You can choose to reorder each set however you like. After reordering, let a; be the ith element in A, and b; be the ith element in B. You will receive a payoff of 1 aibi. a) If you reorder A and B into monotonically decreasing order, consider any indices i and j such that i < j, which of the two combinations has higher value: a,b; +a;b; or ab; + b;a? Prove your answer. Based on this, describe the optimal way of reordering that maximizes your payoff. bi b) If you receive payoff of 1 at, what is the way of reordering to maximize the payoff? Prove your answer in a similar way to a). c) Briefly describe how your methods above can be viewed as greedy algorithms.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
