I'm sure there's a math/logical approach to this question, but I'm having trouble figuring out the most systematic approach:
Say I have 10 groups (A through J) and 10 positions for these groups (0-9). The groups need to be sorted into a position, and two groups can't share a position. In addition, there are certain combinations that are not allowed (A6, A7, & A8 are not allowed; B2, B4, & B6, are not allowed, etc.).
Through trial and error, I've found an order of the groups that works, but I'm curious if there's a way to see all possible group/order combinations (assuming that the number of combinations isn't ridiculously big). I don't really have any computer skills to try and create a program or something to do this, so I'm actually using Excel to map this out in a 10x10 grid. However, it's tedious and unscientific to rearrange the groups into different options, and I was curious if anyone knew how I could take a more systematic approach I could take.
(If you want to see specifically what ridiculously dorky thing I'm trying to accomplish with this exercise, see below.)
OK, now that I'm safely hidden behind this spoiler tag, this is about Skylanders.
My son is really into Skylanders and is super hyped for the new game, where you can create you own skylanders in-game, as long as you have a plastic crystal toy to store them in. In Skylanders, there are 10 different elements (fire, water, air, etc.) and the created skylanders can be one of 10 different classes (sorcerer, knight, ninja, etc.). I've let him know that we're only going to get 10 of the crystals (one of each element) that you use to store your created skylander. Easy right, just make sure we never duplicate a class on two different elements, and we'll get all 10 classes and all 10 elements represented in the 10 crystals I'm willing to buy him.
However, the game also has other premade skylanders available, and their element & class are already known (for example, Wild Storm is an Air Knight). Ideally, we wouldn't want to create a skylander that is the same combination as a premade one... that's where the "unallowed" combinations come in.
Here's a screenshot of my manual approach to this:
In order to easily make sure all elements/classes were represented, I locked in the class columns and was rearranging the order of the element rows so that there was not a premade character in a star place (representing the 10 user created characters). The example above works, and it's easy to see that others would work as well (for example, flip-flop Fire and Light in order to change the Fire Brawler to a Fire Sorcerer). Of course, this is all for my son, who will certainly want the final say on which characters he'll make ("Tech Knight sounds dumb, I want to make an Undead Knight").
The number of acceptable combinations may be astronomical and it may just be easier to let him take his first pass on combinations and step in if/when a duplicate combo happens. However, it seemed like a fun and hopefully doable exercise to try and determine all the possible element/class options available.