有多少种方法可以选择 3 个非负整数使得 a + b + c = 10?
排列被称为按顺序组织组,主体或数字的过程,从集合中选择主体或数字,被称为组合,其中数字的顺序无关紧要。
在数学中,排列也被称为组织一个群的过程,其中一个群的所有成员都被排列成某种顺序或顺序。如果组已经排列,则置换过程称为对其组件的重新定位。排列发生在几乎所有数学领域。它们大多出现在考虑某些有限集合上的不同命令时。
置换公式
在排列中,从一组 n 个事物中挑选出 r 个事物,没有任何替换。在这个挑选的顺序。
nPr = (n!)/(n – r)!
Here,
n = group size, the total number of things in the group
r = subset size, the number of things to be selected from the group
组合
组合是从集合中选择数字的函数,这样(不像排列)选择的顺序无关紧要。在较小的情况下,可以计算组合的数量。这种组合被称为一次合并n个事物而不重复。组合起来,顺序无关紧要,您可以按任何顺序选择项目。对于那些允许重复出现的组合,经常使用术语 k-selection 或 k-combination with replication。
组合配方
组合 r 个东西是从一组 n 个东西中挑选出来的,挑选的顺序无关紧要。
nCr = n!⁄((n-r)! r!
Here,
n = Number of items in set
r = Number of things picked from the group
有多少种方法可以选择 3 个非负整数使得 a + b + c = 10?
解决方案:
x1 + x2 + x3 + x4 + ………. + xr = n
then, no. of ways with non-negative integer value = n+r-1Cr-1
a + b+ c = 10
n = 10, r = 3
No. of ways with non-negative integer value = 10+3-1C3-1
= 12C2 = 12!/2!10!
= 66 ways
类似问题
问题 1:如果 a + b + c + d = 20,则 (a, b, c, d) 存在多少个唯一的非负整数解?
解决方案:
x1 + x2 + x3 + x4 + ………. + xr = n
then, no. of ways with non-negative integer value= n+r-1Cr-1
a + b+ c + d = 20
n = 20, r = 4
No. of ways with non-negative integer value = 20+4-1C4-1
= 23C3 = 23!!/3!20!
= 1771 ways
问题2:如果a + b + c + d = 20,(a, b, c, d) 有多少个正整数解?
回答:
We assign at least a value of 1 to a, b, c, d.
So, we can say a = a + 1, b = b+ 1, c = c + 1, d = d + 1 where a, b c, d are positive integers
= a+ 1 + b+ 1 + c + 1 + d + 1 = 20
= a + b + c + d = 20 – 4
= a + b + c + d = 16
Number of solutions = (16+(4-1)) C(4-1)
= 19C3 = 19!/3!16!
= 969
问题 3:如果 a + b + c + d=15,对于 (a, b, c, d) 存在多少唯一的非负整数解,使得 a > 5 且 b > 2。
解决方案:
We allocate at least a value of 5 to a and 2 to b
So, a = a + 5 and b = b + 2
= a + 5 + b + 2 + c + d = 15
= a+ b + c + d = 8
Number of solutions = (8+4-1)C(4-1)
= 11C3 = 11!/3!8!
= 165
问题 4:如果 a + b + c + d = 20,对于 (a, b, c, d) 存在多少唯一的非负整数解,使得 a > b。
解决方案:
Let us first understand the state where a = b
If a = b = 0, c + d = 20. This has 21 possibilities
If a = b = 1, c + d = 18. This has 19 possibilities
If a = b = 2, c + d = 16. This has 17 possibilities
.
.
If a = b = 10, c + d = 0. This has 1 possibility
So, the total number of a possibilities when a = b is 21 + 19 + 17 … + 1 = 11/2*(21 + 1) = 121
We know that the numeral of chances when a, b, c, and d are non-negative number is 1771. Out of these 1771 occurrence, in 121 occurrence a = b.
So, in 1771 – 121 = 1650 occurrence a is not equal to b.
In half of the above occurrence a will be greater than b whereas in the other half of the occurrence a will be less than b.
So, number of solutions where a > b is 1650/2 = 825