Question: THIS IS IN MATLAB CODE Problem C2: Given an integer k find the number of derangements of {1,2,k}. There are a couple formulas you can
THIS IS IN MATLAB CODE

Problem C2: Given an integer k find the number of derangements of {1,2,k}. There are a couple formulas you can use to code this. Either kiki=k!m=0km!(1)mor=(k1)((k2)i+(k1)i) Use your code to find how many derangements of {1,2,,15} there are. Your code should be robust enough to calculate other values of ki as well. Instead of giving steps, I'm going to let you find your own way, if you want any guidance, email me and we can talk about the steps to calculate this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
