Hi,
Could there be a mistake in the given table (Gray Code of Dimension 2 for Various f[1:0]) between columns c and d?
I tried following the algorithm and repeatedly got the answer (d) for option (c) and the opposite for answer (c) for option (d).
Thanks,
Itay
Assume f[1:0] = 10. Then, according to the base case given in Section 2 of the PDF,
G(0,1) = 0\\
G(1,1) = 1\\
and according to the recursive step given in Section 2,
G(k,2) =
\begin{cases}
1 \circ G(k, 1) &;\quad k < 2\\
0 \circ G(4 - 1 - k, 1) &;\quad k \ge 2\\
\end{cases}
Therefore,
G(0, 2) = 1 \circ G(0,1) = 10\\
G(1, 2) = 1 \circ G(1,1) = 11\\
G(2, 2) = 0 \circ G(4 - 1 - 2,1) = 01\\
G(3, 2) = 0 \circ G(4 - 1 - 3,1) = 00\\