ch 8.2 Warshall and Floyd