3 ms·
Any sequence has 2n codes. Example with 6: 000 100 110 111 101 001 Proof: Adjacent gray codes have hamming distance 1, so the graph of gray codes
by tantalor 10y ago
Any sequence has 2n codes.
Example with 6:
000
100
110
111
101
001
Proof: Adjacent gray codes have hamming distance 1, so the graph of gray codes is cycle on a hypercube. All cycles on a hypercube graph are even, so every sequence of gray codes is even.
- Ericson2314 10y agoAh, I was waiting for somebody to point out the wonderful math behind this! Or rather, I was about to post about hypercubes and cycles myself :D