TITLE: Weighted sum of two dice such that the result is a random integer between $0$ and $35$
QUESTION [8 upvotes]: The numbers shown by 2 dice are labelled $d$ and $e$. $A, B$ and $C$ are constants, giving a score $S=Ad + Be + C$. Find $A, B$ and $C$ such that the range of possible values for $S$ covers all integers from $0$ to $35$, with an equal probability of each score. [Oxford PAT exam, 2011]

I have tried to find equations in terms of $A, B, C$ for different values of $S$.

REPLY [2 votes]: I'm sure a more rigorous approach is possible, but thinking about this intuitively:
If we are rolling two dice, there are 6x6=36 possible outcomes. 0 to 35 is a range of 36 possible outcomes. Therefore, the solution must involve exactly one combination of the roll of the dice for each outcome: we can't have 2,1 and 1,2 both mapping to the same value, for example.
So I imagine a 2-dimensional table with 6 rows and 6 columns, with each cell in the table having a different number, from 0 to 35. The first row would be 0 to 5, the second 6 to 11, and so on. Every number from 0 to 35 occurs. Each number occurs exactly once, that is, each number represents exactly one combination of the roll of two dice, so all have equal probability.
I could generate the first number in each row by subtracting one from the die roll and then multiplying by 6. Or, if you prefer, multiply by 6 and then subtract 6. For the column offset I take the second die minus 1. That is:

S=(d x 6 - 6) + (e - 1)

or

S=d x 6 + e - 7