10 April 2026 1:12:40.072 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 1000010100 4 1011101000 5 1100000011 6 1111101011 7 1000010100 8 1011101000 9 1011101000 10 1000010000 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 000000 2 100100 3 000010 4 010000 5 000100 6 001000 The graph is NOT 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 000100 2 100000 3 010000 4 100000 5 000001 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 001000 2 000100 3 100011 4 010010 5 001100 6 001000 The graph is 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 = 42 Maximum number of edges = 190 Generated / Maximum = 0.221053 The graph: 1 00000000010001000100 2 00000000000100001000 3 00010000000100100000 4 00101001001001110000 5 00010010100111000000 6 00000000100000000000 7 00001000011001100000 8 00010000000000001010 9 00001100011000100001 10 10000010100000000000 11 00010010100100000000 12 01101000001000001000 13 00001000000000011000 14 10011010000000010110 15 00110010100000000000 16 00010000000011001100 17 01000001000110010010 18 10000000000001010011 19 00000001000001001100 20 00000000100000000100 The eigenvalues: 1 -3.76033 2 -2.72125 3 -2.35769 4 -2.11710 5 -1.57784 6 -1.45176 7 -1.01901 8 -0.915541 9 -0.395715 10 -0.624207E-01 11 0.144210 12 0.193982 13 0.596303 14 0.942749 15 1.15530 16 1.32892 17 1.70092 18 2.54944 19 2.92905 20 4.83777 Probability of edge generation = 0.400000 Number of edges generated = 88 Maximum number of edges = 190 Generated / Maximum = 0.463158 The graph: 1 00010011100001011111 2 00010011111111001111 3 00011011010101001000 4 11101000000000100110 5 00110011001011110100 6 00000001001010000000 7 11101000100100010000 8 11101100111111101000 9 11000011001001001101 10 01100001000010110100 11 01001101100011101000 12 01100011000001001100 13 01001101011001010011 14 11101001101110101100 15 00011001011001010010 16 10001010010010101001 17 11100001101101010010 18 11011000110101000011 19 11010000000010101101 20 11000000100010010110 The eigenvalues: 1 -4.27602 2 -3.80462 3 -3.50673 4 -2.42953 5 -2.10719 6 -1.49049 7 -1.40295 8 -1.08822 9 -0.929061 10 -0.495612 11 -0.258069E-02 12 0.131720 13 0.423892 14 0.792533 15 1.24364 16 1.60643 17 2.29195 18 2.60550 19 3.07384 20 9.36350 Probability of edge generation = 0.650000 Number of edges generated = 121 Maximum number of edges = 190 Generated / Maximum = 0.636842 The graph: 1 01010011101001111101 2 10111001011101101101 3 01010111110101011100 4 11100000011101001111 5 01000101110001101111 6 00101000111111110111 7 10100000111111110101 8 11101000101111010001 9 10101111000111111001 10 01111110000111101110 11 11010111000011001110 12 01110111110001101000 13 00000111111001110010 14 11111111111110110011 15 11001110110111011111 16 10100111100011101101 17 11111000111100110001 18 11111110011000110000 19 00011100011011100001 20 11011111100001111010 The eigenvalues: 1 -4.68323 2 -3.55940 3 -3.15864 4 -2.83648 5 -2.01151 6 -1.76235 7 -1.71877 8 -1.41136 9 -1.16009 10 -0.753060 11 -0.487391 12 -0.274536E-01 13 0.251859 14 0.653705 15 1.33058 16 1.74014 17 1.92438 18 2.53973 19 2.80890 20 12.3204 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 1000000000 2 1111111111 3 1000000000 4 1011001100 5 1011001100 6 1011001100 7 1100110011 8 1000000000 9 1100110011 10 1000000000 Total number of edges is 0 Counted number of edges is 22 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 000000 2 000001 3 000001 4 000001 5 100000 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 011101 2 101000 3 110111 4 101010 5 001101 6 101010 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_to_graph_arc_test(): graph_adj_to_graph_arc() converts a graph adjacency representation of a graph to graph arc format. The graph adjacency matrix: 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 Number of edges is 38 The graph arc representation: 1 1 2 2 1 3 3 1 4 4 1 5 5 1 6 6 1 7 7 1 8 8 2 1 9 2 5 10 2 6 11 2 8 12 3 1 13 3 4 14 3 7 15 4 1 16 4 3 17 5 1 18 5 2 19 6 1 20 6 2 21 7 1 22 7 3 23 8 1 24 8 2 25 8 9 26 9 8 27 9 10 28 9 13 29 10 9 30 10 11 31 10 12 32 10 13 33 11 10 34 11 12 35 12 10 36 12 11 37 13 9 38 13 10 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_arc_to_graph_adj_test(): graph_arc_to_graph_adj() converts a graph arc representation of a graph to adjacency matrix format. The graph arc representation: 1 1 2 2 1 3 3 1 4 4 1 5 5 1 6 6 1 7 7 1 8 8 2 1 9 2 5 10 2 6 11 2 8 12 3 1 13 3 4 14 3 7 15 4 1 16 4 3 17 5 1 18 5 2 19 6 1 20 6 2 21 7 1 22 7 3 23 8 1 24 8 2 25 8 9 26 9 8 27 9 10 28 9 13 29 10 9 30 10 11 31 10 12 32 10 13 33 11 10 34 11 12 35 12 10 36 12 11 37 13 9 38 13 10 Number of nodes is 13 The adjacency matrix: 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 graph_adj_test(): Normal end of execution. 10 April 2026 1:12:40.074 PM