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?)