假设有一个手提箱上有数字锁,而主人忘记了密码。数字锁有4个轮子,每个轮子都标有0到9之间的10个数字。只有按特定顺序排列4个特定数字时,才能解锁。但是问题在于所有者忘记了特定的顺序。当被问到时,他只记得第一位数字是7。为了打开锁,他可能需要检查多少个3位数字序列?为了回答这个问题,他立即开始列出所有可能的排列方式,一次排列3个剩余的9个数字。但是,此方法将很乏味,因为可能的序列数量可能很大。让我们看看一些基本的计数技术,这些技术使我们能够解决这些问题。
计数的基本原理
为了直观地理解此原理,我们来看一个示例。假设一个人有3条裤子和2件衬衫,然后弹出一个问题,他可以穿多少种衣服?有三种类型的裤子可供选择,因此共有三种选择裤子的方式。同样,有两种选择衬衫的方法。
让我们看看通过图表进行修整的所有不同方式。将P 1 ,P 2和P 3作为裤子,将S 1 ,S 2作为衬衫。下面给出的树列出了可能性的范围
如图所示,每种类型的裤子。有两种可能的衬衫可以穿。因此,总共有6种装饰方式。
问题:使用树形图计算将硬币抛掷3次时的可能性数。
回答:
So, there are in total 8 possibilities.
但是在这些情况下,我们不可能每次都手动计算可能性的数目或将它们树成一棵树。在这种情况下,计数的基本原理对我们有帮助。它说,
“If an event can occur in m different ways, following which another event can occur in n different ways, then the total number of occurrence of the events in the given order is m×n.”
该原理可以以相同的方式扩展到任意数量的事件。因此,对于三个事件,该原理变为:
“If an event can occur in m different ways, following which another event can occur in n different ways, following both of these events another event happens which can occur in p different ways. So, then the total number of occurrence of the events in the given order is “m × n × p”.
实例与应用
让我们看一下有关此原理的示例,以使我们的理解更为具体。
问题1:找出可以由ROSE单词的字母组成的,带或不带含义的四个字母的单词数量,其中不允许重复字母。
回答:
Number of words that can be formed from these four-letter words is equal number ways in which we can fill __ __ __ __ with letters R, O, S, E. Note that repetition is not allowed. The first place can be filled with any of the four letters, after that second place can only be filled by three letters because we have already used one and repetition is not allowed. Third place can only be filled by two letters and last place will be filled with the last remaining letter.
So, number of ways in which we can do this are. 4 × 3 × 2 × 1 = 24.
Note: If the repetition of the letters was allowed we could have always used four letters to fill each place. So 4 × 4 × 4 × 4 = 256.
问题2:给定6个不同颜色的标志,如果一个信号需要在另一个标志下方使用2个标志,则可以生成多少个不同的信号?
回答:
A signal can be seen like this.
Here in each position we can use the different colors of flag we are given. So, in the first position we have 6 different choices to make to fill in the position of flag 1. So, in the second position we will have 5 positions to fill because we have already used one color.
So, total number of ways to fill = 6 × 5 = 30.
问题3:如果数字可以重复,数字1、2、3、4、5可以形成多少个2位数偶数?
回答:
__ __, there are five possibilities for putting numbers in each place since the numbers can be repeated. But a constraint is given in the questions which says that the number should be even. So, all the even numbers have even digit as the last digit. In the given numbers, only 2 and 4 are two even numbers. So, at the unit’s place in the number, there are only two possibilities while their 5 possibilities for the tens place.
So, total number of possible even number = 5 × 2
= 10
问题4: 1000 = 2 3 5 3有多少个正数除数?
回答:
The positive divisor of 1000 will be in form 2a5b. Here, a and b will satisfy 0 ≤ a ≤ 3 and 0 ≤ b ≤ 3, It is clear that there are 4 possibilities of a and 4 possibilities of b, Hence, there are 4 × 4 = 16 Positive Integers of 1000.
问题5:巴黎有10本日报和4本周刊,如果艾米想只订阅一份日报和一本周刊杂志,她有多少种选择?
回答:
Amy will have 10 × 4 = 40 choices.