Using [Daniel Lichtblau's answer](http://mathematica.stackexchange.com/a/6184/125) to a [related question ](http://mathematica.stackexchange.com/q/6183/125) ConnectedComponents[Graph[UndirectedEdge @@@ pairs]] gives {{13, 10, 36, 1, 6}, {12, 14, 16, 23}, {35, 11, 21, 22}, {3, 5, 9}, {20, 24, 32, 25, 28, 17}, {33, 7, 34, 19, 4, 26, 30}, {31, 8, 27, 18, 15, 2, 29}}