Can someone help me determine how many combinations?

coolo

New member
Joined
Dec 17, 2020
Messages
6
If 10A+9B+7C+3D+5E=229 and a,b,c,d,e can be a whole number 1-10

How many possible solutions are there?

***I was thinking to break down into prime factors but this doesn't help as the numbers are added together.

Assuming this requires programming knowledge i.e. loops, can someone help me out with the solution as I don't have programming skills.

Thanks for the help!
 
There are no a, b, c, d and e in your problem.
You have to try something. Then helpers can give you hints to go further. Please post back showing your work.
 
I created the problem. Basically the problem is a weighted average where you can choose a rating of 1-10 for option a, 1-10 for option b, 1-10 for option c, 1-10 for option d, and 1-10 for option e. I was curious out of the possible 10*10*10*10*10=100,000 possible combinations of selections can you select numbers that will equal 229. make sense?
 
the full weight avg formula I created was: (1/34)*(10A+9B+7C+3D+5E)=(229/34) ....... I just factored out the 1/34 for simplicity sake. This is not an assigned problem just looking for a solution for curiosity sake. Thanks for the help!
 
Two example solutions are 1) a=10 , b=9, c=7, d=3, e=5 OR 2) a=7 , b=9, c=6, d=2, e=6..... So the question is how many total combos would satisfy my weighted avg explained above?
 
If 10A+9B+7C+3D+5E=229 and a,b,c,d,e can be a whole number 1-10
Translation: A is not the same as a. Math is "case sensitive."

You have [math]E = \dfrac{1}{5} ( 229 - 10A - 9B - 7C - 3D ) [/math]
Obviously if E is a whole number then 229 - 10A - 9B - 7C - 3D has to be divisible by 5. This puts a condition on B, C, and D but there isn't much to grab onto after that.

One possible class of solutions is
D = 3 + 2B + C
E = 44 - 2A - 3B - 2C

-Dan
 
Last edited:
Solve the problem any way that you can think of. The more you think mathematically the better you get at thinking mathematically. Being spoon fed in math does not build mathematical maturity. Now if you need/want a small hint then that is something else. Try to run with topsquark's hint.
 
Can this be solved without brute force?

Possibly, but brute force is likely to be much faster. You have 4 degrees of freedom each of which can take 10 values.
So you have 10k things to check.

There's no magic. Generate your 10k trials values for A-D. Evaluate that part of the polynomial. Subtract this from 229.
If the result is both an integer and in the inclusive range 1-10, you've found a solution.

I get 582 solutions.
 
Romsek, Thank you for your help (and the others too). I appreciate the insight. ?
 
Possibly, but brute force is likely to be much faster. You have 4 degrees of freedom each of which can take 10 values.
So you have 10k things to check.

There's no magic. Generate your 10k trials values for A-D. Evaluate that part of the polynomial. Subtract this from 229.
If the result is both an integer and in the inclusive range 1-10, you've found a solution.

I get 582 solutions.

I forgot the part about dividing by 5 after the subtraction.

Then test that the result is some integer 1-10
 
I just realized you said A-E can be any integer from 1-10.
As a result each variable must be at least 1.
I would rewrite this problem as 10A + 9B + 7C + 3D + 5E = 195 where A-E is a digit (0-9).
This way the numbers are smaller.
 
Top