My Math Forum (http://mymathforum.com/math-forums.php)
-   Number Theory (http://mymathforum.com/number-theory/)
-   -   Counting Problem (http://mymathforum.com/number-theory/28076-counting-problem.html)

 Jakarta June 5th, 2012 07:20 PM

Counting Problem

Consider the equation x+y+z+w=n, where n is a positive integer greater or equal to 4. A positive and integer solution is a set (x,y,z,w) of positive integers that satisfies the equation for a given n. For example, for n=10 one solution to x+y+z+w=10 would be (1,2,3,4), since 1+2+3+4=10.
a) Determine the number of positive and integer solutions for n=10.
b) Find a general formula that counts the number of whole and integer solutions for x+y+z+w=n.

Note: Solutions (2, 2, 2, 4), (2, 2, 4, 2),(2, 4, 2, 2) and (4, 2, 2, 2) for n=10 are each considered different and separate solutions.

 karthikeyan.jp June 5th, 2012 08:14 PM

Re: Counting Problem

so. its finding the no of partitions of n as 4 integers.. it can be split like partitions of n as sum of two numbers.. and finding the partitions of those 2 numbers as sum of two numbers...

 karthikeyan.jp June 5th, 2012 11:47 PM

Re: Counting Problem

this can be proved by multinomial theorem...

For a+b+c+d = n, the no. of solutions including 0 is

$(n+1)(n+2)(n+3)/6$

need to eliminate those terms in the expansion of $(a+b+c+d)^n$ that have powers of all a,b,c,d

 johnr June 6th, 2012 04:14 AM

Re: Counting Problem

Quote:
 Originally Posted by karthikeyan.jp this can be proved by multinomial theorem... For a+b+c+d = n, the no. of solutions including 0 is $(n+1)(n+2)(n+3)/6$ need to eliminate those terms in the expansion of $(a+b+c+d)^n$ that have powers of all a,b,c,d
What's the reasoning behind that formula?

 karthikeyan.jp June 6th, 2012 06:10 AM

Re: Counting Problem

The number of co-efficients in the expansion of $(x1+x2+x3...+xm)^n$ is (n+m-1 n). http://en.wikipedia.org/wiki/Multinomial_theorem

So for $(a+b+c+d)^n$, it is (n+3 n) ==> $(n+3)!/n! x 3!$

 Jakarta June 6th, 2012 06:40 AM

Re: Counting Problem

Quote:
 Originally Posted by karthikeyan.jp this can be proved by multinomial theorem... For a+b+c+d = n, the no. of solutions including 0 is $(n+1)(n+2)(n+3)/6$
Well, using this formula, I found through trial and error that the general formula for my problem happens to be:
((n-3)(n-2)(n-1))/6

I'm completely clueless as to the reasoning behind it, though, and politely ask for a baby explanation lol.

 soroban June 7th, 2012 04:32 PM

Re: Counting Problem

Hello, Jakarta!

Quote:
 Consider the equation $x\,+\,y\,+\,z\,+\,w\:=\:n$, where $n$ is a positive integer $\ge\,4.$ A solution is a set $(x,\,y,\,z,\,w)$ of positive integers that satisfies the equation for a given $n.$ a) Determine the number of solutions for $n=10.$

Place 10 objects in a row, inserting a space between them.
[color=beige]. . [/color]$\circ\,\_\,\circ\,\_\,\circ\,\_\,\circ \,\_\,\circ\,\_\,\circ\,\_\,\circ\,\_\,\circ\,\_\, \circ\,\_\,\circ$

Select 3 of the 9 spaces and insert "dividers".

$\text{So that: }\:\circ\,\_\,\circ\,|\,\circ\,|\,\circ \,\_\,\circ\,\_\,\circ\,|\,\circ\,\_\,\circ\,\_\,\ circ\,\_\,\circ\:\text{ represents }\:2\,+\,1\,+\,3\,+\,4$

$\;\;\;\;\text{and: }\:\circ\,\_\,\circ\,\_\,\circ\,|\,\circ \,|\,\circ\,\_\,\circ\,\_\,\circ\,\_\,\circ\,\_\,\ circ\,|\,\circ\:\text{ represents }\:3\,+\,1\,+\,5\,+\,1$

$\text{Therefore, there are: }\:{9\choose3} \:=\:84\text{ solutions.}$

Quote:
 b) Find a general formula that counts the number of solutions for $x\,+\,y\,+\,z\,+\,w\:=\:n$ Note: Solutions (2, 2, 2, 4), (2, 2, 4, 2), (2, 4, 2, 2) and (4, 2, 2, 2) for $n=10$ [color=beige]. . . . . [/color]are each considered different and separate solutions.

Following the solution in part (a), place $n$ objects in a row (with spaces).

Select 3 of the $n-1$ spaces and insert "dividers".

$\text{Therefore, there are: }\:{n-1\choose3}\text{ solutions.}$

 Jakarta June 7th, 2012 10:05 PM

Re: Counting Problem

Quote:

Originally Posted by soroban
Hello, Jakarta!

Quote:
 Consider the equation $x\,+\,y\,+\,z\,+\,w\:=\:n$, where $n$ is a positive integer $\ge\,4.$ A solution is a set $(x,\,y,\,z,\,w)$ of positive integers that satisfies the equation for a given $n.$ a) Determine the number of solutions for $n=10.$

Place 10 objects in a row, inserting a space between them.
[color=beige]. . [/color]$\circ\,\_\,\circ\,\_\,\circ\,\_\,\circ \,\_\,\circ\,\_\,\circ\,\_\,\circ\,\_\,\circ\,\_\, \circ\,\_\,\circ$

Select 3 of the 9 spaces and insert "dividers".

$\text{So that: }\:\circ\,\_\,\circ\,|\,\circ\,|\,\circ \,\_\,\circ\,\_\,\circ\,|\,\circ\,\_\,\circ\,\_\,\ circ\,\_\,\circ\:\text{ represents }\:2\,+\,1\,+\,3\,+\,4$

$\;\;\;\;\text{and: }\:\circ\,\_\,\circ\,\_\,\circ\,|\,\circ \,|\,\circ\,\_\,\circ\,\_\,\circ\,\_\,\circ\,\_\,\ circ\,|\,\circ\:\text{ represents }\:3\,+\,1\,+\,5\,+\,1$

$\text{Therefore, there are: }\:{9\choose3} \:=\:84\text{ solutions.}$

[quote:3oncju6n]b) Find a general formula that counts the number of solutions for $x\,+\,y\,+\,z\,+\,w\:=\:n$

Note: Solutions (2, 2, 2, 4), (2, 2, 4, 2), (2, 4, 2, 2) and (4, 2, 2, 2) for $n=10$
[color=beige]. . . . . [/color]are each considered different and separate solutions.

Following the solution in part (a), place $n$ objects in a row (with spaces).

Select 3 of the $n-1$ spaces and insert "dividers".

$\text{Therefore, there are: }\:{n-1\choose3}\text{ solutions.}$

[/quote:3oncju6n]
Wow, that is extremely smart and clear. Thanks!

 All times are GMT -8. The time now is 08:17 PM.