1. From five ones, five twos, five threes, five fours, and five fives, form five different five-digit numbers so that their sum is as large as possible.
SOLUTION. The greatest possible sum would be created by the quintet of numbers 54321, 54321, 54321, 54321, 54321. However, since the numbers must be different from each other, we will try to modify this quintet so as not to disrupt the triplet 543, i.e., so that the change in the sum is as small as possible. Thus, two of the five numbers will still be the same, since from the digits 1, 2, only four different doublets 11, 12, 21, 22 can be formed. We will therefore change one of the triplets 543 to 542 by swapping the digit 2 with the digit 3 in the tens place. Similarly, there cannot be five ones in the units place, because the last triplet of at least three of the five-digit numbers would be 321. Therefore, we will swap the digit 1 from the units place with the digit 2 from the hundreds place, so that the change in the sum of the quintet of numbers is as small as possible. After these swaps, the last doublets of the five numbers can be: 31, 22, 21, 21, 11, or 31, 21, 21, 21, 12, or 32, 21, 21, 21, 11. We now try to place these doublets after the triplets 543, 543, 543, 543, 542. We find that only the first quintet of doublets works. The sought quintet of five-digit numbers with the greatest possible sum is 54331, 54322, 54321, 54311, 54221.

GUIDING PROBLEMS: