Probability of one alternatively numbered die rolling higher than another differently numbered die?

Given two alternatively numbered dice:

Die A: $$2\ 2\ 4\ 4\ 5\ 6$$

Die B: $$3\ 3\ 3\ 4\ 4\ 5$$

How can I calculate the probability that Die A will roll higher than Die B for this pair or any other pair of alternatively numbered dice?

Obviously, I can just count the pairs of possible rolls and compare the numbers (This method gives me a $$5/9$$ chance for Die A to roll higher). However, this method seems slow as I would be generating and comparing a large number of dice as a means to check if a set of dice is nontransitive. So how would I find the probability analytically?

• I don't think there is a simple way to avoid the direct computation. It's very fast for any explicit dice though.
– lulu
May 22, 2019 at 0:19
• It looks to me as if in your example the probability A will roll higher is $\frac{17}{36}$, that B will roll higher is $\frac{14}{36}$ and that they will roll the same is $\frac{5}{36}$ May 22, 2019 at 0:35

\def\P{\mathop{\sf P}}\begin{align}\P(A>B)&=\P(A>3)\P(B=3)+\P(A>4)\P(B=4)+\P(A>5)\P(B=5)\\&=\tfrac 46\tfrac 36+\tfrac 26\tfrac 26+\tfrac 16\tfrac 16\\&=\tfrac{17}{36}\end{align}