Design And Analysis Of Interconnected Systems: Optimization Algorithms And Linear-Threshold Brain Networks