The following program performs N shuffles of an array of size M. The array is initialized with a[i]=i (where i = 0..M-1) before each shuffle. The results are displayed in an M-by-M table (indexed [i][j]) where each row i shows the number of times i wound up in position j.

```class Program
{
static Random rnd = new Random();

static void Main(string[] args)
{
int M = 10;    // the size of an array to be shuffled
int N = 10000; // the number of shuffles

int[] a = new int[M];
int[,] cnt = new int[M, M]; // the M-by-M table to show the results

// Shuffle the array N times.
for (int n = 0; n < N; ++n)
{
// Initialize the array before each shuffle.
for (int i = 0; i < a.Length; ++i)
a[i] = i;

Shuffle(a);

// Count the number of times i wound up in position j.
for (int i = 0; i < a.Length; ++i)
cnt[a[i], i]++;
}

// The min and max variables represent the min and max values in the M-by-M results table.
int min = 2 * (N / M), max = -1;

Console.WriteLine("Result:");
for (int i = 0; i < M; ++i)
{
for (int j = 0; j < M; ++j)
{
Console.Write("{0,6:D} ", cnt[i, j]);

// Determine the min and max values.
if (cnt[i, j] < min) min = cnt[i, j];
if (cnt[i, j] > max) max = cnt[i, j];
}
Console.WriteLine();
}

// Show the min and max values.
Console.WriteLine("N / M = {0}", N / M);
Console.WriteLine("min = {0}", min);
Console.WriteLine("max = {0}", max);
Console.WriteLine("max - min = {0}", max - min);
}

// Randomly shuffle the elements in an array.
static void Shuffle(int[] a)
{
int M = a.Length;
for (int i = 0; i < M; ++i)
{
// Exchange a[i] with a random element in a[i..M-1]
int r = rnd.Next(i, M);
int tmp = a[i];
a[i] = a[r];
a[r] = tmp;
}
}
}
```

If the shuffling is truly random, all values in the resulting table should be close to N/M. This is one of the possible results:

```Result:
1030   1036   1012   1006   1005    965    986    943    998   1019
1005   1039   1004    990    945   1036    957   1001   1004   1019
1033    976    940   1041    953    995   1036    995   1007   1024
1039    942   1001    935   1049   1018   1042   1003    969   1002
981    989   1000   1003    982    989   1027   1039   1004    986
974   1016   1009   1015    982    983   1019   1028    977    997
1024   1026   1009    955   1010   1015   1001    987    960   1013
967    934   1054   1042   1045    995    968   1001   1002    992
933    995    995   1021    992   1018    992   1011   1036   1007
1014   1047    976    992   1037    986    972    992   1043    941
N / M = 1000
min = 933
max = 1054
max - min = 121
```

You can see that the values are quite close to N/M (which in this case is 1000). The difference between the maximum and minimum is only 121.

What happens if we use a different shuffling algorithm? Let's exchange a[i] with a random element in the range a[0..M-1] rather than a[i..M-1]:

```static void BadShuffle(int[] a)
{
int M = a.Length;
for (int i = 0; i < M; ++i)
{
// Exchange a[i] with a random element in a[0..M-1]
int r = rnd.Next(0, M); // bad shuffling!
int tmp = a[i];
a[i] = a[r];
a[r] = tmp;
}
}
```

The above function does not shuffle the elements entirely randomly which means that the resulting order is not equally likely to be one of the M! possibilities.

This is one of the possible results:

```Result:
1018    986    985    988    982   1039    957    980   1008   1057
1326    938    905    964    959    968    976    983    967   1014
1226   1185    905    905    987   1005    916    907    978    986
1104   1157   1234    902    865    902    935    934   1009    958
1023   1104   1159   1205    875    854    954    931    965    930
935   1052   1043   1151   1172    860    857    993    927   1010
876   1017   1009   1067   1099   1186    909    902    928   1007
900    933    984    986   1057   1133   1220    864    928    995
863    858    900    924    971   1050   1173   1322    930   1009
729    770    876    908   1033   1003   1103   1184   1360   1034
N / M = 1000
min = 729
max = 1360
max - min = 631
```

You can see that the values are widely dispersed, in this case, between 729 and 1360 with the maximum difference of 631. This shows that exchanging a[i] with a random element in a[i..M-1] rather than in a[0..M-1] produces the higher level of randomization.