Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started