check if nodes represented by circles are connected. The function defines all the possible segments between the circles and check if at least one segment exists.
Useful links