Math Probability Question

Alright, so lets say that I have 9 tiles arranged in a 3x3 pattern.
Each of these tiles has 3 possible variations, lets say they can be either Red, Blue, or Green.


It's easy for me to find out how many combinations there are, its simply 39 or 19,683 possible combinations.


Now, lets say that I divide the tiles into three groups, with 3 tiles each. (This is where it get's confusing).
Now instead of each tile having a Red, Blue, or Green condition randomly, it is now fixed (meaning that you will never get multiples of a color in that set of 3).


An example is in the spoiler below.

Spoiler
If Tile 1 is set to Red, then Tile 2 will be automatically set to Green, and Tile 3 set to Blue.
If Tile 1 is set to Green, then Tile 2 will be automatically set to Blue, and Tile 3 set to Red.


If Tile 1 is set to Blue, then Tile 2 will be automatically set to Red, and Tile 3 set to Green.



With this new fixed system, how many combinations of tiles can I achieve in a 3x3 space? 


What kind of formula would I use to figure this out?
It's way lower. The first tile can be anything, so there are 3 choices for it. The 2nd tile can be anything but the 1st tile's color, so there are 2 choices for it. The 3rd tile has 1 choice, as it has to be the only color left. That is 3 * 2 * 1 or 6 choices per set of 3.


Since each set of 3 is independent, it is 6 * 6 * 6 = 216 total choices. It gets even lower if you decide you want tile 1 in set 1 and tile 2 in set 1 to not be the same.


But it was all multiplication rule, just had to exclude the cases that no longer mattered.
ya I was beat to the punchline... also if you needed alternatives to your rules, one could use a Power Set function I would think.
@bgillisp


bgillisp.png


@chungsie


chungsie.jpg
nah, it's even easier than that, because the second and third tile in each group won't choose between colors..


You're saying if tile 1 is color 1, then tile 2 WILL be color 2, not that it can either be color 2 or 3.  So each group of 3 only has 3 possible outcomes, not 6: 3x1x1, rather than 3x2x1.


Since each group is independent, you have 3 possibilities for group 1, 3 for group 2 and 3 for group 3.  3x3x3 = 27.
@Shaz: That's if you use the fixed examples provided. I assumed it could take on either of the two remaining colors, and read those as examples only. But yes, if you force it into that pattern, then it is 27 like you said.
Thanks for the help @bgillisp @chungsie @Shaz


I've gotten all the information I need! I appreciate it very much!

Original thread: https://forums.rpgmakerweb.com/threads/math-probability-question.67088/