% Standalone source for Figure 1 (Q3 cube vertex layout).
% Compile: pdflatex fig1_cube.tex  ->  fig1_cube.pdf
\documentclass[border=4pt]{standalone}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[scale=1.0,
  vertex/.style={circle,draw=black,fill=white,inner sep=1pt,
                 minimum size=4mm,font=\scriptsize},
  edge/.style={gray!70, line width=0.5pt},
  graycycle/.style={blue!70!black, line width=1.0pt}]
  % Back face vertices (b_2 = 0)
  \node[vertex] (v000) at (0,0)        {000};
  \node[vertex] (v001) at (2.0,0)      {001};
  \node[vertex] (v011) at (2.55,0.55)  {011};
  \node[vertex] (v010) at (0.55,0.55)  {010};
  % Front face vertices (b_2 = 1)
  \node[vertex] (v100) at (0,1.65)     {100};
  \node[vertex] (v101) at (2.0,1.65)   {101};
  \node[vertex] (v111) at (2.55,2.2)   {111};
  \node[vertex] (v110) at (0.55,2.2)   {110};
  % Edges
  \draw[edge] (v010)--(v011);
  \draw[edge] (v110)--(v111);
  \draw[edge] (v010)--(v110);
  \draw[edge] (v011)--(v111);
  \draw[edge] (v000)--(v010);
  \draw[edge] (v001)--(v011);
  \draw[edge] (v100)--(v110);
  \draw[edge] (v101)--(v111);
  % Gray code Hamiltonian cycle
  \draw[graycycle] (v000)--(v001);
  \draw[graycycle] (v001)--(v011);
  \draw[graycycle] (v011)--(v010);
  \draw[graycycle] (v010)--(v110);
  \draw[graycycle] (v110)--(v111);
  \draw[graycycle] (v111)--(v101);
  \draw[graycycle] (v101)--(v100);
  \draw[graycycle] (v100) to[bend right=22] (v000);
\end{tikzpicture}
\end{document}
