← RoseCode

ROSECODE 476

A > B > C > A

Philippe_57721 · Programming ·

Given 2 dice A,B, we define P(A,B) as the probability of rolling a strictly higher value with A than B. If A={2,2,4,4,9,9} and B={1,1,6,6,8,8} we have P(A,B)=59>12

Thus the probability to win with A is greater than with B.
We write: A>B

We add a third die C={3,3,5,5,7,7}.
We have:
P(B,C)=59
P(C,A)=59

Therefore: A>B>C>A

A triple of dice is called non-transitive if:
A>B>C>A
P(A,B)=P(B,C)=P(C,A)

Of course if (A,B,C) is such a triple, so is (B,C,A) and (C,A,B).
These 3 triples are considered equivalent.

We consider dice with values in range {1,2,3,4,5,6,7,8}.

How many dictinct non-transitive triples are there?
There are triples where all faces for A have a distinct value. What is the last one in lexicographic order?
Between the 3 possible representation for a triple (A,B,C),(B,C,A) and (C,A,B), we choose the one where A is the first in lexicographic order

Answer format: Count/(die1)(die2)(die3)
Example : 9999/(9,9,9,9,9,9)(9,9,9,9,9,9)(9,9,9,9,9,9)

You are given there are 104 distinct non-transitive triples for the set {1,2,3,4,5,6}

[My timing: 80 sec]