probability of subset contained in dice rolls of custom dice with duplicate symbols I play a game where you roll 24 dice, 6 of 4 different colors with each color having a different set of numbers and math operations
these are the dice colors and possible symbols, there are 6 dice of each color, 24 total:
red = 0, 1, 2, 3, +, -
blue = 0, 1, 2, 3, x, /
green = 4, 5, 6, -, x, ^
black = 7, 8, 9, +, /, √
In the game you set a goal of up to 6 dice and the rest of the game involves manipulating the dice to find something equivalent to the goal, but I'm only interested in the probability of setting a goal.
My question:

If I have a subset of symbols that I need say, (x, 1, 1, 4, +, 3), call it $D$. What is the probability that $D$ will exist in each roll of the set of all rolls of 6 red, blue, green, and black dice?
This problem is particularly tricky because some symbols repeat, like x is on blue and green cubes, 1 is on red and blue cubes, + is on red and black cubes.

I've tried to solve this problem myself by brute forcing it in python, but computing 6^24 dice rolls is not feasible for me, and I also tried computing each color as a separate instance, but I couldn't figure out how to find the probability.
I don't know much probability theory, I've taken statistics a while ago, and have looked up numerous questions on this forum; but I either don't know the right question to ask, or I don't find it already asked.

The probability is $$\frac{635545571166992339}{2369190669160808448} \approx 0.268.$$
You can compute this by dynamic programming.
For a given multiset of symbols $S$ and a set of dice $D$, we will compute the probability $p(S,D)$ that all symbols in $S$ come out in a throw of $D$ as follows:


*

*Base case: $D$ is empty. If $S$ is empty then the probability is 1, otherwise it's 0.

*If $D$ is not empty, choose $d \in D$ arbitrarily. Go over all possible realizations $x$ of $d$. For each of them, if $x$ in $S$, let $q_x = p(S \setminus \{x\}, D \setminus \{d\})$, and otherwise, let $q_x = p(S, D \setminus \{d\})$. The answer is $\sum_x q_x/|d|$ (in your case, $|d| = 6$).


The easiest way to compute this efficiently is using memoization, which is how I computed the number above.
