My Math Forum  

Go Back   My Math Forum > College Math Forum > Applied Math

Applied Math Applied Math Forum


Thanks Tree6Thanks
Reply
 
LinkBack Thread Tools Display Modes
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:
  1. 8 kg
  2. 7 kg
  3. 4 kg
  4. 3 kg

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.
Williams is offline  
 
April 21st, 2017, 05:55 AM   #2
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 9,746
Thanks: 651

Quote:
Originally Posted by Williams View Post
The weights are:
  1. 8 kg
  2. 7 kg
  3. 4 kg
  4. 3 kg

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.
Your problem statement is a bit unclear...

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?
Thanks from Williams
Denis is offline  
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.
There are also an unlimited amount of weights which need to be hung on the washing lines. The weights come in 4 ‘sizes’.
  • 8kg
  • 7kg
  • 4kg
  • 3kg
How many combinations of weights can I hang on the washing lines? And what are they?
---

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:
If same weight is on line 6 times and maximum weight
is 20kg, then only 3kg can be used: is that correct?
Yes, that is right. The maximum amount of weights on a line would be 6.

Quote:
Also: why are you complicating it by including weight 0?
I had 0 weights in the problem because having no weights on one of the washing lines is an option – but if this complicates matters then I’m happy to remove it and add it in at the end.

Interested in hearing your input!
Williams is offline  
April 22nd, 2017, 09:05 PM   #4
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 9,746
Thanks: 651

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.
Thanks from Williams
Denis is offline  
April 22nd, 2017, 10:49 PM   #5
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: CA

Posts: 1,264
Thanks: 650

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}
$
Thanks from Williams
romsek is offline  
April 23rd, 2017, 03:19 AM   #6
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 9,746
Thanks: 651

Agree.
But can't come up with a formula.
Wrote looper program.
Thanks from Williams
Denis is offline  
April 23rd, 2017, 05:21 AM   #7
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 9,746
Thanks: 651

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
Thanks from Williams

Last edited by Denis; April 23rd, 2017 at 05:27 AM.
Denis is offline  
April 23rd, 2017, 10:16 AM   #8
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: CA

Posts: 1,264
Thanks: 650

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....
Thanks from Williams

Last edited by romsek; April 23rd, 2017 at 10:19 AM.
romsek is offline  
April 23rd, 2017, 10:34 AM   #9
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 9,746
Thanks: 651

Quote:
Originally Posted by romsek View Post
Mathematica is a real joy to work with once you get it, which took me years....
Nothing will replace my love Miss UBasic...
Denis is offline  
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!!!
Williams is offline  
Reply

  My Math Forum > College Math Forum > Applied Math

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 05: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 10:08 PM





Copyright © 2017 My Math Forum. All rights reserved.