// output of ./demo/comb/necklaces-via-gray-leaders-demo.cc: // Description: //% Cycle leaders for gray permutation converted to necklaces arg 1: 6 == ldn [necklace with ldn bits] default=6 arg 2: 1 == cq [whether to print cycles] default=1 4 cycles of length= 8 L= ..1..... [ 1.1..... ] --> ..11.... [ .1.1.... ] --> ..1.1... [ ..1.1... ] --> ..1111.. [ ...1.1.. ] --> ..1...1. [ ....1.1. ] --> ..11..11 [ .....1.1 ] --> ..1.1.1. [ 1.....1. ] --> ..111111 [ .1.....1 ] L= ..1....1 [ .1.11111 ] --> ..11...1 [ 1.1.1111 ] --> ..1.1..1 [ 11.1.111 ] --> ..1111.1 [ 111.1.11 ] --> ..1...11 [ 1111.1.1 ] --> ..11..1. [ 11111.1. ] --> ..1.1.11 [ .11111.1 ] --> ..11111. [ 1.11111. ] L= ..1..1.. [ .11.11.. ] --> ..11.11. [ ..11.11. ] --> ..1.11.1 [ ...11.11 ] --> ..111.11 [ 1...11.1 ] --> ..1..11. [ 11...11. ] --> ..11.1.1 [ .11...11 ] --> ..1.1111 [ 1.11...1 ] --> ..111... [ 11.11... ] L= ..1..1.1 [ 1..1..11 ] --> ..11.111 [ 11..1..1 ] --> ..1.11.. [ 111..1.. ] --> ..111.1. [ .111..1. ] --> ..1..111 [ ..111..1 ] --> ..11.1.. [ 1..111.. ] --> ..1.111. [ .1..111. ] --> ..111..1 [ ..1..111 ] ldn=5: ct=4 ==2**2