Diagrams – Drawing a Diagram in LaTeX

diagrams

enter image description here

How can I draw this diagram in LaTeX?

Best Answer

I was using tikz-cd with smallmatrix. Obviously you can change the numbers and set a macro to replace each time the small matrix.

enter image description here

\documentclass[a4paper,12pt]{article}

\usepackage{tikz-cd}
\usepackage{mathtools}

\begin{document}

\begin{tikzcd}
 & \begin{smallmatrix}     0 & 0 & 0 \\      & 0 &            \end{smallmatrix}  \arrow[rd] &  & \begin{smallmatrix}     1 & 0 & 0 \\      & 0 &            \end{smallmatrix}  \arrow[rd] &  &  \\
 &  & \begin{smallmatrix}     1 & 1 & 0 \\      & 1 &            \end{smallmatrix}  \arrow[rd] \arrow[ru] &  & \begin{smallmatrix}     0 & 0 & 0 \\      & 1 &            \end{smallmatrix}  \arrow[rd] &  \\
 & \begin{smallmatrix}     0 & 0 & 0 \\      & 1 &            \end{smallmatrix}  \arrow[ru] \arrow[rd] &  & \begin{smallmatrix}     0 & 0 & 0 \\      & 1 &            \end{smallmatrix}  \arrow[ru] \arrow[rd] &  & \begin{smallmatrix}     1 & 0 & 0 \\      & 1 &            \end{smallmatrix}  \\
\begin{smallmatrix}     1 & 1 & 1 \\      & 1 &            \end{smallmatrix}  \arrow[ru] &  & \begin{smallmatrix}     0 & 0 & 0 \\      & 1 &            \end{smallmatrix}  \arrow[ru] &  & \begin{smallmatrix}     0 & 0 & 0 \\      & 0 &            \end{smallmatrix}  \arrow[ru] & 
\end{tikzcd}

\end{document}
Related Question