I tried to solve the following question and would love someone to check my work.
Let $\displaystyle x_1,x_2,x_3,x_4$ $100$ digits long numbers where every digit is $1$ or $2$.
Find the number of non-negative solutions to the equation $\displaystyle x_1+x_2+x_3+x_4=6\cdot{\frac{10^{100}-1}{9}}$
My try: First $\displaystyle 6\cdot{\frac{10^{100}-1}{9}}=6(10^0+10^1+...+10^{99})$.
We are told that $\forall i\in[1,4]: x_i \ \mathrm{is} \ 100 \ \mathrm{digits \ long}$, thus we can write $$x_1=\sum_{i=0}^{99}y_i\cdot{10^i} \ ; \ x_2=\sum_{i=0}^{99}z_i\cdot{10^i} \ ; \ x_3=\sum_{i=0}^{99}w_i\cdot{10^i} \ ; \ x_4=\sum_{i=0}^{99}t_i\cdot{10^i}$$ So, $$\small (y_0+z_0+w_0+t_0)10^0+(y_1+z_1+w_1+t_1)10^1+...+(y_{99}+z_{99}+w_{99}+t_{99})10^{99}=6(10^0+...+10^{99})$$ Equating coefficients we get a system of $100$ equations: $$\begin{cases}y_0+z_0+w_0+t_0=6\\ \qquad\qquad\vdots \\y_{99}+z_{99}+w_{99}+t_{99}=6\end{cases}$$ Hence, we need to find the number of non-negative solutions of the equation $a_1+a_2+a_3+a_4=6$ where $\forall i\in[1,4]: \ 1 \le a_i \le 2$. Using generating function I found that there are six optional solutions, hence any of the $100$ equations has six solutions and the equations are not dependent, hence the original formula has $6^{100}$ optional solutions.
Is my reasoning correct? Is the final answer correct?
Thanks!