Graph connectivity problem solver implementation.