Combinations and Permutations with F#  7/11/2010 6:16:41 PM
Understanding combinations and permutations is a fundamental
skill in software testing. In this months Test Run column I show
you how to work with combinations and permutations using code
written in the new F# language.  A mathematical combination is a
subset ofk items selected from a set of n items, where order
does not matter. For example, if n = 5 and k = 2, all possible
ways to select two items from five items are:  Notice that I do
not list the combination {1,0} because it is considered the same
as {0,1}. Also, I have listed the 10 combinations of five items
selected two at a time using what is called lexicographical
order, where the values in each combination element are listed
in increasing order.  A mathematical permutation is all possible
rearrangements of n items. For example, if n = 4, all possible
permutations listed in lexicographical order are:  When working
with combinations and permutations, two important functions are
Choose(n,k) an