I'm not very strong with math so be gentle. I decided against posting this to StackOverflow, even though it has to do heavily with Excel VBA. I think my primary questions belong here.
Let's say I have the numbers 1 through 30 (inclusive), and I'm "matching" them with each other and want to find out a few things:
- I'm confident with this, but want confirmation: am I correct in assuming that there are
30!possible ways to arrange the numbers 1 to 30? This feels like the deck of cards situation to me.
The next question is more difficult to describe so I'll attempt to simplify it.
Let's say instead that I have 30 people. I'm pairing people off every day: #1 pairs with #30, #2 pairs with #29, #3 pairs with #28, and so on...
Tomorrow they do the same thing, but since 1 and 30 already met, they can't anymore, ever again. #1 meets with #29 instead, and so on all the way down to #2, once per day until the options are exhausted.
In the end, I have decided that 29 possible outcomes exist, or
n - 1. This is because each day you're removing an option that exists for every single person. So by the end of the 29 days, everyone will have met everyone else ONLY once.
My intention here is to produce all the possible outcomes in columns in excel, for
n = 30 in this case, but ultimately for any
n. I'm attempting to figure out the logic behind that, but wanted to confirm all the math first.
Thanks very much.
Edit: I have some follow up thoughts. The number 435 has been bugging me. I would argue that while 1 meets with 2, there are a number of other possible meetings available for the rest of the people. For example, 3 could meet with: 4, 5, 6...or 30. Does 435 cover all possible potential meetings? It may help to show the second part of my question here which shows a screenshot of partial results of my data: https://stackoverflow.com/questions/43684136/excel-vba-producing-all-combinations-of-a-range-of-values