Matrix reordering methods. A, Left, Example of a matrix implementing a single feedforward sequence, which is distorted by a few random feedback and out-of-sequence feedforward components (top). Random index shuffling yields a scrambled version of the original matrix (bottom). Middle, Outcome of matrix reordering algorithms applied to the scrambled matrix based on bandwidth minimization (top, reverse Cuthill McKee) and propagating ranks (bottom). Right, Outcome of matrix reordering using the python package Tarjan (top), and a custom-modified version minimizing the upper triangular elements in loops (bottom). B, Application of the modified Tarjan procedure to a 66 × 66 random matrix (sparseness 0.15), the full connectome of the fly optic lobe (red represents hyperpolarizing connections), and a thresholded version of the optic lobe connectome only considering connections with >10 synapses. C, Modified Tarjan reordering of the fly subcircuit for ON-motion detection (top) and a reduced version with a threshold at 20 synapses (bottom). Saturation of colors (green represents excitatory; red represents inhibitory) illustrates synapse numbers (black). D, Top, Original connectome derived from chemical synapses of the entire worm hermaphrodite C. elegans (454 node) (Cook et al., 2019), reordered with the original (middle) and modified (right) Tarjan algorithm. Bottom, Same as in top, but only taking into account connections with 4 and more synapses (independent of neurotransmitter).