In case you wanted something more than an informal introduction into the world of fat-tree and torus networks — here you are. A formal problem statement (and solution!) in an academic form is given in these two articles hosted at arXiv:
K.S. Solnushkin, “Automated Design of Two-Layer Fat-Tree Networks”
(link: arXiv:1301.6179) (cite with BibTeX)
K.S. Solnushkin, “Automated Design of Torus Networks”
(link: arXiv:1301.6180) (cite with BibTeX)
arXiv is the leading open access repository of scientific papers.