topnush
I would like to reproduce this image:
![Screenshot from 2022-05-05 17-55-16.png](/image?hash=cdc9f783c68ae159e2433894364fb6e59a00e5e69e8a3250156741e235e513fe)
I can make the grid of nodes with:
```
\documentclass{beamer}
\usepackage{tikz}
\tikzset{
dot/.style 2 args={fill, circle, inner sep=1pt, label={#1:\scriptsize #2}}
}
\begin{document}
\begin{frame}
\begin{tikzpicture}[
C/.style = {circle, draw, fill=yellow, minimum size=5mm,
inner sep=0pt, outer sep=0pt}
]
\foreach \x in {0,...,3}{
\foreach \y in {0,...,3}{
\node (\x) [C] at (\x,\y) {};
}
}
\end{tikzpicture}
\end{frame}
\end{document}
```
I don't know how to do the rest sadly.
Top Answer
CarLaTeX
A solution with two TikZ matrices:
```
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix}
\usetikzlibrary{positioning}
\usetikzlibrary{fit}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shapes.arrows}
\tikzset{mymatr/.style={matrix of nodes,
nodes in empty cells,
nodes={draw=black, fill=yellow, circle, thick},
row sep=5mm,
column sep=5mm}}
\begin{document}
\begin{frame}[fragile]
\begin{center}
\begin{tikzpicture}
\matrix[mymatr](matrA){
&&&\\
&&&\\
&&&\\
&&&\\};
\foreach \i in {1,...,4}
{\foreach[evaluate=\j as \jsucc using int(\j+1)] \j in {1,...,3}
{\draw[thick] (matrA-\i-\j) -- (matrA-\i-\jsucc);
\draw[thick] (matrA-\j-\i) -- (matrA-\jsucc-\i);}}
\node[single arrow, fill=green, draw=black, thick, right=4mm of matrA, minimum height=1cm] (myar) {};
\matrix[mymatr, right=4mm of myar](matrB){
&&&\\
&&&\\
&&&\\
&&&\\};
\foreach \i in {1,...,4}
{\draw[thick] (matrB-\i-1) -- (matrB-\i-2);
\draw[thick] (matrB-\i-3) -- (matrB-\i-4);}
\foreach \i in {2,4}
{\draw[line width=3pt] (matrB-1-\i) -- (matrB-2-\i);
\draw[line width=3pt] (matrB-3-\i) -- (matrB-4-\i);}
\foreach \i in {2,3}
{\draw[line width=4pt] (matrB-\i-2) -- (matrB-\i-3);}
\draw[line width=6pt] (matrB-2-3) -- (matrB-3-3);
\node[fit=(matrA-3-1)(matrA-4-4), label={160:\huge\color{blue}\bfseries U}, inner sep=1pt, draw=blue, line width=2pt, ellipse]{};
\node[fit=(matrB-3-1)(matrB-4-4), label={20:\huge\color{blue}\bfseries U}, inner sep=1pt, draw=blue, line width=2pt, ellipse]{};
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}
```
![image.png](/image?hash=1db22c1fef24307391199bad3e6db1c9e35758c2e155b54d31a957c70212a2e5)