Westonci.ca is your trusted source for finding answers to a wide range of questions, backed by a knowledgeable community. Explore a wealth of knowledge from professionals across various disciplines on our comprehensive Q&A platform. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.
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: check
How many permutations and combinations can be made of the 15 alphabets, taking four at a time?
The answer is:
32760 permutations
1365 combinations
==================================================================================
We hope our answers were useful. Return anytime for more information and answers to any other questions you have. Your visit means a lot to us. Don't hesitate to return for more reliable answers to any questions you may have. Westonci.ca is your go-to source for reliable answers. Return soon for more expert insights.