0

Let's say I have a barbell rod which weighs 20 kilos and I have pair of weight plates, meaning two of each,i.e, Two of 2.5kilograms, 5 kilograms, 7.5 kilograms....etc I know how to find the number of combinations possible, but is there a way to find the sum of possible weights. May be in an excel sheet?

  • Welcome to MSE. Please read this text about how to ask a good question. – José Carlos Santos Aug 03 '20 at 08:38
  • The possible weights are very simple: any integer multiple of $5kg$ starting from $20kg$. Or do you want to know how many ways you could achieve a specific weight e.g. $30kg$ as $2 \times 5kg$ or $4 \times 2.5kg$? – badjohn Aug 03 '20 at 09:03
  • @badjohn Well, there's at most 2 of any one weight, so you can't just say you get all integer multiples of 5 kg. Fundamentally OP is asking for the support of a certain finite product of positive polynomials, which is typically hard to answer. – Joshua P. Swanson Aug 03 '20 at 10:37
  • @JoshuaP.Swanson I took the ... to mean that he had weights in steps of $2.5kg$ available. I thought that the "two of each" was just to allow it to be easy to balance. Some more detail from the OP would be good e.g. examples of acceptable and unacceptable combinations. – badjohn Aug 03 '20 at 10:52
  • 1
    @badjohn Fair enough! Generating functions are of course flexible enough to answer most reasonable variations Karan may have meant. – Joshua P. Swanson Aug 03 '20 at 11:23

1 Answers1

1

The best general approach is to use generating functions. An example is simplest. You can choose 0, 1, or 2 2.5-kilo plates; 0, 1, or 2 5-kilo plates; etc. Encode the first choice as a polynomial $1+q^{2.5}+q^5$, the second as $1+q^5+q^{10}$, etc.

Now multiply these polynomials. Why is this a good idea? Because if we for instance expand $$(1+q^{2.5}+q^5)(1+q^5+q^{10})$$ we'll need to choose one factor on the left and one factor on the right, say $q^{2.5}$ and $q^{10}$, and multiply them, say resulting in $q^{2.5}q^{10} = q^{12.5}$. This corresponds to using 1 2.5-plate and 2 5-plates. If you wanted to add the bar, multiply everything by $q^{20}$.

The possible total weights will be the exponents when you expand all these products out. Using your listed weights, that would be

$$\begin{align*}q^{20} (1+q^{2.5}+q^5)(1+q^5+q^{10})(1+q^{7.5}+q^{15}) &= q^{47.5}+2 q^{42.5}+3 q^{37.5}+3 q^{32.5}+2 q^{27.5} \\ &+q^{22.5}+q^{40.}+q^{35.}+q^{30.}+q^{50}+2 q^{45} \\ &+2 q^{40}+2 q^{35}+2 q^{30}+2 q^{25}+q^{20}.\end{align*}$$

For instance, "$2q^{40}$" is telling you there are two distinct ways to get 40 kilos (namely the bar plus 2 7.5-plates and 2 2.5-plates, or the bar plus 1 7.5-plate, 2 5-plates, and 1 2.5-plate).

I had Mathematica do the above expansion. Wolfram Alpha is happy to do it as well.