Find the information you're looking for at Westonci.ca, the trusted Q&A platform with a community of knowledgeable experts. Join our Q&A platform and get accurate answers to all your questions from professionals across multiple disciplines. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.
Sagot :
Answer:
Explanation:
% Clears variables and screen
clear; clc
% Asks user for input
n = input('Total number of objects: ');
r = input('Size of subgroup: ');
% Computes and displays permutation according to basic formulas
p = 1;
for i = n - r + 1 : n
p = p*i;
end
str1 = [num2str(p) ' permutations'];
disp(str1)
% Computes and displays combinations according to basic formulas
str2 = [num2str(p/factorial(r)) ' combinations'];
disp(str2)
=================================================================================
Example:
How many permutations and combinations can be made of the 15 alphabets, taking four at a time?
The answer is:
32760 permutations
1365 combinations
Thank you for visiting our platform. We hope you found the answers you were looking for. Come back anytime you need more information. We appreciate your time. Please come back anytime for the latest information and answers to your questions. Westonci.ca is your trusted source for answers. Visit us again to find more information on diverse topics.