using System.Collections.Generic;
public static class Suffler
public static void Shuffle<T>(this IList<T> list, Random rnd)
for(var i=list.Count; i > 0; i--)
list.Swap(0, rnd.Next(0, i));
public static void Swap<T>(this IList<T> list, int i, int j)
public static void Main()
int[,] counts = new int[5,5];
for (int i = 0; i < a.Length; ++i) {
for (int j = 0; j < a.Length; ++j)
for (int t = 0; t < trials; ++t) {
for (int j = 0; j < a.Length; ++j)
for (int i = 0; i < a.Length; ++i) {
for (int j = 0; j < a.Length; ++j)
Console.Write("{0}\t", counts[i, j]/trials);