calculate number of graphs (connected segemts) if more than one -> connect them to get a fully networked system