Tom is brushing up his math skills. He has a bag containing n balls of different colors. Now Tom can randomly pick any even number of balls from the bag. Tom wants to find out the sum of all such combinations of balls that he can pull out from the bag, given he can pull out at max k balls in one pick.
Answers
Answered by
1
Let me do this for Tom picking up 2 balls at a time from a bag of n balls.
sum = 1/2 Σ_i Σ_j (i+j) such that i ≠ j
= 1/2 Σ_i [i Σ_j 1 + Σ_j j ] - 1/2 Σ_i (i+i)
= 1/2 Σ_i [n i + n(n+1)/2 ] - n(n+1)/2
= 1/2 n Σ_i i + n(n+1)/4 Σ_i 1 - n(n+1)/2
= n² (n+1)/4 + n²(n+1)/4 - n (n+1)/2
= (n-1) n (n+1) / 2
example:
bag contains 2 balls, labeled: 1, 2....
Tom draws two balls.. 1 , 2... sum = 3 , by formula = 3
bag contains 3 balls.. labeled 1,2,3
tom draws 2 balls: 1,2 or 2,3 or 1,3... sum=12 also by formula.
sum = 1/2 Σ_i Σ_j (i+j) such that i ≠ j
= 1/2 Σ_i [i Σ_j 1 + Σ_j j ] - 1/2 Σ_i (i+i)
= 1/2 Σ_i [n i + n(n+1)/2 ] - n(n+1)/2
= 1/2 n Σ_i i + n(n+1)/4 Σ_i 1 - n(n+1)/2
= n² (n+1)/4 + n²(n+1)/4 - n (n+1)/2
= (n-1) n (n+1) / 2
example:
bag contains 2 balls, labeled: 1, 2....
Tom draws two balls.. 1 , 2... sum = 3 , by formula = 3
bag contains 3 balls.. labeled 1,2,3
tom draws 2 balls: 1,2 or 2,3 or 1,3... sum=12 also by formula.
Similar questions