May 9 2025 8:57:35.787 PM codepack_test(): Fortran90 version Test codepack(). TEST001 For a color digraph code: CDG_CODE_BACK uses backtracking; CDG_CODE_BRUTE uses brute force; The color digraph adjacency matrix: 2 0 0 0 1 1 0 1 0 2 0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 0 0 3 0 0 1 1 0 0 0 1 1 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 3 0 0 0 0 0 0 0 0 1 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: 1 20001101 2 02001000 3 00100111 4 00030011 5 00011000 6 01100100 7 01000030 8 00000001 BRUTE FORCE calculation: CDG_CODE_BRUTE: Comparisons: 40320 Swaps: 17 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 4 7 8 5 2 3 1 6 The maximal code: 1 31100000 2 03001000 3 00100000 4 10010000 5 00012000 6 01100101 7 00110021 8 00001101 BACKTRACK calculation: Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 4 7 8 5 2 3 1 6 The maximal code: 1 31100000 2 03001000 3 00100000 4 10010000 5 00012000 6 01100101 7 00110021 8 00001101 SUCCESS: The codes are equal. TEST002 CDG_COMPARE compares color digraphs. Compare all pairs of test graphs. 1 =.2888882222.332333332222.442444442222.772777772222...28..882222. 2 8=2888882222.332333332222.442444442222.772777772222...28..882222. 3 ..=.......22...3.......22...4.......22...7.......22...8.......22. 4 ..2=.8..2222.332333332222.442444442222.772777772222...2...882222. 5 ..28=8882222.332333332222.442444442222.772777772222...28..882222. 6 ..2..=..2222.332333332222.442444442222.772777772222...2.....2222. 7 ..28.8=82222.332333332222.442444442222.772777772222...2...882222. 8 ..28.8.=2222.332333332222.442444442222.772777772222...2...882222. 9 ..2.....=822...2.....3322...2.....4422...2.....7722...2.......22. 10 ..2......=22...2.....3322...2.....4422...2.....7722...2.......22. 11 ..........=............33...........44...........7............... 12 ..........5=...........33...........44...........57...........5.. 13 222222222222=2222222222223222222222222422222222222272222222222228 14 ..2.....2222.=828...82222...2.....2222...2.....2222...2.....2222. 15 ..2.....2222..=28...82222...2.....2222...2.....2222...2.....2222. 16 ..........22...=.......22...........22...........22...........22. 17 ..2.....2222...2=...82222...2.....2222...2.....2222...2.....2222. 18 ..2.....2222.8828=.882222...2.....2222...2.....2222...2.....2222. 19 ..2.....2222.88288=882222...2.....2222...2.....2222...2.....2222. 20 ..2.....2222.8828..=82222...2.....2222...2.....2222...2.....2222. 21 ..2.....2222...2....=2222...2.....2222...2.....2222...2.....2222. 22 ..2.......22...2.....=.22...2.......22...2.......22...2.......22. 23 ..2.......22...2.....8=22...2.......22...2.......22...2.......22. 24 .......................=......................................... 25 .......................5=........................................ 26 222222222222.222222222222=222222222222.222222222222.222222222222. 27 ..2.....2222.332333332222.=82.88882222...2.....2222...2.....2222. 28 ..2.....2222.332333332222..=2.....2222...2.....2222...2.....2222. 29 ..........22...3.......22...=.......22...........22...........22. 30 ..2.....2222.332333332222.882=88882222...2.....2222...2.....2222. 31 ..2.....2222.332333332222..82.=.882222...2.....2222...2.....2222. 32 ..2.....2222.332333332222..82.8=882222...2.....2222...2.....2222. 33 ..2.....2222.332333332222..82...=82222...2.....2222...2.....2222. 34 ..2.....2222.332333332222..82....=2222...2.....2222...2.....2222. 35 ..2.......22...2.....3322...2.....=.22...2.......22...2.......22. 36 ..2.......22...2.....3322...2.....8=22...2.......22...2.......22. 37 .......................33...........=............................ 38 .......................33...........5=........................... 39 222222222222.2222222222223222222222222=222222222222.222222222222. 40 ..2.....2222.332333332222.442444442222.=.2888..2222...2.....2222. 41 ..2.....2222.332333332222.442444442222.8=2888..2222...2.....2222. 42 ..........22...3.......22...4.......22...=.......22...........22. 43 ..2.....2222.332333332222.442444442222...2=.8..2222...2.....2222. 44 ..2.....2222.332333332222.442444442222...28=8..2222...2.....2222. 45 ..2.....2222.332333332222.442444442222...2..=..2222...2.....2222. 46 ..2.....2222.332333332222.442444442222.882888=82222...2.....2222. 47 ..2.....2222.332333332222.442444442222.882888.=2222...2.....2222. 48 ..2.......22...2.....3322...2.....4422...2.....=822...2.......22. 49 ..2.......22...2.....3322...2.....4422...2......=22...2.......22. 50 .......................33...........44...........=............... 51 ..........5............33...........44...........5=...........5.. 52 222222222222.22222222222232222222222224222222222222=222222222222. 53 882888882222.332333332222.442444442222.772777772222.=.28..882222. 54 882888882222.332333332222.442444442222.772777772222.8=28..882222. 55 ..........22...3.......22...4.......22...7.......22...=.......22. 56 ..28.8882222.332333332222.442444442222.772777772222...2=..882222. 57 882888882222.332333332222.442444442222.772777772222.8828=.882222. 58 882888882222.332333332222.442444442222.772777772222.88288=882222. 59 ..2..8..2222.332333332222.442444442222.772777772222...2...=82222. 60 ..2..8..2222.332333332222.442444442222.772777772222...2....=2222. 61 ..2.....8822...2.....3322...2.....4422...2.....7722...2.....=822. 62 ..2.....8822...2.....3322...2.....4422...2.....7722...2......=22. 63 ..........8............33...........44...........7............=.. 64 ..........58...........33...........44...........57...........5=. 65 222222222222.222222222222322222222222242222222222227222222222222= TEST003 For a color graph code: CG_CODE_BACK uses backtracking; CG_CODE_BRUTE uses brute force; The color graph: 2 0 0 0 1 1 0 1 0 2 0 0 1 1 1 0 0 0 1 0 0 1 1 1 0 0 0 3 1 0 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 3 0 1 0 1 1 0 0 0 1 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: 20001101 .2001110 ..100111 ...31011 ....1000 .....100 ......30 .......1 BRUTE FORCE calculation: CG_CODE_BRUTE: Comparisons: 40320 Swaps: 15 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 7 4 2 3 5 8 6 1 The maximal code: 31110000 .3001100 ..201010 ...10110 ....1001 .....101 ......11 .......2 BACKTRACK calculation: Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 7 4 2 3 5 8 6 1 The maximal code: 31110000 .3001100 ..201010 ...10110 ....1001 .....101 ......11 .......2 SUCCESS: The codes are equal. TEST004 CG_COMPARE compares two color graphs. Compare all pairs of test graphs. 1 =7.7722.3333322.4444422.6666622....7.22. 2 .=.7.22.3333322.4444422.6666622......22. 3 77=7722.3333322.4444422.6666622....7.22. 4 ...=.22.3333322.4444422.6666622......22. 5 .7.7=22.3333322.4444422.6666622....7.22. 6 .....=7......33......44......66......... 7 ......=......33......44......66......... 8 2222222=2222222322222224222222262222222. 9 .....22.=7..722......22......22......22. 10 .....22..=...22......22......22......22. 11 .....22.77=7722......22......22......22. 12 .....22.77.=722......22......22......22. 13 .....22..7..=22......22......22......22. 14 .............=7......................... 15 ..............=......................... 16 2222222.2222222=2222222.2222222.2222222. 17 .....22.3333322.=7.7.22......22......22. 18 .....22.3333322..=.7.22......22......22. 19 .....22.3333322.77=7722......22......22. 20 .....22.3333322....=.22......22......22. 21 .....22.3333322.77.7=22......22......22. 22 .............33......=.................. 23 .............33......7=................. 24 2222222.222222232222222=2222222.2222222. 25 .....22.3333322.4444422.=777722......22. 26 .....22.3333322.4444422..=.7.22......22. 27 .....22.3333322.4444422..7=7722......22. 28 .....22.3333322.4444422....=.22......22. 29 .....22.3333322.4444422..7.7=22......22. 30 .............33......44......=7......... 31 .............33......44.......=......... 32 2222222.22222223222222242222222=2222222. 33 7777722.3333322.4444422.6666622.=7.7.22. 34 7777722.3333322.4444422.6666622..=.7.22. 35 7777722.3333322.4444422.6666622.77=7722. 36 .7.7.22.3333322.4444422.6666622....=.22. 37 7777722.3333322.4444422.6666622.77.7=22. 38 .....77......33......44......66......=7. 39 .....77......33......44......66.......=. 40 222222272222222322222224222222262222222= TEST005 CG_CODE_COMPARE compares two color graph codes. Compare the color graph codes of the cube and the permuted cube. The color cube: 2 0 0 0 1 1 0 1 0 2 0 0 1 1 1 0 0 0 1 0 0 1 1 1 0 0 0 3 1 0 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 3 0 1 0 1 1 0 0 0 1 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: 20001101 .2001110 ..100111 ...31011 ....1000 .....100 ......30 .......1 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 7 4 2 3 5 8 6 1 The maximal code: 31110000 .3001100 ..201010 ...10110 ....1001 .....101 ......11 .......2 Now permute the graph: The color graph: 1 1 0 0 1 0 0 1 1 2 0 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 3 0 0 0 1 1 0 0 0 2 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 0 1 3 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 5 2 3 7 1 6 8 4 The order-dependent code: 20011100 .2001101 ..110101 ...10010 ....1010 .....100 ......31 .......3 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 4 8 2 3 1 7 6 5 The maximal code: 31110000 .3001100 ..201010 ...10110 ....1001 .....101 ......11 .......2 SUCCESS: CODE1 = CODE2 TEST009 CG_CODE_COMPARE compares two color graph codes. Compare the color graph codes of the cube and the cube with permuted colors. Number of colors = 3 Maximum color index = 3 The color graph: 2 0 0 0 1 1 0 1 0 2 0 0 1 1 1 0 0 0 1 0 0 1 1 1 0 0 0 3 1 0 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 3 0 1 0 1 1 0 0 0 1 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 7 4 2 3 5 8 6 1 The maximal code: 31110000 .3001100 ..201010 ...10110 ....1001 .....101 ......11 .......2 Graph 2 is made by permuting graph 1 and increasing the color of one node. The color graph: 2 1 1 0 0 0 1 0 1 2 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 1 0 3 1 0 0 0 0 0 1 1 3 0 1 1 0 0 1 0 0 2 1 0 1 0 0 0 1 1 1 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 5 6 2 3 8 4 1 7 The maximal code, using backtracking: 31110000 .3001100 ..201010 ...10110 ....1001 .....101 ......21 .......2 SUCCESS: CODE1 < CODE2 CG_CODE_BRUTE: Comparisons: 40320 Swaps: 8 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 5 6 2 3 8 4 1 7 The maximal code, by brute force: 31110000 .3001100 ..201010 ...10110 ....1001 .....101 ......21 .......2 SUCCESS: CODE1 < CODE2 TEST010 CG_CODE_COMPARE compares two color graph codes. Compare color graph codes of the cube and a graph with same number of nodes, links, and colors. The color graph: 2 0 0 0 1 1 0 1 0 2 0 0 1 1 1 0 0 0 1 0 0 1 1 1 0 0 0 3 1 0 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 3 0 1 0 1 1 0 0 0 1 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: 20001101 .2001110 ..100111 ...31011 ....1000 .....100 ......30 .......1 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 7 4 2 3 5 8 6 1 The maximal code: 31110000 .3001100 ..201010 ...10110 ....1001 .....101 ......11 .......2 The color graph: 2 1 0 1 1 1 0 0 1 1 0 1 0 0 0 0 0 0 2 1 0 1 0 1 1 1 1 1 1 1 0 1 1 0 0 1 2 0 0 0 1 0 1 1 0 2 0 0 0 0 0 0 0 0 2 1 0 0 1 1 0 0 1 1 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: 21011100 .1010000 ..210101 ...11101 ....2000 .....200 ......21 .......1 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 6 4 5 2 3 8 7 The maximal code: 21111000 .2100100 ..111110 ...20000 ....1000 .....210 ......11 .......2 CODE2 < CODE1 TEST011 For a digraph code: DG_CODE_BACK uses backtracking; In this test, we compare the digraph codes of the cube digraph, and a node-reordered copy of the cube digraph. The codes should be the same. The graph: 00001101 00001110 00000111 00001011 11010000 11100000 01110000 10110000 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: 1 .0001101 2 0.001110 3 00.00111 4 000.1011 5 1101.000 6 11100.00 7 011100.0 8 1011000. Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 8 4 3 1 7 5 6 2 The maximal code: 1 .1110000 2 1.001100 3 10.01010 4 100.0110 5 0110.001 6 01010.01 7 001100.1 8 0000111. Now permute the original digraph: The graph: 00101010 00010101 10010001 01100010 10000101 01001010 10010100 01101000 Permuted node ordering: Order: 1 2 3 4 5 6 7 8 Label: 5 3 4 7 1 6 2 8 The order-dependent code: 1 .0001101 2 0.101001 3 01.10010 4 001.1100 5 1101.000 6 10010.10 7 001001.1 8 1100001. Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 8 5 3 2 1 6 4 7 The maximal code: 1 .1110000 2 1.001100 3 10.01010 4 100.0110 5 0110.001 6 01010.01 7 001100.1 8 0000111. SUCCESS: CODE1 = CODE2 TEST012 For a digraph code: DG_CODE_BRUTE uses brute force; In this test, we compute the digraph code of the cube digraph by brute force. The graph: 00001101 00001110 00000111 00001011 11010000 11100000 01110000 10110000 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: 1 .0001101 2 0.001110 3 00.00111 4 000.1011 5 1101.000 6 11100.00 7 011100.0 8 1011000. DG_CODE_BRUTE: Comparisons: 40320 Swaps: 14 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 2 6 7 5 3 1 4 8 The maximal code: 1 .1110000 2 1.001100 3 10.01010 4 100.0110 5 0110.001 6 01010.01 7 001100.1 8 0000111. TEST013 DG_COMPARE compares two digraphs. Compare all pairs of test graphs. 1 =.255.552222. 2 5=2555552222. 3 ..=.......22. 4 ..2=..5.2222. 5 ..25=.552222. 6 5.255=552222. 7 ..2...=.2222. 8 ..25..5=2222. 9 ..2.....=.22. 10 ..2.....5=22. 11 ..........=.. 12 ..........3=. 13 222222222222= TEST014 For a graph code: G_CODE_BACK uses backtracking; In this test, we compute the graph code of the cube graph by backtracking. The number of nodes is 8 The graph: 00001101 00001110 00000111 00001011 11010000 11100000 01110000 10110000 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: .0000000 ..000000 ...00000 ....0000 .....000 ......00 .......0 ........ Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 8 4 3 1 7 5 6 2 The maximal code: .1110000 ..001100 ...01010 ....0110 .....001 ......01 .......1 ........ TEST015 For a graph code: G_CODE_BACK uses backtracking; In this test, we compare the graph codes of the cube graph, and a node-reordered copy of the cube graph. The codes should be the same. The graph: 00001101 00001110 00000111 00001011 11010000 11100000 01110000 10110000 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: .0001101 ..001110 ...00111 ....1011 .....000 ......00 .......0 ........ Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 8 4 3 1 7 5 6 2 The maximal code: .1110000 ..001100 ...01010 ....0110 .....001 ......01 .......1 ........ Now permute the original graph: The graph: 00010110 00001110 00011100 10100001 01100001 11100000 11000001 00011010 Permuted node ordering: Order: 1 2 3 4 5 6 7 8 Label: 3 1 2 7 5 6 8 4 The order-dependent code: .0001101 ..010101 ...11100 ....0010 .....010 ......00 .......1 ........ Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 8 7 5 4 2 1 3 6 The maximal code: .1110000 ..001100 ...01010 ....0110 .....001 ......01 .......1 ........ SUCCESS: CODE1 = CODE2 TEST016 For a graph code: G_CODE_BACK uses backtracking; In this test, we compare the graph codes of the cube graph and a random graph. The graph: 00001101 00001110 00000111 00001011 11010000 11100000 01110000 10110000 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: .0001101 ..001110 ...00111 ....1011 .....000 ......00 .......0 ........ Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 8 4 3 1 7 5 6 2 The maximal code: .1110000 ..001100 ...01010 ....0110 .....001 ......01 .......1 ........ The graph: 01110110 10001000 10001110 10000100 01100011 10110000 10101000 00001000 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: .1110110 ..001000 ...01110 ....0100 .....011 ......00 .......0 ........ Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 3 6 7 4 2 5 8 The maximal code: .1111100 ..110010 ...01000 ....0010 .....000 ......10 .......1 ........ CODE1 < CODE2 TEST017 For a graph code: G_CODE_BRUTE uses brute force; In this test, we compute the graph code of the cube graph by brute force. The graph: 00001101 00001110 00000111 00001011 11010000 11100000 01110000 10110000 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: .0001101 ..001110 ...00111 ....1011 .....000 ......00 .......0 ........ G_CODE_BRUTE: Comparisons: 40320 Swaps: 14 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 2 6 7 5 3 1 4 8 The maximal code: .1110000 ..001100 ...01010 ....0110 .....001 ......01 .......1 ........ TEST018 G_COMPARE compares two graphs. Compare all pairs of test graphs. 1 =4.4422. 2 .=.4.22. 3 44=4422. 4 ...=.22. 5 .4.4=22. 6 .....=.. 7 .....4=. 8 2222222= TEST019 G_CODE_COMPARE compares two graph codes. Compare the codes of the cube and the cube with permuted nodes. The codes should be the same. The graph: 00001101 00001110 00000111 00001011 11010000 11100000 01110000 10110000 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: .0001101 ..001110 ...00111 ....1011 .....000 ......00 .......0 ........ Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 8 4 3 1 7 5 6 2 The maximal code: .1110000 ..001100 ...01010 ....0110 .....001 ......01 .......1 ........ Graph 2 is made by permuting graph 1. Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: .0011001 ..100110 ...01001 ....0110 .....100 ......00 .......1 ........ Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 8 7 3 1 2 4 5 6 The maximal code: .1110000 ..001100 ...01010 ....0110 .....001 ......01 .......1 ........ SUCCESS: CODE1 = CODE2 G_CODE_BRUTE: Comparisons: 40320 Swaps: 14 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 6 5 4 2 1 3 7 8 The maximal code: .1110000 ..001100 ...01010 ....0110 .....001 ......01 .......1 ........ SUCCESS: CODE1 = CODE2 TEST020 For a multigraph code: MG_CODE_BACK uses backtracking; MG_CODE_BRUTE uses brute force; The results should be the same. The multigraph: 00101011 00310200 13000321 01001111 10010001 02310022 10210200 10111200 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: .0101011 ..310200 ...00321 ....1111 .....001 ......22 .......0 ........ BRUTE FORCE calculation: MG_CODE_BRUTE: Comparisons: 40320 Swaps: 16 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 3 6 2 7 8 1 4 5 The maximal code: .3321100 ..222010 ...00010 ....0110 .....111 ......01 .......1 ........ BACKTRACK calculation: Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 3 6 2 7 8 1 4 5 The maximal code: .3321100 ..222010 ...00010 ....0110 .....111 ......01 .......1 ........ SUCCESS: The codes are equal. TEST021 For a multigraph, MG_ADJ_MAX_MAX computes the adjacency maximum maximum; MG_ADJ_MAX_SEQ computes the adjacency maximum sequence; MG_ADJ_SEQ computes the adjacency sequence; The multigraph: 02111130 20000200 10020011 10200210 10000011 12020031 30111301 00101110 The adjacency maximum maximum = 3 The adjacency maximum sequence: 1 3 2 3 3 3 4 2 5 2 6 2 7 1 8 1 The adjacency sequence: 3 3 1 1 1 1 0 0 3 2 2 1 1 0 0 0 3 2 1 1 1 1 0 0 2 2 1 1 0 0 0 0 2 2 0 0 0 0 0 0 2 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 TEST022 MG_COMPARE compares two multigraphs. Compare pairs of test graphs. 1 =....6. 2 2=22222 3 3.=3333 4 4..=444 5 5...=55 6 .....=. 7 7....6= TEST023 For a dimultigraph code: DMG_CODE_BACK uses backtracking; DMG_CODE_BRUTE uses brute force; The results should be the same. DM-graph: 01120000 10200000 00010000 02000001 10100101 11000010 01002001 11010000 Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: .1120000 1.200000 00.10000 020.0001 1010.101 11000.10 010020.1 1101000. BRUTE FORCE calculation: DMG_CODE_BRUTE: Comparisons: 40320 Swaps: 5 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 4 2 3 8 6 5 7 The maximal code: .2110000 0.201000 10.20000 010.0000 1110.000 10100.01 100111.0 0010102. BACKTRACK calculation: Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 4 2 3 8 6 5 7 The maximal code: .2110000 0.201000 10.20000 010.0000 1110.000 10100.01 100111.0 0010102. SUCCESS: The codes are equal. TEST024 DMG_COMPARE compares two dimultigraphs. Compare pairs of test graphs. 1 =.3.2... 2 3=3323.3 3 ..=.2... 4 6.3=2... 5 ....=... 6 5.352=.5 7 222222=2 8 6.362..= TEST025 For a color dimultigraph code: CDMG_CODE_BACK uses backtracking; CDMG_CODE_BRUTE uses brute force; The random CDM-graph: M0000001 0C011020 10B10110 001M1200 0011G021 00100M00 100001R0 0101110B Initial node ordering: Order: 1 2 3 4 5 6 7 8 Label: 1 2 3 4 5 6 7 8 The order-dependent code: 50000001 04011020 10310110 00151200 00112021 00100500 10000110 01011103 BRUTE FORCE calculation: CDMG_CODE_BRUTE: Comparisons: 40320 Swaps: 13 Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 4 6 3 5 8 2 7 1 The maximal code: 52110000 05100000 11300011 10121020 11013100 10010420 01000011 00001005 BACKTRACK calculation: Induced node ordering: Order: 1 2 3 4 5 6 7 8 Label: 4 6 3 5 8 2 7 1 The maximal code: 52110000 05100000 11300011 10121020 11013100 10010420 01000011 00001005 SUCCESS: The codes are equal. TEST026 CDMG_COMPARE compares two color dimultigraphs. Compare pairs of test graphs. 1 =....678..BB 2 2=2222222222 3 3.=333333333 4 4..=44444444 5 5...=5555555 6 .....=...... 7 .....6=..... 8 .....67=.... 9 A....678=999 10 A....678.=AA 11 .....678..=C 12 .....678...= codepack_test(): Normal end of execution. May 9 2025 8:57:35.962 PM