Divide the vertices (arbitrarily) into V1 and V2 each of n vertices. Respond to each question of the algorithm as follows: Notice that that algorithm cannot know G is not connected until it has asked about every edge fitting under rule (c) above (since the existence of any one of those edges in G would connect the graph). The number of edges fitting rule (c) above is n2 and hence at least n2 vertex pairs must be tested.