The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+14 votes
777 views
  1. In how many ways can a given positive integer $n \geq 2$ be expressed as the sum of $2$ positive integers (which are not necessarily distinct). For example, for $n=3$ the number of ways is $2$, i.e., $1+2, 2+1$. Give only the answer without any explanation.
  2. In how many ways can a given positive integer $n \geq 3$ be expressed as the sum of $3$ positive integers (which are not necessarily distinct). For example, for $n=4$, the number of ways is $3$, i.e., $1+2+1, 2+1+1$. Give only the answer without explanation.
  3. In how many ways can a given positive integer $n \geq k$ be expressed as the sum of $k$ positive integers (which are not necessarily distinct). Give only the answer without explanation.
asked in Combinatory by Veteran (59.6k points)
edited by | 777 views

2 Answers

+21 votes
Best answer
  1. $n= 2 \left(1+1\right),\;n=3\left(1+2, 2+1\right),\\n=4\left(1+3,3+1,2+2\right),\;n=5\left(1+4,4+1,2+3,3+2\right)$
    so $x_1+x_2=n\;\text{and}\;x_1,x_2>{0}$ (no.of integral sol)
    This is same as number of ways of putting $\left(n-2\right)$  (as we can't have $0$ for either $x_1$ or $x_2$) identical balls into two distinct bins, which is obtained by putting a divider across $\left(n-2\right)$ balls and taking all possible permutations with $\left(n-2\right)$ being identical. i.e., $\frac{(n-2 + 1)!}{(n-2)!} = (n-1).$
    We can also use the following formula ,
    $^{(n-2+2-1)}C_{(2-1)}=^{n-1}C_1.$
     
  2. $n=3\left(1+1+1\right),\;n=4\left(1+1+2,1+2+1,2+1+1\right),\\ n=5\left(1+1+3,1+3+1,3+1+1,2+2+1,2+1+2,1+2+2\right) $
    so $x_1+x_2+x_3=n\;\text{and}\;x_1,x_2,x_3>0$ (no.of integral sol) 
    Here, we can permute $\left(n-3\right)$ items with $2$ dividers which will give $\frac{(n-3 + 2)!}{(n-3)!2!}$
    $\begin{align}&=\frac{\left(n-1\right)!}{\left(n-1-2\right)!2!}\\\\&=\;^{n-1}C_2\end{align}$
     
  3. $^{(n-k+k-1)}C_{k-1}=^{n-1}C_{k-1}.$
answered by Junior (793 points)
edited by
+5

reference :

Theorem one

Suppose one has n objects (to be represented as stars; in the example below n = 7) to be placed into k bins (in the example k = 3), such that all bins contain at least one object; one distinguishes the bins (say they are numbered 1 to k) but one does not wish to distinguish the n stars (so configurations are only distinguished by the number of stars present in each bin; in fact a configuration is represented by a k-tuple of positive integers as in the statement of the theorem). Instead of starting to place stars into bins, one starts by placing the stars on a line:

★ ★ ★ ★ ★ ★ ★

Fig. 1: seven objects represented by stars

where the stars for the first bin will be taken from the left, followed by the stars for the second bin, and so forth. Thus the configuration will be determined once one knows what is the first star going to the second bin, and the first star going to the third bin, and so on. One can indicate this by placing k − 1 separating bars at some places between two stars; since no bin is allowed to be empty, there can be at most one bar between a given pair of stars:

★ ★ ★ ★ | | ★ ★

Fig. 2: two bars give rise to three bins containing 4, 1, and 2 objects

Thus one views the n stars as fixed objects defining n − 1 gaps, in each of which there may or not be one bar (bin partition). One has to choose k − 1 of them to actually contain a bar; therefore there are $ \tbinom {n-1}{k-1}$ possible configurations (see combination).

0
nice & simple......
+1
$x_{1}+x_{2}= n$ where $x_{1},x_{2}> 0$ or $x_{1},x_{2} \geq 1$

So $x_{1}+1+x_{2}+1= n$

or, $x_{1}+x_{2}= n-2$

For those who r getting confused with n-2 .... like me :p
0
*best explanation @ supromit roy*
+4

In simple words, We can think of expressing an integer $n$ as a sum of $k$ positive integers as dividing a queue of stars using $k-1$ bars and the number of stars in any partition give that positive number. 

$Example-  \ n = 5 \ k =3$
$\star \star | \star \star | \star  \rightarrow 5= 2+2+1$

In general, $n$ stars create $n-1$ gaps between them and we have to choose $k-1$ gaps for placing bars. 
                                                     $\Large\star \_ \star\_  \star\_  \star\_  \star$

This can be done in $\binom{n-1}{k-1}$ ways.

0
I am trying to solve this using gen functions.

x1+x2=n . An integer is divided into two boxes where each box will contain a number.

LHS= $(x+x^{2}+x^{3}+x^{4}+x^{5}....)(x+x^{2}+x^{3}+x^{4}+x^{5}....)$

$x(1+x+x^{2}+x^{3}+x^{4}) \times x(1+x+x^{2}+x^{3}+x^{4})$

$x(1-x)^{^-1} \times x(1-x)^{^-1}$

$x{^2}(1-x)^{-2}$

$x^{2} \prod_{r=0}^{\propto }\binom{r+2-1}{2-1}x^{r}$

$x^{2} \prod_{r=0}^{\propto }(r+1)x^{r}$

$\prod_{r=0}^{\propto }(r+1)x^{r+2}$

RHS =$[x^{n}]$

 

solving r I get  r=n-2.

So  coefficient of x^{n} would be n-1

 Is this correct way to do it as I have a doubt when I expand the gen function? Kindly help!!
0 votes

(a) Total no of ways = C(n-1 ,1) = n-1

(b)Total no of ways = C(n-1 ,n-3) = C(n-1 ,2) = (n-1)⨉(n-2) /2

(c)Total no of ways = C(n-k+k-1 ,n-k) = C(n-1 , n-k) = C(n-1 , k-1)

answered by Loyal (6.8k points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

40,770 questions
47,479 answers
145,658 comments
62,241 users