Cyclic Single-Track Gray Codes

This page lists some results obtained by running the program. There were a number of errors in appendix 3 of the article in CREGJ 118, which are corrected in this table, and in the text that follows the table.

Apart from the final column, this table is populated when this page is loaded, via a Javascript program that is based on the discussion in appendix 3 of the article in CREGJ 118 – function populateTableWithNecklaceResults(). (Using JS to populate the table is mainly just to avoid a lot of tedious typing). The final column has been manually added after running the demonstration program.

Go to landing page | Demonstration | Results commentary

Predicted Necklace Codes, C is shown relative to the total number of codes of length N, which is 2^N of course. Bad codes is 2^N – C. The prediction for bad codes is explained in appendix 3 of the article in CREGJ 118 and is based on the number of factors of N. In all cases, the prediction matches the number of necklace codes found by the demonstration program.

The necklace codes can be assembled into C/N Predicted Necklaces. Not all of those can be used to assemble a Gray code sequence because sequences must use an even number of necklaces. Thus the length of the Predicted Max Sequence might be less than Predicted Necklace Codes. Addditionally, it is not always possible to use all of the necklace codes so the Actual Max Sequence found by the demonstration program might be lower still.

N Predicted Necklace Codes Bad codes ∴ Predicted Necklaces ∴ Predicted Max Sequence Actual Max Sequence
replace via JS 1
replace via JS 2
replace via JS 3
replace via JS 4
replace via JS 5
replace via JS 6
replace via JS 7
replace via JS 8
replace via JS 9
replace via JS 10
replace via JS 11
replace via JS 12
replace via JS 13
replace via JS 14
replace via JS 15
replace via JS 16
replace via JS 17
replace via JS 18
replace via JS 19
replace via JS 20
replace via JS 21 Last row

Corrected text for CREGJ 118

corrections here


/pub/cregj/more/j118/gray_code_results.html, last modified Tue, 27 Sep 2022 16:13:41 +0100. Server: britiac4.british-caving.org.uk (31.25.186.126)