An Algorithm for Path Connections and Its Applications | Synapse