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

THIS IS IN MATLAB CODE Problem C2: Given an integer k find

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!