有多少长度为 9 的位字符串正好有 4 个 0?
排列和组合是数学的一个分支,它处理从整个集合中选择项目子集的研究。在组合中,项目的选择顺序无关紧要。这些项目可以重新排列为所需的格式。例如,有三个字母 A、B 和 C。如果我们必须从中选择两个字母,那么我们就有 AB、BC 和 AC。这里,AB的选择等价于BA的选择。
但是,如果数字太大,则无法手动完成这些计算。因此,我们有,
nCr =
where n = total items to pick
r = the items to choose
因此,在状态示例中,
n C r = 3 C 2
=
有多少长度为 9 的位字符串正好有 4 个 0?
解决方案:
We have,
Total number of places to choose from = 9
The number of places to fill with 0’s = 4
Therefore, we have to fill 4 places with 0’s out of a total of 9 places.
According to the formula of combinations, where order of selection doesn’t matter.
nCr =
where n = total items to pick
r = the items to choose
Upon substituting the values we get,
=
Therefore,
There are 126 ways to have 9-bit strings containing exactly 4 0’s.
类似问题
问题 1. 从 9 男 12 女的办公室中选出一个 7 男 10 女的项目团队有多少种方法?
解决方案:
Here we have to find that in how many ways a project team can be selected in an office.
Thus,
To choose 7 men from 9 men
⇒ 9C5 ways = 9!/(9-5)!5!
⇒ 9!/4!5!
⇒ 9 × 8 × 7 × 6 × 5!/4 × 3 × 2 × 1 × 5!
⇒ 3024/24
= 126
Further,
To choose 10 women from 12 women
⇒ 12C10 = 12!/(12 – 10)!10!
⇒ 12 × 11 × 10!/2!10!
⇒ 132/2
⇒ 66
Therefore
The project team can be chosen in the
⇒ 66 × 126 ways
⇒ 8316 ways
问题 2. 找出 C(25, 23)。 C(n, r) = n!/(n – r)!r!
解决方案:
Here we have,
n = 25
r = 23
Substituting the values of n and r in C(n, r) = n!/(n – r)!r!
⇒ C(25, 23) = 25!/(25 – 23)!23!
⇒ C(25, 23) = 25!/(2)!23!
⇒ C(25, 23) = 25 × 24 × 23!/2! × 23!
⇒ C(25, 23) = 25 × 24/ 2
⇒ C(25, 23) = 600/2
⇒ C(25, 23) = 300
Therefore,
⇒ C(25, 23). C(n,r)=n!/(n – r)!r! = 300
问题3.找出6个小灯和8个大灯的吊灯有多少种灯,可以从8个小灯和10个大灯中选择?
解决方案:
Here we have to select lights for the chandelier
First finding the selection for small lights
Selecting, 6 small lights from 8 small lights
⇒ 8C6 = 8!/(8-6)!6!
⇒ 8!/2!6!
⇒ 8 × 7 × 6!/2 × 1 × 6!
Solving
⇒ 56/2
⇒ 28
⇒ 8C6 = 28
Therefore,
Small lights can be selected in 28 ways
Further selecting big lights
Selecting, 8 big lights from 10 big light
⇒ 10C8 = 10!/(10 – 8)!8!
⇒ 10!/2!8!
⇒ 10 × 9 × 8!/2 × 1 × 8!
Solving
⇒ 90/2
⇒ 45
10C8 = 45
Thus,
Big lights can be selected in 45 ways
Therefore,
Small and big lights in a chandelier can be selected in
⇒ 28 × 45
⇒ 1260 ways
问题 4. 找出 C(15, 13)。 C(n, r) = n!/(n – r)!r!
解决方案:
Here we have,
n = 15
r = 13
Substituting the values of n and r in C(n, r) = n!/(n – r)!r!
⇒ C(15, 13) = 15!/(15 – 13)!13!
⇒ C(15, 13) = 15!/(2)!13!
⇒ C(15, 13) = 15 × 14 × 13!/2! × 13!
⇒ C(15, 13) = 15 × 14/2
⇒ C(15, 13) = 210/2
⇒ C(15, 13) = 105
Therefore,
⇒ C(15, 13). C(n,r)=n!/(n – r)!r! = 105
问题 5. 找出 C(50, 47)。 C(n, r) = n!/(n – r)!r!
解决方案:
Here we have,
n = 50
r = 47
Substituting the values of n and r in C(n, r) = n!/(n – r)!r!
⇒ C(50, 47) = 50!/(50 – 47)!47!
⇒ C(50, 47) = 50!/(3)!47!
⇒ C(50, 47) = 50 × 49 × 48 × 47!/3! × 47!
⇒ C(50, 47) = 50 × 49 × 48/3 × 2
⇒ C(50, 47) = 117600/6
⇒ C(50, 47) = 19600
Therefore,
⇒ C(50, 47). C(n,r)=n!/(n – r)!r! = 19600