论文部分内容阅读
将n个球放入k个箱子中,有多少种不同的放法?此类问题我们称之为分球入箱问题。它含有多种情形:n个球是否相同?k个箱子有无差异?箱子允许空否?解决此类问题的关键是分辨在什么情况下与顺序有关,在什么情况下与顺序无关。现举例说明如下。例1 将7个相同的小球,放入4个相同的箱子中。 (1)每个箱子中至少有一个小球(箱子不空)有多少种不同的放法? (2)若箱子允许空又有多少种不同的放法? 分析箱子相同时不需考虑箱子的顺序,球相同也无需考虑球的差别,只要考虑各个箱子中放入小球的多少。可用穷举法求解。解 (1)箱子不空有3种放法:
How many different ways to put n balls in k boxes? This type of problem is called the ball-in-box problem. It contains a variety of situations: are n balls the same? are there differences between k boxes? are boxes allowed to be empty? The key to solving such problems is to identify under what circumstances are they related to the order, and under what circumstances they are not related to the order. The following is an example. Example 1 Place seven identical pellets in four identical boxes. (1) How many different methods are there for at least one ball in each box (the box is not empty)? (2) How many different methods are used if the box is allowed to be empty? It is not necessary to consider the box when the box is the same. Order, the same ball does not need to consider the difference between the ball, as long as the number of balls in each box is considered. Exhaustive method can be used to solve. Solution (1) The box is not empty There are 3 ways to place: