Prove the maximum sum of products algorithm

199 Views Asked by At

We are given two equal sized sets of positive integers (n integers). We can multiply any two numbers from different sets, each number being used once. All multiplied pairs are added. Prove that maximum sum pairs is when we sort the sets by highest to lowest numbers and multiply highest elements in both sets then 2nd highest and so on. I can prove for n=2 but can't seem to extend that for greater n