<s>[INST] Number of paths in 3D coordinates A cute problem which is an extension of a well-known counting problem:
Find the number of paths of length $12$ from $(0,0,0)$ to $(4,4,4)$ passing through adjacent lattice points (for two ajacent points in the path, the distance between them is $1$), which avoid $(1,1,1), (2,2,2), (3,3,3)$.
 [/INST] We can use inclusion exclusion. let $f(S)$ be the number of paths that pass through all the elements of $S$. Then we want:
$\color{blue}{f(\emptyset)}-\color{red}{f((1,1,1))}-\color{green}{f((2,2,2))}-\color{purple}{f((3,3,3))}+\color{blue}{f((1,1,1),(2,2,2))}+\color{red}{f((1,1,1),(2,2,2))}+\color{green}{f((1,1,1),(3,3,3))}+\color{purple}{f((1,1,1),(3,3,3))}-\color{blue}{f((1,1,1),(2,2,2),(3,3,3)}$
Calculating each one we get:
$\color{blue}{\binom{12}{4,4,4}}-\color{red}{\binom{3}{1,1,1}\binom{9}{3,3,3}}-\color{green}{\binom{6}{2,2,2}\binom{6}{2,2,2}}-\color{purple}{\binom{9}{3,3,3}\binom{3}{1,1,1}}+\color{grey}{3\binom{3}{1,1,1}\binom{3}{1,1,1}\binom{6}{2,2,2}}-\color{blue}{\binom{3}{1,1,1}\binom{3}{1,1,1}\binom{3}{1,1,1}\binom{3}{1,1,1}}$
</s>