Simpler ways to solve this conditional probability question? Here's a restatement of a programming problem I found on the Peking Online Judge website.

Your friend paints each side of each of 4 dice red or blue, independently, with equal probability. They roll the dice twice and reveal the number $k_1$ of dice with red faces showing after the first roll, and the number $k_2$ after the second roll. What is the expected number of dice that will have red faces up after the third roll?

I was able to solve this using Bayes' rule and total probability, expanding out and summing over all of the possible ways to paint the faces red. This was a little messy (but not too bad).
I found some solutions online (in Chinese, but Google Translate works well) that seem much simpler, but I wasn't able to follow the justification provided.
Alternate solution 1, which is the one implemented in the code snippet in the linked blog post, considers the conditional probability of a single die rolling red, given that die's initial two rolls, and somehow uses this to construct the overall expectation. I was able to understand how to compute the conditional probability of a single die rolling red, given its first two rolls, but not how to apply this in a straightforward way to solve the overall four-dice problem.
Alternate solution 2 directly computes the expectation as $(k_1 + k_2 + 10) / 7$. I wasn't able to understand how this was derived.
Question: How can one take advantage of symmetry or other characteristics of the problem to solve it in a way simpler than my initial approach? (In particular, where does the very simple formula in alternate solution 2 come from?)
 A: For a single die rolled twice,

*

*if you get $2$ red, the conditional probability the next is red is some number $p$


*if you get $1$ red, the conditional probability the next is red is $\frac12$ by symmetry


*if you get $0$ red, the conditional probability the next is red is $1-p$ by symmetry
so you could say the conditional probability the next is red is $(1-p)$ plus $(p-\frac12)$ times the number of reds seen on the first two rolls of the first die.  Since you either get $0$ or $1$ red, this is also the conditional expectation of the number of reds seen on the third roll of the first die.
For four dice, you simply add these up across the four dice, using linearity of expectation, so the total conditional expectation of the number of reds seen on the third roll of all four dice is $4(1-p)+(p-\frac12)(k_1+k_2)$
The only difficult calculation you have to do is work out $p$, and this turns out to be $\frac9{14}$, so substituting this means the conditional expectation is $\frac{10}7+\frac17(k_1+k_2)$
