Is the following Greedy algorithm to generate Gray Codes always correct?
Your construction results in the standard binary-reflected Gray code, a recursive construction of which is described on Wikipedia, for example. We can also describe it in a different way: to generate the $m$'th codeword from the $(m-1)$'th, flip the least significant 1 bit of $m$. For example, when $n=3$, we have:
$$
\begin{array}{c|c}
000 &amp; 000 \\
00\textbf{1} &amp; 00\textbf{1} \\
0\textbf{1}1 &amp; 0\textbf{1}0 \\
01\textbf{0} &amp; 01\textbf{1} \\
\textbf{1}10 &amp; \textbf{1}00 \\
11\textbf{1} &amp; 10\textbf{1} \\
1\textbf{0}1 &amp; 1\textbf{1}0 \\
10\textbf{0} &amp; 11\textbf{1}
\end{array}
$$