implemented compute expected number of hops