I have no maths background, but I am looking for an answer for the following problem for work-related purposes.
- We have a certain set of actors $A$ and their number is always $n(A)>0$.
- We have a certain set of enemies $E$ and their number is always $n(E)>0$.
- Each actor and each enemy may have a flag DO_NOT_PAIR. The probability whether they have a flag or not is not specified. We do know in each case how many actors $A$ or enemies $E$ have the flag.
- Each actor $A$ randomly chooses its target from a set of enemies $E$.
- Each enemy $E$ randomly choses its target from a set of actors $A$.
- For each actor $A$ and for each enemy $E$ we check whether its target has a flag DO_NOT_PAIR. If anyone paired up with a target with a flag, we jump back to step 4 and repeat the algorithm. If no one is paired up with a target with a flag, we finish the algorithm.
The question is:
In certain situations it will be mathematically impossible to pair everyone correctly (for example when all actors or all enemies have a flag). How many jumps from step 6 we must perform in order to ensure that we checked at least $p\%$ of all possible pairings (or if that's not possible to figure out: that we have $c\%$ certainty that we checked $p\%$ of all possible pairings?).
I hope I phrased the problem clearly. English is not my first language and I have at best sub-par knowledge on maths terminology. Thanks in advance.