add first graph algorithm
add algorithm defining the number connected units