Tue Oct 19 17:31:57 2021 unicycle_test(): Python version: 3.6.9 Test unicycle(). i4_modp_test() Python version: 3.6.9 i4_modp() factors a number into a multiple M and a positive remainder R. Number Divisor Multiple Remainder 107 50 2 7 107 -50 -2 7 -107 50 -3 43 -107 -50 3 43 Repeat using Python % Operator: 107 50 2 7 107 -50 -3 -43 -107 50 -3 43 -107 -50 2 -7 i4_modp_test(): Normal end of execution. i4_wrap_test(): Python version: 3.6.9 i4_wrap() forces an integer to lie within given limits. ILO = 4 IHI = 8 I I4_WRAP(I) -10 5 -9 6 -8 7 -7 8 -6 4 -5 5 -4 6 -3 7 -2 8 -1 4 0 5 1 6 2 7 3 8 4 4 5 5 6 6 7 7 8 8 9 4 10 5 11 6 12 7 13 8 14 4 15 5 16 6 17 7 18 8 19 4 20 5 i4_wrap_test() Normal end of execution. i4vec_indicator1_test(): Python version: 3.6.9 i4vec_indicator1() returns an indicator vector. The indicator1 vector: 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 i4vec_indicator1_test(): Normal end of execution. i4vec_print_test(): Python version: 3.6.9 i4vec_print() prints an I4VEC. Here is an I4VEC: 0 91 1 92 2 93 3 94 i4vec_print_test(): Normal end of execution. i4vec_reverse_test(): Python version: 3.6.9 i4vec_reverse() reverses a list of integers. Original vector: 0 15 1 3 2 6 3 17 4 12 5 28 6 0 7 20 8 8 9 23 Reversed: 0 23 1 8 2 20 3 0 4 28 5 12 6 17 7 6 8 3 9 15 i4vec_reverse_test(): Normal end of execution. perm1_check_test(): Python version: 3.6.9 perm1_check() checks a permutation of 1,...,N. Permutation 1: 1 2 3 4 5 5 2 3 4 1 This is a permutation. Permutation 2: 1 2 3 4 5 4 1 3 0 2 This is not a permutation. Permutation 3: 1 2 3 4 5 0 2 1 3 2 This is not a permutation. perm1_check_test(): Normal end of execution. perm1_enum_test(): Python version: 3.6.9 perm1_enum() enumerates the permutations of 1,...,N. N PERM1_enum 1 1 2 2 3 6 4 24 5 120 6 720 7 5040 8 40320 9 362880 10 3628800 perm1_enum_test(): Normal end of execution. perm1_inverse_test(): Python version: 3.6.9 perm1_inverse() inverts a permutation of (1,...,N) The original permutation: 1 2 3 4 5 6 7 4 3 5 1 7 6 2 The inverted permutation: 1 2 3 4 5 6 7 4 7 2 1 3 6 5 perm1_inverse_test(): Normal end of execution. perm1_lex_next_test(): Python version: 3.6.9 perm1_lex_next() generates 1-based permutations in lexicographic order. 0: 1 2 3 4 1: 1 2 4 3 2: 1 3 2 4 3: 1 3 4 2 4: 1 4 2 3 5: 1 4 3 2 6: 2 1 3 4 7: 2 1 4 3 8: 2 3 1 4 9: 2 3 4 1 10: 2 4 1 3 11: 2 4 3 1 12: 3 1 2 4 13: 3 1 4 2 14: 3 2 1 4 15: 3 2 4 1 16: 3 4 1 2 17: 3 4 2 1 18: 4 1 2 3 19: 4 1 3 2 20: 4 2 1 3 21: 4 2 3 1 22: 4 3 1 2 23: 4 3 2 1 perm1_lex_next_test(): Normal end of execution. perm1_lex_rank_test(): Python version: 3.6.9 perm1_lex_rank() returns the lexicographic rank of a permutation of (1,...,N). A 1-based permutation: 1 2 3 4 4 1 3 2 Rank = 19 perm1_lex_rank_test(): Normal end of execution. perm1_lex_unrank_test(): perm1_lex_unrank() returns the 1-based permutation of given lexicographic rank. Rank = 9 The corresponding permutation: 1 2 3 4 2 3 4 1 perm1_lex_unrank_test(): Normal end of execution. perm1_print_test(): Python version: 3.6.9 perm1_print() prints a permutation of (1,...,N). A 1-based permutation: 1 2 3 4 5 6 7 7 2 4 1 5 3 6 perm1_print_test(): Normal end of execution. perm1_random_test(): Python version: 3.6.9 perm1_random() randomly selects a 1-based permutation. 3 4 1 5 7 2 10 8 6 9 2 1 8 10 6 5 7 3 4 9 2 9 5 6 4 10 8 1 3 7 9 8 1 4 5 10 3 2 7 6 4 5 3 1 8 7 9 10 2 6 perm1_random_test(): Normal end of execution. perm1_is_unicycle_test(): Python version: 3.6.9 perm1_is_unicycle() determines whether a 1-based permutation is a unicyle This permutation is NOT a unicycle 1 2 3 4 5 2 1 4 5 3 This permutation is NOT a unicycle 1 2 3 4 5 4 2 5 1 3 This permutation is a unicycle 1 2 3 4 5 2 3 4 5 1 The permutation in sequence form 1 2 3 4 5 This permutation is NOT a unicycle 1 2 3 4 5 1 3 4 2 5 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 1 3 2 5 4 This permutation is NOT a unicycle 1 2 3 4 5 1 4 3 5 2 This permutation is NOT a unicycle 1 2 3 4 5 1 5 4 3 2 This permutation is NOT a unicycle 1 2 3 4 5 1 4 3 2 5 This permutation is NOT a unicycle 1 2 3 4 5 5 4 3 2 1 perm1_is_unicycle_test(): Normal end of execution. unicycle_check_test Python version: 3.6.9 unicycle_check checks a unicycle. Candidate 1: 5 2 3 4 1 This is not a unicycle. Candidate 2: 4 1 3 0 2 This is not a unicycle. Candidate 3: 4 2 1 3 2 This is not a unicycle. Candidate 4: 2 1 4 3 5 This is not a unicycle. Candidate 5: 3 4 5 1 2 This is a unicycle! unicycle_check_test: Normal end of execution. unicycle_enum_test Python version: 3.6.9 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_enum_test Normal end of execution. unicycle_index_test Python version: 3.6.9 unicycle_index converts a unicycle to index form. The unicycle: 1 6 4 3 2 5 The index form: 1 2 3 4 5 6 6 5 2 3 1 4 The unicycle recovered: 1 6 4 3 2 5 The unicycle: 1 6 5 2 4 3 The index form: 1 2 3 4 5 6 6 4 1 3 2 5 The unicycle recovered: 1 6 5 2 4 3 The unicycle: 1 6 5 2 3 4 The index form: 1 2 3 4 5 6 6 3 4 1 2 5 The unicycle recovered: 1 6 5 2 3 4 The unicycle: 1 6 4 2 3 5 The index form: 1 2 3 4 5 6 6 3 5 2 1 4 The unicycle recovered: 1 6 4 2 3 5 The unicycle: 1 5 2 4 3 6 The index form: 1 2 3 4 5 6 5 4 6 3 2 1 The unicycle recovered: 1 5 2 4 3 6 unicycle_index_test unicycle_index converts a unicycle to index form. unicycle_index_print_test Python version: 3.6.9 unicycle_index_print prints a unicyle given in index form; The unicycle in index form: 1 2 3 4 5 6 7 7 1 4 5 2 3 6 unicycle_index_print_test Normal end of execution. unicycle_index_to_sequence_test Python version: 3.6.9 unicycle_index_to_sequence converts an index to unicycle form. The unicycle: 1 3 6 4 2 5 The index form: 1 2 3 4 5 6 3 5 6 2 1 4 The unicycle recovered: 1 3 6 4 2 5 The unicycle: 1 5 6 3 2 4 The index form: 1 2 3 4 5 6 5 4 2 1 6 3 The unicycle recovered: 1 5 6 3 2 4 The unicycle: 1 5 3 2 6 4 The index form: 1 2 3 4 5 6 5 6 2 1 3 4 The unicycle recovered: 1 5 3 2 6 4 The unicycle: 1 4 3 6 2 5 The index form: 1 2 3 4 5 6 4 5 6 3 1 2 The unicycle recovered: 1 4 3 6 2 5 The unicycle: 1 4 2 5 3 6 The index form: 1 2 3 4 5 6 4 5 6 2 3 1 The unicycle recovered: 1 4 2 5 3 6 unicycle_index_to_sequence_test Normal end of execution. unicycle_inverse_test Python version: 3.6.9 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_inverse_test Normal end of execution. unicycle_next_test Python version: 3.6.9 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_next_test Normal end of execution. unicycle_random_test Python version: 3.6.9 unicycle_random produces a random unicyle; For this test, N = 5 1 4 2 3 5 1 3 4 5 2 1 4 5 2 3 1 2 3 5 4 1 3 4 5 2 unicycle_random_test Normal end of execution. unicycle_rank_test Python version: 3.6.9 unicycle_rank ranks a unicycle. The unicycle: 1 5 2 3 4 The rank is: 18 unicycle_rank_test Normal end of execution. unicycle_unrank_test Python version: 3.6.9 unicycle_unrank, given a rank, computes the corresponding unicycle. The requested rank is 6 The unicycle: 1 3 2 4 5 unicycle_unrank_test Normal end of execution. unicycle_test(): Normal end of execution. Tue Oct 19 17:31:58 2021