阶乘公式
数字“n”的阶乘定义为小于“n”到 1 的所有整数的乘积。因此,它可以定义为数字 4 的阶乘为 4 × 3 × 2 × 1 = 24。它由符号“!”表示。假设需要写5的阶乘,可以写成5!和5的价值!是 5 × 4 × 3 × 2 × 1 = 120。让我们看一下广义形式的阶乘公式,
阶乘公式
如前所述,某个数的阶乘是该数与小于该数直到 1 的所有数的乘积。因此,如果该数是 n,并且需要找到 n 的阶乘,则 n 应该是乘以 (n – 1), (n – 2),... 直到 1。阶乘的公式将变为,
Factorial of n = n! = n × (n – 1) × (n – 2) × … × 1
阶乘的性质
- 任何数的阶乘都是整数
- 阶乘也可以表示为递归函数。
n! = n × (n – 1) × (n – 2) × … × 1 = n × (n – 1)!
- 零的阶乘是1,也就是0! = 1
- 未定义负数的阶乘
阶乘公式的用途
阶乘公式用于许多领域,特别是在数学的排列和组合中。例如,
- 可以将 n 个不同对象排列成一行的方式数等于n!
- 当顺序很重要时,排列给出了从 n 个元素中选择 r 个元素的方法的数量。它使用公式n P r给出。
nPr = n! / (n – r)!
- 组合给出了从 n 个元素中选择 r 个元素的方法的数量,其中顺序无关紧要。它以n C r给出。
nCr = n! / r! (n – r)!
示例问题
问题 1:求阶乘 5 的值。
解决方案:
To find the factorial of 5, we need to multiply all the whole numbers smaller than or equal to 5.
5! = 5 × 4 × 3 × 2 × 1 = 120
Hence, 5! = 120
问题 2:求一个数 x 的值,给定 x 的阶乘,是 720。
解决方案:
Apply the recursive property of factorial to find x. Until and unless we get 720 as our result, we will proceed recursively.
1! = 1
2! = 2 × 1! = 2
3! = 3 × 2! =6
4! = 4 × 3! = 4 × 6 = 24
5! = 5 × 4! = 5 × 24 = 120
6! = 6 × 5! = 6 × 120 = 720
Since 720 is obtained as the factorial of 6, one can compare the value of x with 6.
Thus, the value of x = 6
问题 3:找出 5 个不同对象可以排成一排的方式数。
解决方案:
Use the property that the number of ways n distinct objects can be arranged in a row is equal to n!
Thus, 5 distinct objects can be arranged in 5! = 5 × 4 × 3 × 2 × 1 = 120.
So, the number of ways is equal to 120.
问题 4:找出可以从 50 名学生中选出 3 名学生的方法数。
解决方案:
To find the number of ways 3 students can be selected from a class of 50 students, we can use the formula for Combination, since the order of the selected three students does not matter here.
Thus, the total number of ways = 50C3
So, this can be simplified as 50C3 = 50! / (3! × 47!) = (50 × 49 × 48 × 47!) / (3! × 47!) = 50 ×49 × 48 / 6 = 19,600
So, there are a total of 19,600 ways.
问题 5:10 人一组,要分发三种不同的水果。找出可行的方法总数。
解决方案:
Since, in this case, the order of how the fruits are distributed matters, we need to implement Permutation.
So, the total number of ways is given as 10P3.
Simplifying, this can be written as,
10P3 = 10! / (10 – 3) ! = 10! / 7! = 10 × 9 × 8 × 7! / 7! = 10 × 9 × 8 = 720
Thus, there are a total of 720 ways possible.