Q1. (15 marks) Permutation refers to the arrangement of all members of a set in a specific order. The number of permutat
Posted: Sun Jul 10, 2022 11:26 am
Q1. (15 marks) Permutation refers to the arrangement of all members of a set in a specific order. The number of permutations on a set of n elements is given by n!, where ! represents factorial. The Permutation Coefficient represented by P(n, k) is used to represent the number of ways to obtain an ordered subset having k elements from a set of n elements. Mathematically it's given as: (1.1) P(n, k) = n(n-1) * (n − 2) * (n − 3) ** which is 0 when k>n, and otherwise equal to 10 3 (10,3) = 720 n! (n-k)! .* (n − k + 1) Note: Value for k should be less than n. Test Case: Write a function named per(int n, int k) that returns value after performing permutation. Example Enter values for n and k