euclerian nd connectivity in graph