We have a pool of numbers 1 thru 22. We then draw four numbers. Once a number is drawn, it is out of the pool. We repeat the drawing until we have gone thru all the 7,315 combinations.
I used MATLAB function combntns(set,subset)
Now the hard part: Assume that you want to only keep combinations, where no more than 2 out of 4 numbers are the same.
What is the formula to find out how many valid combinations there are?
Here are the first few valid combinations: $(1,2,3,4):(1,2,5,6):(1,2,7,8):(1,2,9,10):(1,2,11,12):(1,2,13,14)...$
Thank you for the help - DJ