April 21st, 2017, 04:03 AM  #1 
Newbie Joined: May 2015 From: Berlin Posts: 9 Thanks: 1  How many combinations of 4 weights on a line?
I'm not a mathematician  but here is a question that I would appreciate some help with: I have 4 types of weights that need to be hung on an unlimited amount of lines. The weights are:
There can be either 0, 1, 2, 3, 4, 5, or 6 weights hung on each line. The same weight can be on the line 0, 1, 2, 3, 4, 5, or 6 times (i.e. The same weight can be repeated). The weights on each the line are not allowed to exceed 20kg. How many combinations of weights are there?  and what are the combinations? I would be incredibly happy if anyone could either give me some answers. Thanks in advance! Last edited by Williams; April 21st, 2017 at 04:14 AM. 
April 21st, 2017, 05:55 AM  #2  
Math Team Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 13,112 Thanks: 911  Quote:
If same weight is on line 6 times and maximum weight is 20kg, then only 3kg can be used: is that correct? What's a "line"? May be easier if your problem was simplified a bit like: using digits 0 to 6 up to a maximum of 6 times each, how many arrangements are possible where the sum =< 20 ? Also: why are you complicating it by including weight 0?  
April 22nd, 2017, 08:16 AM  #3  
Newbie Joined: May 2015 From: Berlin Posts: 9 Thanks: 1 
Thanks for your response Denis. You are right on all counts – I definitely could have written the question better. I’ll try the question again – phrased perhaps in a more applied mathematics way: There are an unlimited number of washing lines which only can support a maximum of 20kg each. If you were only allowed to have one type of weight per line the answer would be simple  15: 1. No weights 2. 8 kg 3. 7 kg 4. 4 kg 5. 3 kg 6. 8 kg, 7 kg 7. 8 kg, 4 kg 8. 8 kg, 3 kg 9. 7 kg, 4 kg 10. 7 kg, 3 kg 11. 4 kg, 3 kg 12. 8 kg, 7 kg, 4 kg 13. 8 kg, 4 kg, 3 kg 14. 8 kg, 7 kg, 3 kg 15. 7 kg, 4 kg, 3 kg The next stage: 8 kg, 7kg, 4 kg, 3kg wouldn’t work because it will be over 20kg. But if the weights can be repeated – I’m lost and don’t know what to do next to work out the problem.  Quote:
Quote:
Interested in hearing your input!  
April 22nd, 2017, 09:05 PM  #4 
Math Team Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 13,112 Thanks: 911 
Looks like the easiest way to handle this is to use the 4 weights as the digits of a number. 333333 : 18 333334 : 19 333344 : 20 33333 : 15 33344 : 16 33337 : 19 33338 : 20 33344 : 17 33347 : 20 33444 : 18 34444 : 19 44444 : 20 Similarly for 4 weights, then 3, then 2 then 1. Notice that the numbers go from lowest to highest, and the digits are in style a=<b=<c.... to prevent duplicates like 334 and 343. 
April 22nd, 2017, 10:49 PM  #5 
Senior Member Joined: Sep 2015 From: USA Posts: 2,091 Thanks: 1087 
I get the following 57 combos that are 20 kg or less. $ \begin{array}{c} \{\} \\ \{3\} \\ \{4\} \\ \{7\} \\ \{8\} \\ \{3,3\} \\ \{3,4\} \\ \{3,7\} \\ \{3,8\} \\ \{4,4\} \\ \{4,7\} \\ \{4,8\} \\ \{7,7\} \\ \{7,8\} \\ \{8,8\} \\ \{3,3,3\} \\ \{3,3,4\} \\ \{3,3,7\} \\ \{3,3,8\} \\ \{3,4,4\} \\ \{3,4,7\} \\ \{3,4,8\} \\ \{3,7,7\} \\ \{3,7,8\} \\ \{3,8,8\} \\ \{4,4,4\} \\ \{4,4,7\} \\ \{4,4,8\} \\ \{4,7,7\} \\ \{4,7,8\} \\ \{4,8,8\} \\ \{3,3,3,3\} \\ \{3,3,3,4\} \\ \{3,3,3,7\} \\ \{3,3,3,8\} \\ \{3,3,4,4\} \\ \{3,3,4,7\} \\ \{3,3,4,8\} \\ \{3,3,7,7\} \\ \{3,4,4,4\} \\ \{3,4,4,7\} \\ \{3,4,4,8\} \\ \{4,4,4,4\} \\ \{4,4,4,7\} \\ \{4,4,4,8\} \\ \{3,3,3,3,3\} \\ \{3,3,3,3,4\} \\ \{3,3,3,3,7\} \\ \{3,3,3,3,8\} \\ \{3,3,3,4,4\} \\ \{3,3,3,4,7\} \\ \{3,3,4,4,4\} \\ \{3,4,4,4,4\} \\ \{4,4,4,4,4\} \\ \{3,3,3,3,3,3\} \\ \{3,3,3,3,3,4\} \\ \{3,3,3,3,4,4\} \\ \end{array} $ 
April 23rd, 2017, 03:19 AM  #6 
Math Team Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 13,112 Thanks: 911 
Agree. But can't come up with a formula. Wrote looper program. 
April 23rd, 2017, 05:21 AM  #7 
Math Team Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 13,112 Thanks: 911 
Williams, if you're interested in writing a computer program for this silliness(!), then here's a sample: (I'll show the portion applicable to 5 weights) Open array size 4: a(4) a(1)=3 : a(2) = 4 : a(3) = 7 : a(4) = 8 loop a from 1 to 4 loop b from a to 4 loop c from b to 4 loop d from c to 4 loop e from d to 4 dowhile s < 21 s = a(a) + a(b) + a(c) + a(d) + a(e) print a(a), a(b), a(c), a(d), a(e), s Output: 3,3,3,3,3,15 3,3,3,4,4,16 3,3,3,3,7,19 3,3,3,3,8,20 3,3,3,4,4,17 3,3,3,4,7,20 3,3,4,4,4,18 3,4,4,4,4,19 4,4,4,4,4,20 Last edited by Denis; April 23rd, 2017 at 05:27 AM. 
April 23rd, 2017, 10:16 AM  #8 
Senior Member Joined: Sep 2015 From: USA Posts: 2,091 Thanks: 1087 
what I did was take the alphabet (0,3,4,7,8 ) and create all 6 tuples of it then select those tuples for which the sum of the elements is 20 or less. Then remove the 0's Mathematica is a real joy to work with once you get it, which took me years.... Last edited by romsek; April 23rd, 2017 at 10:19 AM. 
April 23rd, 2017, 10:34 AM  #9 
Math Team Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 13,112 Thanks: 911  
April 23rd, 2017, 11:07 PM  #10 
Newbie Joined: May 2015 From: Berlin Posts: 9 Thanks: 1 
This is all absolutely brilliant! Thank you for your work and help!!! 

Tags 
combinations, line, sequences, weights 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Unequal Weights  mathmaniac  Physics  24  February 1st, 2013 04:09 PM 
Geometry or weights?  mydisguise08  Geometry  2  September 2nd, 2009 04:07 PM 
Find previous weights from current weights & percent change  billiboy  Applied Math  4  June 15th, 2009 11:26 PM 
keyword relativity datatype weights and algorithm  totus  Applied Math  4  February 28th, 2009 09:08 PM 