Question: Recall Problem 1.15, which dealt with random permutations. Write a program which simulates many random permutations of vector (1, 2, ... ,N) and, for each,
Recall Problem 1.15, which dealt with random permutations. Write a program which simulates many random permutations of vector (1, 2, ... ,N) and, for each, computes the number of positions of the vector such that position i contains the number i. Keep track of these numbers and then plot their empirical (i.e.
simulated) frequencies, along with the exact probability of their occurrence.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
