 A monotonic Gray code is then a Hamiltonian path in formula_58 such that whenever formula_63 comes before formula_64 in the path, then formula_65.An elegant construction of monotonic "n"-digit Gray codes for any "n" is based on the idea of recursively building subpaths formula_66 of length formula_67 having edges in formula_68.We define formula_69, formula_70 whenever formula_71 or formula_72, and

otherwise.