<s>[INST] Probability that the sum of 6 dice rolls is even Question:

6 unbiased dice are tossed together. What is the probability that the sum of all the dice is an even number?

I think the answer would be 50%, purely by intuition. However, not sure if this is correct. How should I go about solving such a problem?
 [/INST] The generating function approach:
$$P(x)=(1+x+x^2+x^3+x^4+x^5)^6=\sum a_i x^i$$
Then $a_i$ counts the number of ways of getting a total of $i+6$ from $6$ dice.
Now, to find the even terms, you can compute $$\frac{P(1)+P(-1)}{2}=\sum_i a_{2i}.$$
But $P(1)=6^6$ and $P(-1)=0$. So $$\frac{P(1)+P(-1)}{2}=\frac{6^6}{2},$$ or exactly half, as you conjectured.
For another example, let $N_{i}$ be the number of ways to roll $6$ dice and getting a value $\equiv i\pmod{5}$. Then it turns out that if $z$ is a primitive $5$th root of unity, then the value can be counted by defining:
$$Q_i(x)=x^{6-i}(1+x+x^2+x^3+x^4+x^5)^6$$
then computing $$N_i=\frac{Q_i(1)+Q_i(z)+Q_i(z^2)+Q_i(z^3)+Q_i(z^4)}{5}$$
This gives the result:
$$N_i =\begin{cases}\frac{6^6+4}{5}&i\equiv 1\pmod 5\\
\frac{6^6-1}{5}&\text{otherwise}
\end{cases}$$
More generally, if $N_{n,i}$ is the number of ways to get $\equiv i\pmod 5$ when $n$ dice are rolled, you get:
$$N_{n,i} =\begin{cases}\frac{6^n+4}{5}&i\equiv n\pmod 5\\
\frac{6^n-1}{5}&\text{otherwise}
\end{cases}$$
It's this simple because of the fact that $6=5+1$. 
If each die has $d$ sides, and you ask what are the number of ways to get a total $\equiv i\pmod {d-1}$, then you get:
$$N_{d,n,i} =\begin{cases}\frac{d^n+{d-2}}{d-1}=\frac{d^n-1}{d-1}+1&i\equiv n\pmod {d-1}\\
\frac{d^n-1}{d-1}&\text{otherwise}
\end{cases}$$
</s>