Random word generator with a equal probability of occurrence of letters : <p>So I made a pretty simple word generator program in c# that works relatively well. My question is how to generate a words with a equal probability of occurrence of letters eg. aaaa, aabb or abab</p>

<p>My code:</p>

<pre><code>listView1.Items.Clear();

        int num_letters = 4;
        int num_words = 20;

      char[] letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray();

       Random rand = new Random();

         for (int i = 1; i &lt;= num_words; i++)
        {
           string word = "";
            for (int j = 1; j &lt;= num_letters; j++)
            {
                int letter_num = rand.Next(0, letters.Length - 1);

               word += letters[letter_num];
            }

             listView1.Items.Add(word);
</code></pre>
