Determine whether the given graph is connected.