Q2.2.7Deducing the top-face value of a die
If two adjacent sides of a regular, 6-sided die have the values \(a\) and \(b\) when viewed side-on and read left-to-right, the value on the top of the die is given by \(3(a^3b - ab^3)\mod 7\).
Determine the value on the top of the die if (a) \(a=2, b=6\), (b) \(a=3, b=5\).
Show solution
Using Python's operators:
>>> a = 2
>>> b = 6
>>> 3 * (a**3 * b - a * b**3) % 7
3
>>> a = 3
>>> b = 5
>>> 3 * (a**3 * b - a * b**3) % 7
1