random walk statistics with graph