Permutations with conditions - small exclusions from a finite pool I am trying to calculate the number of possible set-ups for a game. There are 4 colors of beads (red, blue, green, and clear) and 18 places the beads can be placed. Using 5 beads of each color, you have 4×(18!/3!5!5!5!)+6×(18!/4!4!5!5!) (Roughly 7 Billion: 7.1E9) possible combinations. 
BUT
There are two places for each color where that color is excluded. So two spots can only have red, blue, or green, two other spaces can only have blue, green, and clear, etc. Am I correct in thinking that the number of possible permutations is simply calculated by changing the number of possible places from 18 to 16, since there are only 16 places available for each color? That is: 4×(16!/3!5!5!5!)+6×(16!/4!4!5!5!) (Roughly 23 Million: 2.3E7) combinations?
This solution strikes me as too simplistic, but I am unsure how else I can calculate these results. 
Thanks!
 A: Unfortunately your guess, while tempting at first glance, is not quite correct (it is, as you say, a little too simplistic).  Before we look at where it goes wrong, it is instructive to first outline the logic that led to the formula you give for the unrestricted case (the one corresponding to any bead being allowed in any square) for those readers who (like me at first) can't intuit where it comes from:


*

*There are 20 total beads, and 18 total squares, meaning that when the board is full, two beads are left off

*All arrangements are of two types: ones where the two missing beads are of the same color, and one where they are different.  

*In the first case, there are 4 ways to choose the color of the missing beads, and the beads remaining on the board belong to groups with multiplicities 5, 5, 5, and 3.  In the second case, there are 4*3/2 = 6 ways to choose the colors of the missing beads, and the remaining beads form color groups of multiplicities 5, 5, 4, and 4.

*Using the standard formulas, then, for permutations of objects, groups of which are indistinguishable, we get the final result $N_{boards}=4 \times \frac{18!}{5!5!5!3!} + 6 \times \frac{18!}{5!5!4!4!}$


This is all well and good; now let's tackle the case where certain squares cannot accept a bead of a certain color.  
Let's assume that we've chosen our two beads to leave off the board, and we're interested to find the way of arranging the remaining beads subject to these choices.  In the original, unrestricted case, this number was just 18! divided by a product-of-factorials that accounts for the indistinguishability of beads of the same color.  Let's ignore these latter factors for now; we can assume that, in addition to colors, numbers 1-18 are painted on our beads, making them distinguishable, count the number of ways of arranging these distinguishable beads subject to the color constraints, and then at the end imagine erasing the numbers and putting back in the product-of-factorials factor (hopefully it won't be too hard to convince yourself that this procedure is valid).
So, we are looking to find out what replaces 18! when we arrange 18 distinguishable, colored beads onto 18 squares, BUT requiring that there are two squares for every color where that color is excluded.  Let's imagine drawing a random first bead from a jar and placing it on the empty board.  Clearly, since exactly two squares are excluded for whatever color the bead is, this number of ways is 16.  We are well on our way to getting 16! which was your guess!  Now we pick the second bead from the jar and try to place it.  Trouble already!!  It's true that, for most placements of our first bead, the second bead will have 15 remaining allowed placements, but what if our first bead went on one of the squares where the second bead would have been excluded anyway due to it's color?  In that case, there are STILL 16 places left to put the second bead (we didn't "use up" any with the first bead).  Here's the rub: with the color constraints in place, we cannot imagine sequentially placing beads where each of these placements is independent.
So what's the correct way to do the calculation?  The answer is that it's a really hard problem.  While the fundamental combinatorics is trivial at each stage, there are just a whole lot of interdependent cases to analyze.  I won't do that here, but at least you now know that your original guess needs some refinement, and hopefully have some clues as to how to proceed if you choose to (though I would warn that this seems like a ~100 man-hour or more type of project to me... maybe someone else will find a clever solution :)).  Please report back if you end up finding your answer!
