排列与组合–定义,差异,示例
排列被称为选择,然后是来自给定序列或项目集合的特定项目集的排列。排列由以下公式表示,
nPr = (n!)/(n-r)!, n > 0 and r > 0
where,
n is considered to be the number of different elements.
r is the arrangement pattern of the element.
组合
组合是指从给定的项目序列或项目集合中选择特定项目集。在组合的情况下,单个项目的选择顺序没有任何相关性。组合由以下公式表示,
nCr = (n!)/[r! (n-r)!], n>0 and r>0
where
n is the number of different elements
r is the arrangement pattern of the element
排列和组合之间的主要区别如下:Permutation Combination Ordered arrangement of items Unordered arrangement of items Also known as ordered elements Also known as an unordered set of elements A single combination may lead to the derivation of multiple permutations. A single permutation can lead to only a single combination. Order is important. Order does not hold any relevance.
为了说明排列和组合之间的区别,我们可以考虑以下示例;
假设我们有 3 个字母,A、B 和 C。
现在,
从三项中任选两项的可能组合如下:
AB (=BC)
BC (=CB)
CA (=AC)
nCr = (n!)/[r! (n-r)!]
= 3Cr
Therefore, there are three ways of choosing two items.
现在,在排列的情况下,
AB
BA
BC
CB
CA
AC
nPr = (n!)/(n-r)!
因此,有六种方法可以从总共六个项目中选择和排列两个项目。
示例问题
问题1:举一个Yash和Yashvi两个项目的排列组合的例子
解决方案:
Possible Permutations are
Yash Yashvi
Yashvi Yash
Possible Combinations are
Yash Yashvi, since both the items have to be definitely selected
问题 2:计算从 6 个项目中选择 4 个项目的排列。
解决方案:
We know,
nPr = (n!)/(n-r)!, n>0 and r>0
Here,
n = 6
r = 4
Substituting the values, we get,
nPr = (6!)/(6-4)!
= 6!/2!
= 6 * 5 * 4 * 3
= 360
问题 3:计算从 6 个项目中选择 4 个项目的组合。
解决方案:
We know,
nCr = (n!)/[r! (n-r)!], n>0 and r>0
Here,
n = 6
r = 4
Substituting the values, we get,
nPr = (6!)/[4! * (6-4)!]
= 6! / (4! * 2!)
= 6!/ 4! * 2
= (6 * 5 * 4 * 3 * 2 )/ (4 * 3 * 2) * 2
= 15
问题4:计算5!,如果假设,4! = 100
解决方案:
We know,
n! = n * (n-1)!
Substituting the given hypothetical values, we get,
5! = 5 * 4!
= 5 * 4!
= 5 * 100
= 500