How can I solve problems like this:
Let ${c_1,c_2,c_3,c_4,c_5,c_6}$ be a random sequence where $c_i\in (0,1,2,3,4,5,6,7,8,9)$ What is probability that $c_1+c_2+c_3=c_4+c_5+c_6$,
$c_1$ to $c_6$ is not a number there can be all zeroes and combination like $1,1,1$ etc. is possible.
I have a problem with getting how many is combinations there are. I saw that for a specific number like $c_1+c_2+c_3=12$, it is possible to use a generating function, but I don't know how to use it when we have statement like in this problem.
It seems that you know how to compute $$p_k:=P\bigl[c_1+c_2+c_3=k\bigr]\qquad(0\leq k\leq27)\ .$$ The final result $p$ is then simply given by $$p=\sum_{k=0}^{27}p_k^2\ .$$ By the way: The generating function for the number of choices of $c_1$, $c_2$, $c_3$ summing to a given $k$ is $$\left(\sum_{i=0}^9 x^i\right)^3=(1-x^{10})^3(1-x)^{-3}=(1-3x^{10}+3x^{20}-x^{30}\bigr)\sum_{j=0}^\infty{2+j\choose j}x^j\ .$$