How many solutions to x+y+z=15

  • Thread starter Thread starter MinusTheBear
  • Start date Start date
Click For Summary

Homework Help Overview

The problem involves finding the number of nonnegative integer solutions to the equation x + y + z = 15 under specific constraints: x must be at least 3, y must be at least 2, and z must be between 1 and 3 inclusive. The discussion centers around the application of combinatorial methods to solve this equation while adhering to the given restrictions.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Participants explore the use of variable substitution to simplify the equation based on the constraints provided. They discuss the application of the combination formula for counting solutions and consider the implications of the upper limit on z. Some participants express confusion over the methods used and suggest alternative approaches, including polynomial representations.

Discussion Status

The discussion is ongoing, with participants sharing their calculations and interpretations. There is a recognition of differing answers, with one participant asserting their solution while others question the reasoning behind the calculations. Suggestions for clarity and alternative methods have been offered, indicating a productive exchange of ideas.

Contextual Notes

Participants note the importance of using distinct variable names for clarity and the potential for misunderstanding due to the complexity of the constraints. There is also mention of a related problem that may provide insight into solving the current one.

MinusTheBear
Messages
22
Reaction score
0

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?

Homework Equations

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.

MY ANSWER: 38
SOLUTION: 27.
 
Last edited:
Physics news on Phys.org
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.

Homework Equations

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.
 
  • Like
Likes   Reactions: 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?
 

Similar threads

Replies
14
Views
4K
Replies
7
Views
2K
Replies
2
Views
1K
Replies
8
Views
2K
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K