191k views
1 vote
Suppose a jar contains r red balls and b blue balls, each with a unique identifier on it. How many ways are there to choose a set of two balls of the same color? Of different colors? Show that the sum of these two numbers is the number of ways of choosing two balls from the total, ignoring color.

User Kmatyaszek
by
7.1k points

1 Answer

3 votes

Answer:

Ways to choose a set two balls of the same color:

[0.5 * (b) * (b - 1)] + [0.5* (r) * (r - 1)]

Different colors:

0.5 * [(b) * (r) + (r) * (b)] = 0.5 * (2 * b * r)

= b * r

Any two balls

0.5 * (b + r) * (b + r - 1)

= 0.5 * [b * (b + r - 1) + r * (b + r - 1)]

= 0.5 * [b^2 + b * r - b + b * r + r^2 - r]

= 0.5 * [b^2 - b + r^2 - r + b * r + b * r]

= 0.5 * [b * (b - 1) + r * (r - 1) + 2 * b * r]

= 0.5 * (b * (b - 1)) + 0.5 * (r * (r - 1)) + 0.5 * (2 * b * r)

= [0.5 * (b * (b - 1)) + 0.5 * (r * (r - 1))] + [b * r]

= Number of ways of choosing two balls of the same color + number of ways of choosing two balls with different colors

Explanation:

User Amit Bens
by
8.0k points