Number of positive integer solutions for given equation

  • Thread starter Thread starter songoku
  • Start date Start date
  • Tags Tags
    Integer Positive
AI Thread Summary
The discussion revolves around finding the number of positive integer triplets (x, y, z) that satisfy the equation x + y + 2z = n, where n is an odd integer greater than or equal to 5. The solution involves expressing n as 2k + 1 and analyzing the constraints on z, leading to the formula (n - 1)(n - 3)/4 for the number of solutions. Examples for specific values of n illustrate how to determine the combinations of x and y for given z values. The conversation emphasizes that this problem is rooted in combinatorics, specifically focusing on compositions of integers. Overall, the participants clarify the mathematical principles behind counting solutions to the equation.
songoku
Messages
2,467
Reaction score
382

Homework Statement


Let n be an odd integer ≥ 5. Find the number of triplets (x, y, z) of positive integers which satisfy the equation
x + y + 2z = n

Homework Equations


Do not know

The Attempt at a Solution


Let n = 2k + 1, k ≥ 2

x + y + 2z = n
2z = 2k + 1 - (x + y) ≤ 2k + 1 - 2 (because x + y ≥ 2)
2z ≤ 2k - 1
Then stuck

The answer is (n - 1)(n - 3)/4

Thanks
 
Physics news on Phys.org
Sometimes these are easiest to look at with a few examples.
If n = 5, then (1,2,1) and (2,1,1) are your only choices.
If n = 7, you have more. For z = 1, you have (1,4,1), (2,3,1),(3,2,1),(4,1,1) and for z=2 you have (1,2,2),(2,1,2).
What I see is that for any z, of which you are limited in choices, you will have an appropriate number of choices for (x+y)=n-2z.

So how many options for z?
For each of those options how many choices for y do you have? Once z and y and defined, you have only one choice for x.
 
RUber said:
Sometimes these are easiest to look at with a few examples.
If n = 5, then (1,2,1) and (2,1,1) are your only choices.
If n = 7, you have more. For z = 1, you have (1,4,1), (2,3,1),(3,2,1),(4,1,1) and for z=2 you have (1,2,2),(2,1,2).
What I see is that for any z, of which you are limited in choices, you will have an appropriate number of choices for (x+y)=n-2z.

So how many options for z?
For each of those options how many choices for y do you have? Once z and y and defined, you have only one choice for x.

I think I get it. Thanks
 
This is a combinatorics question, not really a pre-calculus question.

Throughout, order matters and duplicates are allowed.

How many ways are there to write n as the sum of k nonnegative integers? Answer: (n+k-1) choose (k-1). Why? Place n 1s and k-1 separators.

How many ways are there to write n as the sum of k positive integers? Answer: (n-1) choose (k-1). Why? Write n-k as the sum of k nonnegative integers and then add 1 to each of them.

Assume that n is even. How many ways are there to write n as the sum of k even positive integers? Answer: (n/2 - 1) choose (k-1). Why? Write n/2 as the sum of k positive integers and then multiply each of them by 2.

Assume that n is odd. How many ways are there to write n as the sum of k positive integers where the last is even and exactly one of the others is odd? (k-1) (((n-1)/2) choose (k-1))
Why? Write n+1 as the sum of k positive even integers and then subtract 1 from one of the first k-1.

To answer your question, let k=3.
 
Prof B said:
This is a combinatorics question, not really a pre-calculus question.
It's also homework from 6 years ago!
 
Correction: Partitions into k positive integers where order matters are actually called k-compositions. I don't know what name is given to partitions into k natural numbers where order matters.
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Back
Top