I want 6 number between the range 1-45 and their sum should be 138?

2

2 Answers

Oddman Profile
Oddman answered
There are 184,430 sets of such numbers. If you disallow sets with repeated numbers in them, there are 105,690 different sets of such numbers. Among them are these   {38, 35, 24, 19, 13, 9},   {37, 32, 29, 21, 10, 9},   {37, 32, 27, 19, 13, 10}
You can choose 3 pairs, each of which adds to 46, or you can choose two sets that add to 69 each (as in the above cases). This can tend to simplify the problem a little bit. Example   Pick 3 "random" numbers between 1 and 22 (inclusive). Subtract each from 46. You now have 6 numbers that add to 138. If we choose 5, 10, 15, the other numbers are 41, 36, 31 and our set is {5, 10, 15, 31, 36, 41}.  {40, 30, 30, 20, 17, 1} is an example of a set with repeated numbers.
Mark Mottian Profile
Mark Mottian answered
This is how I would solve such a problem:

138 = 100 + 30 + 8 (express in expanded notation)

100 = 50 + 50 (expand 100 in expanded notation)

Now, find two different pairs that make up 50. I am sure there are many, but I cam up with:

50 = 40 + 10
50 = 29 + 21
30 = 30
8 = 8

So, the numbers are 8; 10; 30; 21; 29 and 40

Answer Question

Anonymous