patrick, it goes something like:


while not all files matched, loop (the outer while-loop)
randomly pick 0's and 1's to form a string of those elements having the length of the file (the first for-to-next loop)
scan for all possible mixes of the pieces (the 2 inner for loops) and when it matches the randomly selected string (the if), increment the match count. also remove the pieces from the match array so the same pieces won't be accepted multiple times

and that's it.

I think.
_________________________
!

download KiXnet