سلام
\documentclass{article}
\usepackage{tikz}
\newcommand\encircle[1]{%
\tikz[baseline=(X.base)]
\node (X) [draw, shape=circle, inner sep=0] {\strut #1};}
\begin{document}
\begin{tabular}{c|ccc|c|}
\multicolumn{1}{c}{$w_1$} & $w_2$ & $w_3$ & \multicolumn{1}{c}{$w_4$} & \multicolumn{1}{c}{$w_5$}
\\\cline{2-5}
$z_1$ & 7 & 8 & 9 & 10
\\
$z_2$ & 12 & 13 & 14 & 15
\\
$z_3$ & 17 & 18 & \encircle{19} & 20
\\\cline{2-5}
\end{tabular}
\end{document}