How many solutions over $\mathbb N$ (includes $0$) are to $x_1+x_2+x_3+x_4+x_5+x_6=30$ if the three conditions below must hold:
if $x_1=6$ then $x_2\neq 4$, if $x_3=6$ then $x_4\neq 4$, if $x_5=6$ then $x_6\neq 4$?
I thought to use inclusion/exclusion principle here. In general there're ${30-1+6\choose 30}$ solutions.
We can count how many solutions are if $x_i=6\land x_{i+1}=4$ for $i=1,3,5$. There're ${20-1+4\choose 20}$ solutions.
If two "anti-conditions" hold together then there're ${10-1+2\choose 10}$ and if all three "anti-conditions" hold then there's only one solution.
Therefore the final answer is: $$ {30-1+6\choose 30}-3{20-1+4\choose 20}+3{10-1+2\choose 10}-1=319351 $$
I'm not sure this is correct application of inclusion/exclusion principle here.