What's new
Fantasy Football - Footballguys Forums

Welcome to Our Forums. Once you've registered and logged in, you're primed to talk football, among other topics, with the sharpest and most experienced fantasy players on the internet.

A Math Challenge For You (1 Viewer)

ChiefD

Footballguy
Hopefully I can explain this to you math nerds cool math guys.

I have three numbers:

27520
71837
8944

You have to apply a percentage to each one of these numbers so that when you add up each number AFTER the percentage is applied to each number your total is 8500. You can also only take the percentage to 4 decimals.

For example:

27520 * .0795 = 2187.84
71837 * .0648 = 4655.0376
8944 * .0735 = 657.384

Total of those three when you add them up: 7500.2616

Can you make this happen to get it to 8500 exactly?
 
Last edited:
I used goal seek in excel, but this might be wrong since the solution went out to more than three decimal spots.

27,520
0.078​
2,149
71,837
0.077​
5,496
8,944
0.096​
855
Total8,500
 
I used goal seek in excel, but this might be wrong since the solution went out to more than three decimal spots.

27,520
0.078​
2,149
71,837
0.077​
5,496
8,944
0.096​
855
Total8,500
I'll check.

You are looking at it the right way. I amended the original post, so you have 4 decimal points and it has to be entered like you have it there. But you could go .0786 or something like that.
 
I used goal seek in excel, but this might be wrong since the solution went out to more than three decimal spots.

27,520
0.078​
2,149
71,837
0.077​
5,496
8,944
0.096​
855
Total8,500

Your math on the middle one is off. 71837 * 0.077 = 5531.449
 
I dont think this is solvable. I set up excel solver for this and it's having problems even though it should work in theory.

This is me throwing my hands up.
 
tl:dr: no

To solve this problem, we need to find the correct percentages to apply to each of the three numbers so that their weighted sum equals 8500. Let's denote the percentages as p1p_1p1, p2p_2p2, and p3p_3p3 for the numbers 27520, 71837, and 8944, respectively. We need to solve the following equation:

27520×p1+71837×p2+8944×p3=850027520 \times p_1 + 71837 \times p_2 + 8944 \times p_3 = 850027520×p1+71837×p2+8944×p3=8500

Let's represent this system of equations in a more structured way:

  1. 27520p1+71837p2+8944p3=850027520p_1 + 71837p_2 + 8944p_3 = 850027520p1+71837p2+8944p3=8500
Additionally, we should note that the percentages need to be positive and within reasonable bounds (likely between 0 and 1). Since the sum should be exactly 8500, we will also consider the constraint of four decimal places for each percentage.

We can set up and solve this using numerical methods. To find a precise solution, we might use an iterative approach or optimization techniques.

Let's start with an initial guess and refine it. We will use Python to solve it using numerical optimization.

Python:
from scipy.optimize import fsolve

# Define the function representing the system of equations
def equations(p):
    p1, p2, p3 = p
    return [27520 * p1 + 71837 * p2 + 8944 * p3 - 8500]

# Initial guess for p1, p2, and p3
initial_guess = [0.1, 0.1, 0.1]

# Solve the system of equations
solution = fsolve(equations, initial_guess)

# Round the solution to four decimal places
p1, p2, p3 = [round(p, 4) for p in solution]

# Calculate the total to verify the solution
total = 27520 * p1 + 71837 * p2 + 8944 * p3

p1, p2, p3, total


Running the code above will provide the values for p1p_1p1, p2p_2p2, and p3p_3p3 that solve the equation. Let me perform this calculation for you.
The error indicates that the function equations should return a list of three equations, not just one. This makes sense since we are trying to solve for three variables. Let's adjust the function to include more constraints or a better formulation to solve for the three variables. Here’s the corrected approach:


Python:
from scipy.optimize import fsolve

# Define the function representing the system of equations
def equations(p):
    p1, p2, p3 = p
    return [
        27520 * p1 + 71837 * p2 + 8944 * p3 - 8500,
        p1 + p2 + p3 - 1,  # Adding a constraint to ensure the percentages sum to a reasonable value
        p1 - p1,  # Dummy equation to balance the system
    ]

# Initial guess for p1, p2, and p3
initial_guess = [0.1, 0.1, 0.1]

# Solve the system of equations
solution = fsolve(equations, initial_guess)

# Round the solution to four decimal places
p1, p2, p3 = [round(p, 4) for p in solution]

# Calculate the total to verify the solution
total = 27520 * p1 + 71837 * p2 + 8944 * p3

p1, p2, p3, total


Let’s execute this corrected code to find the solution.
The problem arises because we only have one equation to solve but we are using three variables. We need additional constraints or a different method to ensure a unique solution for p1p1p1, p2p2p2, and p3p3p3. Here’s a more suitable approach using optimization to minimize the difference between the weighted sum and the target value of 8500, while respecting the four-decimal place constraint.
We can use the scipy.optimize.minimize function to achieve this:


Python:
from scipy.optimize import minimize

# Define the objective function to minimize the difference from the target
def objective(p):
    p1, p2, p3 = p
    return abs(27520 * p1 + 71837 * p2 + 8944 * p3 - 8500)

# Constraints: percentages should be between 0 and 1
bounds = [(0, 1), (0, 1), (0, 1)]

# Initial guess for p1, p2, and p3
initial_guess = [0.1, 0.1, 0.1]

# Solve the optimization problem
result = minimize(objective, initial_guess, bounds=bounds)

# Get the solution and round to four decimal places
p1, p2, p3 = [round(p, 4) for p in result.x]

# Calculate the total to verify the solution
total = 27520 * p1 + 71837 * p2 + 8944 * p3

p1, p2, p3, total

Let's run this corrected approach.
The optimization results in the following percentages:
  • p1=0.0785p1 = 0.0785p1=0.0785
  • p2=0.0785p2 = 0.0785p2=0.0785
  • p3=0.0785p3 = 0.0785p3=0.0785
When applied to the numbers:
27520×0.0785+71837×0.0785+8944×0.0785=8501.628527520 \times 0.0785 + 71837 \times 0.0785 + 8944 \times 0.0785 = 8501.628527520×0.0785+71837×0.0785+8944×0.0785=8501.6285
While close, this is slightly over the target of 8500. This is due to the rounding and constraints of using only four decimal places.
To refine this further and ensure that we can exactly hit 8500, we need to consider adjustments or fine-tuning the individual percentages slightly within the constraints of four decimal places.
Here’s a refined approach to get as close as possible within the constraints:


Python:
from scipy.optimize import minimize

# Define the objective function to minimize the absolute difference from 8500
def objective(p):
    p1, p2, p3 = p
    return abs(27520 * p1 + 71837 * p2 + 8944 * p3 - 8500)

# Constraints: percentages should be between 0 and 1
bounds = [(0, 1), (0, 1), (0, 1)]

# Initial guess for p1, p2, and p3
initial_guess = [0.0795, 0.0648, 0.0735]

# Solve the optimization problem
result = minimize(objective, initial_guess, bounds=bounds)

# Get the solution and round to four decimal places
p1, p2, p3 = [round(p, 4) for p in result.x]

# Calculate the total to verify the solution
total = 27520 * p1 + 71837 * p2 + 8944 * p3

p1, p2, p3, total


By using initial guesses closer to typical values and refining the optimization, we can better meet the requirement. Let's execute this refined approach.
The refined approach gives us the following percentages:
  • p1=0.0886p1 = 0.0886p1=0.0886
  • p2=0.0741p2 = 0.0741p2=0.0741
  • p3=0.0827p3 = 0.0827p3=0.0827
When applied to the numbers:
27520×0.0886+71837×0.0741+8944×0.0827=8501.062527520 \times 0.0886 + 71837 \times 0.0741 + 8944 \times 0.0827 = 8501.062527520×0.0886+71837×0.0741+8944×0.0827=8501.0625
This result is very close to the target of 8500, but still slightly over. Given the constraint of four decimal places, this is as close as we can get with these specific percentages.

Explanation:​

  1. Objective Function: We defined an objective function that measures the absolute difference between the weighted sum of the percentages applied to the numbers and the target value (8500).
  2. Initial Guess: We started with initial guesses close to the provided example percentages and then refined the guess to get closer to the target.
  3. Optimization: Using scipy.optimize.minimize, we found the percentages that minimized the difference from 8500.
  4. Rounding: The results were rounded to four decimal places as required.
The percentages p1=0.0886p1 = 0.0886p1=0.0886, p2=0.0741p2 = 0.0741p2=0.0741, and p3=0.0827p3 = 0.0827p3=0.0827 are the best fit within the constraints provided, achieving a total sum of 8501.0625. If a perfect 8500 is necessary, slight manual adjustments or accepting the minor deviation due to rounding constraints would be the practical approach.
 
Re-running after telling CHAT GPT it's okay to exceed 100%. NOPE

Also checking to see if 0 percent can be our friend. NOPE
 
Hopefully I can explain this to you math nerds cool math guys.

I have three numbers:

27520
71837
8944

You have to apply a percentage to each one of these numbers so that when you add up each number AFTER the percentage is applied to each number your total is 8500. You can also only take the percentage to 4 decimals.

For example:

27520 * .0795 = 2187.84
71837 * .0648 = 4655.0376
8944 * .0735 = 657.384

Total of those three when you add them up: 7500.2616

Can you make this happen to get it to 8500 exactly?
Yep. I can
 
27520×0.119+71837×0.0059+8944×0.5364=8496.2799


Given the constraints of four decimal places, achieving an exact sum of 8500 might not be feasible with the current approach. However, we've demonstrated that it's possible to get very close.
If exact precision is critical, further refinement or additional constraints might be necessary. Let me know if you would like to explore any more adjustments or if you have other questions!

- thus spoke Chat-CPT
 
I have a nagging feeling the answer is "no" because 17 is a prime factor of 8500 but is not a prime factor of any of the input numbers.

The closest I've gotten is 8499.9674
 
I have a nagging feeling the answer is "no" because 17 is a prime factor of 8500 but is not a prime factor of any of the input numbers.

The closest I've gotten is 8499.9674
I kid you not, I woke up this morning and thought: “we should prime factor those numbers”. (I’m a math guy who often gets insight on problems after a good sleep. Again, not schtick.) You hit the nail on the head. Reminds me of the time I dreamt of being trapped in a cave with a decrepit old lady. When Benedict Cumberbatch materialized to give us a dismissive wave of “oh, well, it was a good life”, I immediately woke up and knew how to solve an integral that was stumping me for hours before. Good times.
 
I'm not a number theory guy, but I'm thinking it's been set up by someone who is a number theory guy to be impossible. 71837 being prime 1), shows that these numbers were deliberately chosen rather than being semi-random, and 2) means that any solution is going to have to have 71837 given a zero coefficient, otherwise it will screw everything up by providing a non-integer answer when multiplied by any four digit decimal. My next inclination was to use the two remaining numbers, potentially giving one a negative coefficient to get to 8500, but then I see that those two numbers both have 43 as a factor (limiting options to "land" on particular integers via clever addition or subtraction), while our target number has 17 as a factor. If you try to factor either of these out by making your percentage some multiple of 1/X, you see that the decimal version is too long to give one an integer subject to the constraints of the problem.

So, to summarize, the numbers were clearly deliberately chosen for their numerical properties, and strike me as designed to make what intuitively seems like it should be doable impossible. Unfortunately, like I said I never really got into number theory, so I don't think I possess the tools to rigorously prove why it is impossible.
 
Hopefully I can explain this to you math nerds cool math guys.

I have three numbers:

27520
71837
8944

You have to apply a percentage to each one of these numbers so that when you add up each number AFTER the percentage is applied to each number your total is 8500. You can also only take the percentage to 4 decimals.

For example:

27520 * .0795 = 2187.84
71837 * .0648 = 4655.0376
8944 * .0735 = 657.384

Total of those three when you add them up: 7500.2616

Can you make this happen to get it to 8500 exactly?


Based on the parameters set up in this problem - I can solve it.
 
Solution

0.0000, 0.0000, 0.9504
I don't think the word exactly means what you think it does
Based on the parameter set up in the original problem - I applied a percentage to each number, then add those numbers together to reach 8500....

Nothing in the original problem required the percentages to be > 0%
huh?

AFTER the percentage is applied to each number your total is 8500. You can also only take the percentage to 4 decimals.

Can you make this happen to get it to 8500 exactly?

your solution is 8500.3776
 
Last edited:
Solution

0.0000, 0.0000, 0.9504
I don't think the word exactly means what you think it does
Based on the parameter set up in the original problem - I applied a percentage to each number, then add those numbers together to reach 8500....

Nothing in the original problem required the percentages to be > 0%
huh?

AFTER the percentage is applied to each number your total is 8500. You can also only take the percentage to 4 decimals.

Can you make this happen to get it to 8500 exactly?

your solution is 8500.3776
Hmmm when I plugged it into Google sheets it worked to 4 digits. I blame google.

ETA - it was showing 8500.0000
 
Solution

0.0000, 0.0000, 0.9504
I don't think the word exactly means what you think it does
Based on the parameter set up in the original problem - I applied a percentage to each number, then add those numbers together to reach 8500....

Nothing in the original problem required the percentages to be > 0%
huh?

AFTER the percentage is applied to each number your total is 8500. You can also only take the percentage to 4 decimals.

Can you make this happen to get it to 8500 exactly?

your solution is 8500.3776
Hmmm when I plugged it into Google sheets it worked to 4 digits. I blame google.

ETA - it was showing 8500.0000
Do you even format cells brah? :)
 

Users who are viewing this thread

Top