Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

If $x$, $y$, and $z$ are natural numbers, how many solutions are there to $x+y+z=25$?

How would I figure this out? I can't even begin dissecting this problem. Where do I begin?

share|improve this question

3 Answers 3

up vote 8 down vote accepted

Suppose that "natural number" doesn't include 0. Take 25 balls, and put a wall between any two. A partition $a+b+c=25$ is the same as a choice of two walls, and there are $\binom{24}{2} = 276$ of these.

If zeroes are allowed, then $(x+1)+(y+1)+(z+1) = 28$, and so the answer is $\binom{27}{2} = 351$.

share|improve this answer
    
Wait...whattttttt –  maq Nov 8 '10 at 5:37
    
Ok wait I think I get it, but why 24 and not 25 in the first case? What would putting a wall at the end of the last ball represent? –  maq Nov 8 '10 at 5:41
    
See what happens when we replace 25 by 2,3,4. –  Yuval Filmus Nov 8 '10 at 5:48
1  
Well if we had four balls, then a wall at the end would represent z being zero. Ok so youre saying if were not including zero, then we cant have a wall at the end. But this works fine for our last case where we do include zeros? Looking through my notes, I do see a general form for this, but when we do include zeros, I dont understand the intuition of having 27 on top. Doing a manual count of possible positions of the wall, it seems like there would only be 26 possibilites.. –  maq Nov 8 '10 at 5:53
    
Keep thinking... –  Yuval Filmus Nov 8 '10 at 6:10

HINT $\rm\ \ (x,y,z)\ \to\ \{x,\ x+y\}\ $ bijects solutions with two elt subsets of $\{1,2,\cdots,24\} $

share|improve this answer

This is called the "partition function" of 25. See here:

http://en.wikipedia.org/wiki/Partition_function_%28number_theory%29

It's not an easy-to-compute-directly function - the best bet is simply writing a small script that counts solutions using a double loop.

share|improve this answer
    
You sure its supposed to be that complicated? It was given as a minor excercise problem that should be abled to solve on paper.. –  maq Nov 8 '10 at 5:30
    
No it isn't, since there are exactly 3 parts. –  Yuval Filmus Nov 8 '10 at 5:30
    
No it isnt what? Complicated? –  maq Nov 8 '10 at 5:32
    
I meant it isn't the partition function. It's also not complicated. –  Yuval Filmus Nov 8 '10 at 5:33
    
You are of course correct. My bad. –  Gadi A Nov 8 '10 at 6:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.