# How many solutions to x+y+z=15

• MinusTheBear
In summary: If z = 0, then we have x + y = 9. The number of solutions for this is 10. But, we also need to take into account that z = 0 means x and y can be anything as long as x + y = 9. So, the total number of solutions for z = 0 is (9+1) = 10.If z = 1, then we have x + y = 8. The number of solutions for this is also 9. But, we must make sure that x and y are not 0 since z = 1. So, we subtract 1 from our total to get (9-1) = 8.If z =
MinusTheBear

## Homework Statement

How many nonnegative integer solutions does the following equation has x + y + z = 15 if x ≥ 3, y ≥ 2, and 1 ≤ z ≤ 3?

## The Attempt at a Solution

Part A:
Since x ≥ 3, y ≥ 2
let a = x - 3 and b = y - 2
a + b + z = 15 - 3 - 2
a + b + z = 10

Therefore,
n = 10
r = 3
via r-combination with repetition formula there are C(10 + 3 - 1, 10) ways to complete part A. That is C(12,10) = 66 ways.

Part B:

From part A we have
a + b + z = 10
Since 1 ≤ z ≤ 3 subtracting 1 from both sides we get 0 ≤ z ≤ 2 that is z ≤ 2, we must also subtract 1 from the equation
a + b + z = 10 - 1 = 9

Since z is at most 2, we can use z compliment and subtract it from part a.
The complement of z is z ≥ 3, let c = z - 3
a + b + c = 9 - 3
a + b + c = 6

Therefore,
n = 6
r = 3

via r-combination with repetition formula there are C(6+3-1, 6) ways to complete part B. That is C(8,6) = 28 ways.

Since we took the compliment in Part B, we must subtract it from Part A. So,
66 - 28 = 38.

SOLUTION: 27.

Last edited:
MinusTheBear said:

## Homework Statement

How many nonnegative integer solutions does the following equation has x + y + z = 15 if x ≥ 3, y ≥ 2, and 1 ≤ z ≤ 3?

Note: I realize I should be using different variables, but for readability I figured it'd be easier to post it like I did. Also, I solved a problem identical to this with different restraints using the same method below and got the correct answer. I think the solution may be wrong, but I'd like my work to be checked.

## The Attempt at a Solution

Part A:[/B]
Since x ≥ 3, y ≥ 2
x + y + z = 15 - 3 - 2 = 10
via combination formula there are C(10 + 3 - 1, 10) ways to complete part A. That is C(12,10) = 66 ways.

Part B:

From part A we have
x + y + z = 10
Since 1 ≤ z ≤ 3 or 0 ≤ z ≤ 2 that is z ≤ 2, we have
x + y + z = 10 - 1 = 9

The complement of z is z ≥ 3, we have
x + y + z = 9 - 3 = 6
via combination formula there are C(6+3-1, 6) ways to complete part B. That is C(8,6) = 28 ways.

Since we took the compliment we have Part A - Part B = Answer. So, 66 - 28 = 38.

SOLUTION: 27.

Your answer of 27 is correct, but your writeup is horrible. You say "for readability it'd be easier to post it like I did". In fact, the very opposite is true: for readability, you absolutely MUST use different variable names, so x = x' + 3, y = y' + 2, z = z'+1, with x', y', z' >=0 and z' <=2. Now x'+y'+z'= 15-6 = 9.

After that, I do not understand what you are doing, using combinations and such, and that is not the way I would choose to attack the problem.

PeroK and MinusTheBear
Ray Vickson said:
Your answer of 27 is correct, but your writeup is horrible. You say "for readability it'd be easier to post it like I did". In fact, the very opposite is true: for readability, you absolutely MUST use different variable names, so x = x' + 3, y = y' + 2, z = z'+1, with x', y', z' >=0 and z' <=2. Now x'+y'+z'= 15-6 = 9.

After that, I do not understand what you are doing, using combinations and such, and that is not the way I would choose to attack the problem.
I got 38, not 27. The solution was 27. I modified the original post. Hopefully it makes more sense.

Also: I wrote this out by brute force, so I know the answer is indeed 27. But, I'm not sure where I messed up in my work.

Last edited:
Can you take a look at this recent post?

https://www.physicsforums.com/threa...u-roll-an-18-from-5-dice.939444/#post-5939456

- - - -
try writing your problem out in terms of multiplying 3 appropriate polynomials, and matching coefficients with the desired exponent, as in that problem. Start with a naive, direct implementation, then try to streamline it a bit and make it easier/faster to solve.

Learning to become 'friends' with polynomials will pay huge dividends -- they are one of the most studied structures out there (maybe the most?) and there's tons of interesting things you can do with them mathematically and computationally.

Last edited:
MinusTheBear said:
I got 38, not 27. The solution was 27. I modified the original post. Hopefully it makes more sense.

Also: I wrote this out by brute force, so I know the answer is indeed 27. But, I'm not sure where I messed up in my work.

A straightforward approach (some enumeration, but not actually "brute force") is to note that you want to solve for non-neg. integers a,b,c such that a+b+c=9 and 0 <= c <= 2.

Just let c =0, 1and 2, and solve these three problems separately.

Can you see why the number of solutions to a+b=n is n+1?

## 1. How do you find the solutions to x+y+z=15?

To find the solutions to x+y+z=15, you can use algebraic methods such as substitution, elimination, or graphing. These methods involve manipulating the equation to isolate one variable and then solving for the remaining variables.

## 2. Are there multiple solutions to x+y+z=15?

Yes, there are multiple solutions to x+y+z=15. Since there are three variables and only one equation, there are infinitely many combinations of numbers that can be plugged in to solve the equation.

## 3. What is the general form of the solutions to x+y+z=15?

The general form of the solutions to x+y+z=15 is (x, y, 15-x-y). This means that x and y can take on any value, as long as they sum up to 15, and z will be equal to the difference between 15 and the sum of x and y.

## 4. Can you use decimals or fractions as solutions to x+y+z=15?

Yes, decimals and fractions can be used as solutions to x+y+z=15. As long as the variables sum up to 15, any combination of numbers, including decimals and fractions, can be used to satisfy the equation.

## 5. Is there a specific method for finding solutions to x+y+z=15?

There is no specific method for finding solutions to x+y+z=15. As mentioned earlier, you can use algebraic methods to solve the equation, but there is no one set way to do so. It ultimately depends on the preference and skill of the person solving the equation.

• Calculus and Beyond Homework Help
Replies
13
Views
2K
• Calculus and Beyond Homework Help
Replies
7
Views
768
• Calculus and Beyond Homework Help
Replies
2
Views
435
• Calculus and Beyond Homework Help
Replies
8
Views
165
• Calculus and Beyond Homework Help
Replies
6
Views
859
• Calculus and Beyond Homework Help
Replies
2
Views
730
• Calculus and Beyond Homework Help
Replies
2
Views
508
• Calculus and Beyond Homework Help
Replies
2
Views
590
• Calculus and Beyond Homework Help
Replies
7
Views
655
• Calculus and Beyond Homework Help
Replies
1
Views
520