Question

In: Math

Solve using Matlab three problems: One using the combination formula One using the permutation of n...

Solve using Matlab three problems:

One using the combination formula

One using the permutation of n objects formula

One using the permutation of r objects out of n objects

You can pick these problems from the textbook or you can make up your own questions.


This is the full question
I have to come up with three different problems and solve each ine using each one of these formulas on matlab ( write them on matlab as codes )

Solutions

Expert Solution

% 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

==================================================================================


Related Solutions

Matlab project: Solve using Matlab three problems: One using the combination formula One using the permutation...
Matlab project: Solve using Matlab three problems: One using the combination formula One using the permutation of n objects formula One using the permutation of r objects out of n objects You can pick these problems from the textbook or you can make up your own questions.
Solve the following problems by using the binomial formula. a. If n = 4 and p...
Solve the following problems by using the binomial formula. a. If n = 4 and p = 0.45, find P(x = 3). b. If n = 7 and p = 0.75, find P(x = 4). c. If n = 10 and p = 0.75, find P(x ≥ 7). d. If n = 12 and p = 0.60, find P(5 ≤ x ≤ 7).
Basic probability question. Please solve with details showing the usage of formula for combination/permutation as needed....
Basic probability question. Please solve with details showing the usage of formula for combination/permutation as needed. Question: A bowl contains 10 marbles, each with a color and a number denoted by B1, B2, B3, B4, R1, R2, R3, G1, G2, G3. Two marbles are randomly drawn without replacement. (a) What is the size of the sample space? (b) Determine the probability of drawing two marbles that has a sum of an odd number. (c) Determine the probability of drawing the...
Permutation and Combination 1. How many ways can the letters A B C be arranged, using...
Permutation and Combination 1. How many ways can the letters A B C be arranged, using each letter only once? 2. A code has 4 digits in a specific order, the digits are between 0-9. How many different permutations are there if one digit may only be used once? 3. In how many ways can three students be selected for a project from a group of fifteen students? 4. Richmond Machine Shop has eight machines but only three spaces available...
Show in excel please with correct formula Solve all the problems using after tax cash flow...
Show in excel please with correct formula Solve all the problems using after tax cash flow analysis, even the book ask in some of them to use BTCF The Container Corporation of America is considering replacing an automatic painting machine purchased 9 years ago for $700,000. It has a market value today of $40,000. The unit costs $350,000 annually to operate and maintain. A new unit can be purchased for $800,000 and will have annualO&Mcosts of $120,000. If the old...
a. Show the formula you use to solve the problems, and the corresponding numbers in the...
a. Show the formula you use to solve the problems, and the corresponding numbers in the formula. Show all the steps. b. Show all the inputs and outputs. JetHair’searnings are $6 per share. The firm’s ROE is 50%and its plowback ratio is 40%. a. What is JetHair’sdividend for next year ? b. What is the current stock price if its required rate of return is 35%?
Solve Kepler's Equations Using Euler's Method in matlab.
Solve Kepler's Equations Using Euler's Method in matlab.
Instructions: 1. Solve the following problems in a MATLAB script. You will be allowed to submit...
Instructions: 1. Solve the following problems in a MATLAB script. You will be allowed to submit only one script, please work all the problems in the same script (Hint: careful with variables names) 2. Show your work and make comments in the same script (Use %). Please write your name in the first line of the scrip with % 3. It is OK to work with other students, but what you submit should be your own work – not something...
Instructions: 1. Solve the following problems in a MATLAB script. You will be allowed to submit...
Instructions: 1. Solve the following problems in a MATLAB script. You will be allowed to submit only one script, please work all the problems in the same script (Hint: careful with variables names) 2. Show your work and make comments in the same script (Use %). Please write your name in the first line of the scrip with % 3. It is OK to work with other students, but what you submit should be your own work – not something...
Create a program using Matlab that can solve Three Dimensional Space; Vectors, Partial Derivatives or any...
Create a program using Matlab that can solve Three Dimensional Space; Vectors, Partial Derivatives or any of the topic in calculus 3; show 5 examples please thankyou!! just use matlab for the solution like the codes thankyou
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT