Geometry
posted by John on .
Six standard sixsided die are rolled. Let p be the probability that the dice can be arranged in a row such that for 1\leq k \leq 6 the sum of the first k dice is not a multiple of 3. Then p can be expressed as \frac{a}{b} where a and b are coprime positive integers. What is the value of a + b?

A hint. There are three kinds of numbers in each dice. Those leaving a remainder of 1 when divided by 3, those leaving a remainder of 2 when divided by 3, and the multiples of 3.
The remainder of a sum is equal to the sum of the remainders.
So, instead of each dice having {1,2,3,4,5,6}, let's imagine they actually have {1,2,0,1,2,0}. That is, we replace each number by its remainder. We're just Changing The Representation of problem.
This will make things easier.
Now, let's try to make a configuration of dices with {1,2}, without using the {0}.
Well, if you start with {1}, then the next number can only be {1}, right? Then, applying the same reasoning, the next number can only be {2}, and the next can only be {1}, and so on. You see, when you have a certain sum at some point of the sequence, you can only add {1} or {2} (not both), for one of them would make the sum a multiple of 3.
In the end, the only possible configuration starting with {1} and having no zeros is
112121
Analogously, the only configuration starting with {2} is 221212.
And now, what about the zeros?
It's very simple. The configurations starting with {1} (having zeros or not) are:
112121
101212
100121
100012
100001
100000
And also their permutations with the zeros (I mean, you can change the place of zeros, but not the other numbers). For instance, the example you made before, (1,1,2,1,2,3), is nothing more than a zeropermutation of the abovelisted {101212}.
Doesn't it make sense? The {0} doesn't interfere in the sum, so you can just put more zeros anywhere in the configuration (but not in the beginning, of course).
Also, the configurations starting with {2} are:
221212
202121
200212
200021
200002
200000
Now, what is the total of possible dice configurations, regardless of order?
We're going to need some imagination for answering that.
Imagine we have six dices in a row, but they are blank, without any number. You have a paintbrush, to paint the numbers on them. You will determine which numbers to paint using five toothpicks.
You will place the toothpicks in the spaces between the dices, or also in the extremities of the row (before the first dice or after the last one). You may put several toothpicks on the same place, but you must place them all somewhere.
Then, you paint all the dices before the first toothpick with the number 1;
all the dices between the first and second toothpick with the number 2;
all the dices between the second and third toothpick with the number 3, and so on.
Do you realize that, by analyzing all the possibilities for toothpickplacing, we're also getting all the possible dice configurations, regardless of order, through an onetoone correspondency? Again, we're Changing The Representation of the problem (I usually do that a lot when solving them).
For example, the {1,1,1,2,2,3} is the result of the following toothpickplacing:
OOOIOOIOIII
Fine, you will have 11 imaginary objetcs on the table (6 dices and 5 toothpicks). But you don't know yet which of these objects will be "toothpicks" (for you didn't place them). You must "elect" five of them to be toothpicks. So, it's a combination problem.
11 choose 5 = 462
Now comes the hard part. We must take each one of those 12 configurations we listed before, and calculate how many "reallife" configurations they represent. Remember that each one of those digits actually stand for two reallife numbers.
Example: the configuration {101212}.
 Some of these {1}'s represent an actual {1} (they are true numbers), but others represent a {4} (they are fake numbers). We must use again the toothpick method: we have three numbers {1} and we must place one toothpick somewhere between them to separate the "true" numbers from the "fake" ones. Result: 4 possibilities.
 We do the same with the {2}'s. Result: 3 possibilities.
 And the {0} can also can be true or fake, so more 2 possibilities.
 Multiply it all: 4*3*2 = 24.
So {101212} stands for 24 dice configurations. Keep doing this toothpickplacing with all the 12 imaginary configurations, and then sum everything. Divide the result by 462 and then you'll find p. Plz tell me what the answer comes out. 
The answer is 43.