Added: Generation of connected graph and extending to connected graph