08-Jan-2022 10:50:00 unicycle_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test unicycle(). perm_is_unicycle_test(): perm_is_unicycle() determines whether a permutation is a unicyle This permutation is NOT a unicycle 1 2 3 4 5 5 1 3 2 4 This permutation is NOT a unicycle 1 2 3 4 5 4 2 3 5 1 This permutation is NOT a unicycle 1 2 3 4 5 5 1 3 2 4 This permutation is NOT a unicycle 1 2 3 4 5 5 3 1 4 2 This permutation is a unicycle 1 2 3 4 5 3 5 2 1 4 The permutation in sequence form 1 3 2 5 4 This permutation is NOT a unicycle 1 2 3 4 5 4 2 5 3 1 This permutation is NOT a unicycle 1 2 3 4 5 4 5 2 1 3 This permutation is NOT a unicycle 1 2 3 4 5 4 2 5 1 3 This permutation is NOT a unicycle 1 2 3 4 5 2 1 3 5 4 This permutation is NOT a unicycle 1 2 3 4 5 4 3 5 1 2 unicycle_enum_test(): UNICYCLE_ENUM enumerates the unicycles of N objects. N Number 0 0 1 1 2 1 3 2 4 6 5 24 6 120 7 720 8 5040 9 40320 10 362880 unicycle_index_test(): unicycle_index() converts a unicycle to index form. The unicycle: 1 4 2 6 3 5 The index form: 1 2 3 4 5 6 4 6 5 2 1 3 The unicycle recovered: 1 4 2 6 3 5 The unicycle: 1 4 2 5 6 3 The index form: 1 2 3 4 5 6 4 5 1 2 6 3 The unicycle recovered: 1 4 2 5 6 3 The unicycle: 1 3 5 2 4 6 The index form: 1 2 3 4 5 6 3 4 5 6 2 1 The unicycle recovered: 1 3 5 2 4 6 The unicycle: 1 4 6 5 3 2 The index form: 1 2 3 4 5 6 4 1 2 6 3 5 The unicycle recovered: 1 4 6 5 3 2 The unicycle: 1 5 4 2 6 3 The index form: 1 2 3 4 5 6 5 6 1 2 4 3 The unicycle recovered: 1 5 4 2 6 3 unicycle_index_to_sequence_test(): unicycle_index_to_sequence() converts an index to unicycle form. The unicycle: 1 6 5 4 3 2 The index form: 1 2 3 4 5 6 6 1 2 3 4 5 The unicycle recovered: 1 6 5 4 3 2 The unicycle: 1 6 4 2 5 3 The index form: 1 2 3 4 5 6 6 5 1 2 3 4 The unicycle recovered: 1 6 4 2 5 3 The unicycle: 1 3 2 4 6 5 The index form: 1 2 3 4 5 6 3 4 2 6 1 5 The unicycle recovered: 1 3 2 4 6 5 The unicycle: 1 3 6 5 2 4 The index form: 1 2 3 4 5 6 3 4 6 1 2 5 The unicycle recovered: 1 3 6 5 2 4 The unicycle: 1 3 6 2 5 4 The index form: 1 2 3 4 5 6 3 5 6 1 4 2 The unicycle recovered: 1 3 6 2 5 4 unicycle_inverse_test(): UNICYCLE_INVERSE inverts a unicycle The original unicycle: 1 7 6 2 4 3 5 The inverse unicycle: 1 5 3 4 2 6 7 unicycle_next_test(): UNICYCLE_NEXT generates unicycles in lex order. 0: 1 2 3 4 5 1: 1 2 3 5 4 2: 1 2 4 3 5 3: 1 2 4 5 3 4: 1 2 5 3 4 5: 1 2 5 4 3 6: 1 3 2 4 5 7: 1 3 2 5 4 8: 1 3 4 2 5 9: 1 3 4 5 2 10: 1 3 5 2 4 11: 1 3 5 4 2 12: 1 4 2 3 5 13: 1 4 2 5 3 14: 1 4 3 2 5 15: 1 4 3 5 2 16: 1 4 5 2 3 17: 1 4 5 3 2 18: 1 5 2 3 4 19: 1 5 2 4 3 20: 1 5 3 2 4 21: 1 5 3 4 2 22: 1 5 4 2 3 23: 1 5 4 3 2 unicycle_random_test(): unicycle_random() produces a random unicyle; For this test, N = 5 1 2 3 5 4 1 5 3 2 4 1 2 4 3 5 1 3 4 2 5 1 3 4 5 2 unicycle_rank_test(): UNICYCLE_RANK ranks a unicycle. The unicycle: 1 5 2 3 4 The rank is: 18 unicycle_unrank_test(): UNICYCLE_UNRANK, given a rank, computes the corresponding unicycle. The requested rank is 6 The unicycle: 1 3 2 4 5 unicycle_test(): Normal end of execution. 08-Jan-2022 10:50:00