Project 1, section 3.2's Warshall Algorithm