I would like to know how can I calculate how many possible groups of 10 exclusive pairs can I draw out of a permutation list of 20 elements. I'm able to calculate the 190 pairs from 20 elements, and now I want to draw 10 pairs at a time and make it so the next draw there's no repetition from the previous. My C# algorithm tells me I can draw 9 times before running out of exclusive pairs. Why is it 9?
The gist of the algorithm is:
- Get a permutation list of the 20 elements in exclusive pairs (no A = B)
- Draws a pair of the permutation list, check if either A or B is not present in resulting list, remove from the permutation list, and repeat 9 extra times, resulting in 10 exclusive pairs.
I can see 9 groups of 10 exclusive pairs and then the algorithm can't find any other exclusive pair to draw.
Check out this related question. Number of ways of dividing 20 persons into 10 couples
If it is still not working, please post your code so that we can see if there is an issue with the algorithm. Without it, it's difficult to tell.