For fixed integers n and k , find all k -tuples of non-negative integers ( a 1 , a 2 , … a k ) such that
a 1 + a 2 + ⋯ + a k = n
For each integer i from 0 to n , let p i be the probability that one of the a j is equal to i . What is the value of
1 × p 1 + 2 × p 2 + ⋯ n × p n ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Very nice solution. I did it exactly the same way interpreting the sum as an expectation.
Log in to reply
That is a very nice solution by Calvin sir.I did using the same approach.However, in case you just want the answer and not the proof,then take n=k=1.In that case p1=1.So the value of the expression asked becomes 1.Only one option,that is n/k will give the answer as 1.Hence the answer is n/k.
Log in to reply
Well it is always safer to have a proof when you're trying to generalize a result; though strong intuition is also key to "see through" the problem.
For solutions, the idea is to explain why the answer is true, and not just assume that there must be a true answer in the options.
The key to this is that there is nothing special about the integer j . We are being asked for the expected value E [ a j ] of the j th integer. The symmetry of the problem makes it clear that E [ a 1 ] = E [ a 2 ] = ⋯ = E [ a k ] and so, since a 1 + a 2 + ⋯ + a k = n , it is clear that each expectation is equal to k n .
Here is a simpler solution that uses only an elementary counting argument. List the set of all solutions of the equations in a particular order. Assume that there is a total of N solutions and the integer i appears in the j th solution N i j times. Then, we have i = 0 ∑ n i N i j = n , ∀ j = 1 , 2 , … N , ( 1 ) Note that, there is a total of N k coordinates (i.e., a i 's). Fraction of the coordinates in which the integer i appears is p i = N k 1 j = 1 ∑ N N i j Hence, i = 0 ∑ n i p i = ( a ) N k 1 ( j = 1 ∑ N i = 0 ∑ n i N i j ) = ( b ) N k N n = k n , where in (a), we have interchanged the order of summation and in (b), we have used the equation (1).
Problem Loading...
Note Loading...
Set Loading...
Observe that the expression 0 × p 0 + 1 × p 1 + 2 × p 2 + ⋯ n × p n is actually asking for the expected value of a term.
For each equation, suppose that we have a solution A 1 + A 2 + ⋯ + A k = n , it is clear that the expected value of each term is simply ∑ 1 ∑ a i = k n . This tells us that E [ X ∣ a 1 = A 1 , a 2 = A 2 , … , a k = A k ] = k n .
Now, we apply the law of iterated expectation , which tells us that
E [ X ] = ∑ E [ X ∣ P i ] × P ( P i )
Letting P i be the individual events of each solution set { A 1 , A 2 , … A k } , we get that E [ X ] = ∑ E [ X ∣ P i ] × P ( P i ) . Since each of the E [ X ∣ P i ] values are equal to k n , hence we conclude that
E [ X ] = ∑ k n × P ( P i ) = k n ∑ P ( P 1 ) = k n × 1
Thus, the answer to the question is k n .
Note: This solution is independent of which specific sets of equations we have to use (e.g. do we allow repeated terms, do we count permutations as distinct solution sets, etc).
In fact, it is also independent of the types of integers that we're allowed to have. In particular, the answer is the same for positive integers or the positive odd integers! All that it uses is ∑ P ( P i ) = 1 , so we just need to ensure that there exists non-zero but finitely many solutions to the equation, for the uniform distribution selection to make sense.