It has been quite some time since I've done permutations and combinations, and I'm attempting to remember the proper way to go about solving this issue (not a homework assignment, more of a thought exercise).
Say that I have 10 objects, each of which can have 1 of 6 possible operators applied, and furthermore each operator can be designated as ON or OFF.
To me, this would start out as a basic combination where n = 10 and r = 6. The binary aspect is where I get a bit fuzzy.
Would this become 2^nCr
? So, 2^10C6
? Or is this logic incorrect?
For example, there are 10 closed boxes. Each box can only have a single item inside, however that item is drawn from a set of 6. It is fine for multiple boxes to to have the same item. The binary aspect may be if the box is open or closed.
So, Box 1 has an orange, Box 2 has an apple, Box 3 has a grape, and so on. Box 4 also has an orange, however that box is closed (or OFF, whereas the rest are ON). Basically, each box will be assigned an item, and that item may be either visible or not visible. I need to find the total number of combinations of boxes to items to items that are visible.
Here is a secondary example:
Say I have 10 flashlights. Each flashlight can have a different color lightbulb, and the flashlight can be turned on or off. So, a green flashlight that is off is a different state than a green flashlight that is on, and similarly, a green flashlight that is off is different than a red flashlight in any state.
I'm trying to coerce my example into something non-software related. If I were to sketch out a small bit of pseudo-code, it'd look like this:
object[1].operation = OPERATION_1
object[1].operation_status = FALSE
object[2].operation = OPERATION_5
object[2].operation_status = TRUE
...