06 October 2025 6:18:53.933 PM graph_adj_test(): Fortran90 version Test graph_adj(), which implements graph algorithms. graph_adj_breadth_first_test() graph_adj_breadth_first() sets up a breadth-first traversal of a graph. The graph: 1 0111111100000 2 1000110100000 3 1001001000000 4 1010000000000 5 1100000000000 6 1100000000000 7 1010000000000 8 1100000000000 9 0000000001001 10 0000000010111 11 0000000001010 12 0000000001100 13 0000000011000 I, dad(i), deep(i), order(i) 1 0 1 1 2 1 2 2 3 1 2 3 4 1 2 4 5 1 2 5 6 1 2 6 7 1 2 7 8 1 2 8 9 0 3 9 10 9 4 10 11 10 5 12 12 10 5 13 13 9 4 11 graph_adj_block_test(): graph_adj_block() finds the blocks in a graph. Number of blocks = 3 I, DAD(I), ORDER(I) 1 0 -1 2 1 2 3 4 5 4 1 -4 5 4 6 6 2 3 The graph: 1 010331 2 100001 3 000200 4 302030 5 300300 6 110000 graph_adj_color_next_test(): graph_adj_color_next() produces colorings of a graph The number of colors available is 3 The graph: 1 0101 2 1010 3 0101 4 1010 Possible node colorings: 1 3 2 3 1 3 1 3 1 3 1 2 1 2 3 2 1 2 1 3 1 2 1 2 graph_adj_complement_test(): graph_adj_complement() finds the complement of a graph; The adjacency matrix for G: 1 10011000 2 01000000 3 00100011 4 10011000 5 10011100 6 00001100 7 00100010 8 00100001 Adjacency matrix for the complement of G: 1 01100111 2 10111111 3 11011100 4 01100111 5 01100011 6 11110011 7 11011101 8 11011110 graph_adj_cycle_test(): graph_adj_cycle() searches for cycles in a graph. The graph: 1 0010001001 2 0000100001 3 1000010010 4 0000001100 5 0100000000 6 0010000010 7 1001000000 8 0001000001 9 0010010000 10 1100000100 Node, Dad, Order 1 0 1 2 10 9 3 1 2 4 7 6 5 2 10 6 3 3 7 1 5 8 4 7 9 6 4 10 8 8 Adjacency matrix with cycles marked. 0 0 -2 0 0 0 -2 0 0 -1 0 0 0 0 -2 0 0 0 0 -2 -2 0 0 0 0 -2 0 0 -1 0 0 0 0 0 0 0 -2 -2 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 -2 0 -2 0 0 -2 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 -2 0 0 -1 0 0 -2 0 0 0 0 -1 -2 0 0 0 0 0 -2 0 0 graph_adj_degree_test(): graph_adj_degree() computes the degree of the nodes; The graph: 1 0010001001 2 0000100001 3 1000010010 4 0000001100 5 0100000000 6 0010000010 7 1001000000 8 0001000001 9 0010010000 10 1100000100 Node degrees: 1 3 2 2 3 3 4 2 5 1 6 2 7 2 8 2 9 2 10 3 graph_adj_degree_max_test(): graph_adj_degree_max() computes the maximum degree of the nodes; The graph: 1 0010001001 2 0000100001 3 1000010010 4 0000001100 5 0100000000 6 0010000010 7 1001000000 8 0001000001 9 0010010000 10 1100000100 Maximum node degree is 3 graph_adj_degree_sequence_test(): graph_adj_degree_sequence() computes the degree sequence; The graph: 1 0010001001 2 0000100001 3 1000010010 4 0000001100 5 0100000000 6 0010000010 7 1001000000 8 0001000001 9 0010010000 10 1100000100 Degree sequence: 1 3 2 3 3 3 4 2 5 2 6 2 7 2 8 2 9 2 10 1 graph_adj_depth_first_test(): graph_adj_depth_first() does depth first search of graph. The graph: 1 0110011000000 2 0000000000000 3 0000000000000 4 0000000000000 5 0001001000000 6 0000100000000 7 0000000000000 8 0000000010000 9 0000000000000 10 0000000000111 11 0000000000000 12 0000000000001 13 0000000000000 Node, Dad, Order 1 0 1 2 1 2 3 1 3 4 5 6 5 6 5 6 1 4 7 5 7 8 0 8 9 8 9 10 0 10 11 10 11 12 10 12 13 12 13 graph_adj_depth_first_2_test(): graph_adj_depth_first_2() sets up depth-first traversal of a graph described by an adjacency matrix. The graph: 1 0111111100000 2 1000110100000 3 1001001000000 4 1010000000000 5 1100000000000 6 1100000000000 7 1010000000000 8 1100000000000 9 0000000001001 10 0000000010111 11 0000000001010 12 0000000001100 13 0000000011000 I, DAD(I), ORDER(I) 1 0 1 2 1 2 3 1 6 4 3 7 5 2 3 6 2 4 7 3 8 8 2 5 9 0 9 10 9 10 11 10 11 12 11 12 13 10 13 graph_adj_edge_count_test(): graph_adj_edge_count() counts the edges in a graph. Adjacency matrix: 1 0001000 2 0000100 3 0000100 4 1000111 5 0111000 6 0001000 7 0001000 Number of edges is 6 graph_adj_edge_select_test(): graph_adj_edge_select() selects an edge from a graph defined by an adjacency matrix. Adjacency matrix for bush example 1 0001000 2 0000100 3 0000100 4 1000111 5 0111000 6 0001000 7 0001000 An edge of this graph extends from node 1 to node 4 graph_adj_eigen_test(): graph_adj_eigen() computes the eigenvalues of a graph. The graph: 1 0010001001 2 0000100001 3 1000010010 4 0000001100 5 0100000000 6 0010000010 7 1001000000 8 0001000001 9 0010010000 10 1100000100 The eigenvalues: 1 -2.11644 2 -1.72209 3 -1.15483 4 -1.00000 5 -0.702785 6 0.429094 7 0.673286 8 1.26660 9 1.91496 10 2.41221 TEST036 GRAPH_ADJ_HAM_NEXT produces Hamilton circuits; The graph: 1 01000001000000000001 2 10100000000000100000 3 01010010000000000000 4 00101000000001000000 5 00010100000100000000 6 00001010010000000000 7 00100101000000000000 8 10000010100000000000 9 00000001010000000010 10 00000100101000000000 11 00000000010100000100 12 00001000001010000000 13 00000000000101001000 14 00010000000010100000 15 01000000000001010000 16 00000000000000101001 17 00000000000010010100 18 00000000001000001010 19 00000000100000000101 20 10000000000000010010 Circuits: 1 1 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 2 1 20 19 18 17 16 15 2 3 7 6 5 4 14 13 12 11 10 9 8 3 1 20 19 18 11 12 13 17 16 15 14 4 5 6 10 9 8 7 3 2 4 1 20 19 18 11 12 5 6 10 9 8 7 3 4 14 13 17 16 15 2 5 1 20 19 18 11 12 5 4 14 13 17 16 15 2 3 7 6 10 9 8 6 1 20 19 18 11 10 9 8 7 6 5 12 13 17 16 15 14 4 3 2 7 1 20 19 9 10 11 18 17 16 15 2 3 4 14 13 12 5 6 7 8 8 1 20 19 9 10 6 5 4 14 13 12 11 18 17 16 15 2 3 7 8 9 1 20 19 9 8 7 6 10 11 18 17 16 15 14 13 12 5 4 3 2 10 1 20 19 9 8 7 3 4 14 13 12 5 6 10 11 18 17 16 15 2 11 1 20 16 17 18 19 9 10 11 12 13 14 15 2 3 4 5 6 7 8 12 1 20 16 17 18 19 9 8 7 3 4 5 6 10 11 12 13 14 15 2 13 1 20 16 17 13 14 15 2 3 4 5 12 11 18 19 9 10 6 7 8 14 1 20 16 17 13 12 11 18 19 9 10 6 5 4 14 15 2 3 7 8 15 1 20 16 17 13 12 5 6 10 11 18 19 9 8 7 3 4 14 15 2 16 1 20 16 17 13 12 5 4 14 15 2 3 7 6 10 11 18 19 9 8 17 1 20 16 15 14 13 17 18 19 9 8 7 6 10 11 12 5 4 3 2 18 1 20 16 15 14 4 5 6 10 11 12 13 17 18 19 9 8 7 3 2 19 1 20 16 15 2 3 7 6 10 11 12 5 4 14 13 17 18 19 9 8 20 1 20 16 15 2 3 4 14 13 17 18 19 9 10 11 12 5 6 7 8 21 1 8 9 19 20 16 17 18 11 10 6 7 3 4 5 12 13 14 15 2 22 1 8 9 19 20 16 15 14 4 5 12 13 17 18 11 10 6 7 3 2 23 1 8 9 10 11 18 19 20 16 17 13 12 5 6 7 3 4 14 15 2 24 1 8 9 10 11 12 13 17 18 19 20 16 15 14 4 5 6 7 3 2 25 1 8 9 10 11 12 5 6 7 3 4 14 13 17 18 19 20 16 15 2 26 1 8 9 10 6 7 3 4 5 12 11 18 19 20 16 17 13 14 15 2 27 1 8 7 6 10 9 19 20 16 15 14 13 17 18 11 12 5 4 3 2 28 1 8 7 6 5 12 13 17 18 11 10 9 19 20 16 15 14 4 3 2 29 1 8 7 3 4 14 13 17 18 11 12 5 6 10 9 19 20 16 15 2 30 1 8 7 3 4 5 6 10 9 19 20 16 17 18 11 12 13 14 15 2 TEST0365 GRAPH_ADJ_HAM_NEXT produces Hamilton circuits; The graph: 1 010101000 2 101000100 3 010101000 4 101000100 5 000001101 6 101010010 7 010110000 8 000001001 9 000010010 Circuits: 1 1 6 8 9 5 7 4 3 2 2 1 6 8 9 5 7 2 3 4 3 1 4 7 5 9 8 6 3 2 4 1 4 3 6 8 9 5 7 2 graph_adj_ham_next_brute_test(): graph_adj_ham_next_brute() seeks circuits in a graph which visit every node. A brute force algorithm is used. The graph: 1 010101000 2 101000100 3 010101000 4 101000100 5 000001101 6 101010010 7 010110000 8 000001001 9 000010010 Circuits: 1 1 2 3 4 7 5 9 8 6 2 1 2 3 6 8 9 5 7 4 3 1 2 7 5 9 8 6 3 4 4 1 4 3 2 7 5 9 8 6 No more circuits were found. graph_adj_is_bipartite_test() graph_adj_is_bipartite() reports if a graph is bipartite. The graph: 1 1000000000 2 1000000000 3 0000000000 4 1111010000 5 1101000000 6 1000001111 7 1000001111 8 1111010000 9 1000101100 10 1010010000 The graph is NOT bipartite. graph_adj_is_edgewise_connected_test(): graph_adj_is_edgewise_connected() reports if a graph is edgewise connected; Number of nodes is 6 Number of edges is 8 The graph: 1 000011 2 001100 3 010000 4 010010 5 100100 6 100000 The graph IS edgewise connected. graph_adj_is_nodewise_connected_test(): graph_adj_is_nodewise_connected() reports if a graph is nodewise connected; Number of nodes is 6 Number of edges is 8 The graph: 1 011100 2 100000 3 100010 4 100001 5 001000 6 000100 The graph IS nodewise connected. graph_adj_is_tree_test(): graph_adj_is_tree() reports if a graph is a tree. Number of nodes is 6 Number of edges is 5 The graph: 1 000001 2 000101 3 000010 4 010001 5 001000 6 110100 The graph is NOT a tree. graph_adj_random_test(): graph_adj_random() returns a random graph, for which edges are generated with a given probability. Here, we show the effect of increasing connectivity on the singularity of the adjacency matrix. Probability of edge generation = 0.250000 Number of edges generated = 47 Maximum number of edges = 190 Generated / Maximum = 0.247368 The graph: 1 00010000100000000000 2 00000001000001101100 3 00000000110000000000 4 10000010000100000110 5 00000000100000011101 6 00000010100110100000 7 00010100000000010100 8 01000000110000010001 9 10101101010100000000 10 00100001100100001010 11 00000000000010001110 12 00010100110000001000 13 00000100001000010000 14 01000000000000001000 15 01000100000000010001 16 00001011000010100101 17 01001000011101000101 18 01011010001000011000 19 00010000011000000000 20 00001001000000111000 The eigenvalues: 1 -3.45310 2 -2.87842 3 -2.57603 4 -2.29438 5 -2.12118 6 -1.46167 7 -1.17578 8 -0.823090 9 -0.565889 10 -0.305563 11 0.306986E-01 12 0.434680 13 0.571462 14 0.974419 15 1.32888 16 1.40963 17 2.27202 18 2.38227 19 2.96681 20 5.28422 Probability of edge generation = 0.400000 Number of edges generated = 84 Maximum number of edges = 190 Generated / Maximum = 0.442105 The graph: 1 01100010111011100001 2 10001010101010101010 3 10011000110000010110 4 00100001110100100011 5 01100101100111001100 6 00001000100000001100 7 11000001010010000011 8 00011010001100011000 9 11111100001100010011 10 10110010000000100000 11 11000001100001000101 12 00011001100011010000 13 11001010000100111111 14 10001000001100110111 15 11010000010011001110 16 00100001100111000101 17 01001101000010100111 18 00101100001011111001 19 01110010100011101000 20 10010010101011011100 The eigenvalues: 1 -4.21516 2 -3.89019 3 -3.34265 4 -2.51540 5 -2.36458 6 -1.82110 7 -1.53390 8 -1.14455 9 -0.836022 10 -0.331782 11 0.534033E-03 12 0.611299 13 0.787690 14 0.923102 15 1.50641 16 1.67351 17 2.10207 18 2.59093 19 3.02295 20 8.77684 Probability of edge generation = 0.650000 Number of edges generated = 105 Maximum number of edges = 190 Generated / Maximum = 0.552632 The graph: 1 01100110011010010111 2 10101101110110011011 3 11010010000111011110 4 00100001100011100011 5 01000010001110111000 6 11000011101110101111 7 10101101111010000100 8 01010110011000101111 9 01010110011110011101 10 11000011101111101111 11 10001111110101100001 12 01101100111011001011 13 11111110110101101000 14 00110000011110001001 15 00011101011010010000 16 11101000100000100001 17 01101101110111000110 18 10100111110000001000 19 11110101010100001000 20 11010101111101010000 The eigenvalues: 1 -4.36499 2 -3.85612 3 -3.45250 4 -2.77357 5 -2.45249 6 -1.91139 7 -1.58939 8 -1.44114 9 -0.705864 10 -0.433173 11 -0.916928E-01 12 0.225500 13 0.712470 14 1.36444 15 1.45731 16 1.67831 17 1.97632 18 2.26726 19 2.48603 20 10.9047 graph_adj_random_bipartite_test(): graph_adj_random_bipartite() returns a random bipartite graph; Number of nodes in set 1 is 4 Number of nodes in set 2 is 6 The graph: 1 1000011111 2 1000011111 3 1000000000 4 1000001110 5 1111100000 6 1000011111 7 1111100000 8 1001000000 9 1111100000 10 1110100000 Total number of edges is 0 Counted number of edges is 23 graph_adj_random_connected_test(): graph_adj_random_connected() returns a random connected graph; Number of nodes is 6 Number of edges is 8 The graph: 1 001110 2 001000 3 110000 4 100000 5 100001 6 000010 graph_adj_random_edges_test(): graph_adj_random_edges() returns a random graph with a specified number of edges. Number of edges requested = 10 The graph: 1 010101 2 101011 3 010110 4 101010 5 011101 6 110010 graph_adj_reduce_test(): graph_adj_reduce() finds the transitive reduction of a graph. The adjacency matrix for G: 1 10011000 2 01000000 3 00100011 4 10011000 5 10011100 6 00001100 7 00100010 8 00100001 Adjacency matrix for the transitive reduction of G: 1 00011000 2 00000000 3 00000011 4 10000000 5 10000100 6 00001000 7 00100000 8 00100000 graph_adj_span_tree_test(): graph_adj_span_tree() constructs a spanning tree of a graph. The graph: 1 0111111100000 2 1000110100000 3 1001001000000 4 1010000000000 5 1100000000000 6 1100000000000 7 1010000000000 8 1100000010000 9 0000000101001 10 0000000010111 11 0000000001010 12 0000000001100 13 0000000011000 The spanning tree: 1 1 2 2 1 3 3 1 4 4 1 5 5 1 6 6 1 7 7 1 8 8 8 9 9 9 10 10 9 13 11 10 11 12 10 12 graph_adj_span_tree_enum_test(): graph_adj_span_tree_enum() enumerates the spanning trees of a graph. The graph: 1 0111111100000 2 1000110100000 3 1001001000000 4 1010000000000 5 1100000000000 6 1100000000000 7 1010000000000 8 1100000010000 9 0000000101001 10 0000000010111 11 0000000001010 12 0000000001100 13 0000000011000 Total number of spanning trees is 1440 graph_adj_transitive_closure_test(): graph_adj_transitive_closure() finds the transitive closure of a graph; The adjacency matrix for G: 1 10011000 2 01000000 3 00100011 4 10011000 5 10011100 6 00001100 7 00100010 8 00100001 Adjacency matrix for the transitive closure of G: 1 10011100 2 01000000 3 00100011 4 10011100 5 10011100 6 10011100 7 00100011 8 00100011 graph_adj_test(): Normal end of execution. 06 October 2025 6:18:53.935 PM