For the general case of bipartite graphs and adjacent vetices i and j, the graph partitions into sets I and J where I are those vertices closer to i than to j and vice versa. The desired sum is then (a+1) times the sum over I of weighted distances from i plus (a+1) tiimes a similar sum involving j and J. Now you have to use some nice properties of I and J to get a nice form for the total. Gerhard "Ask Me About System Design" Paseman, 2012.01.27