返回题库

彩球排成一行

Colorful Line

专题
Discrete Math / 离散数学
难度
L2

题目详情

有 3 个红球、7 个蓝球、9 个绿球(同色不可区分)。问:将 19 个球排成一行有多少种不同排列?

How many distinct ways can you arrange 33 red balls, 77 blue balls, and 99 green balls in a line?

解析

多重集合排列数为

19!3!7!9!=11085360.\frac{19!}{3!\,7!\,9!}=11085360.

Original Explanation

This is a classic anagrams problem, where we have three distinct groups (corresponding to the three colors) and every string corresponds to an arrangement of red, green, and blue. There are 1919 total balls, so if all were distinct, then there are 19!19! ways to arrange them. However, this overcounts by considering every ball distinct, where balls of the same color are not distinct. Therefore, we must divide out those arrangements. There are 9!9! arrangements of the 99 red balls that aren't distinct. Similarly, there are 7!7! and 3!3! ways to arrange for the other colors, so the answer is

19!9!7!3!=11085360\dfrac{19!}{9!7!3!} = 11085360