in symmetry multiply the sum by C(t,t), poor result

Elapsed time is 2.330188 seconds.
mean=61.02, median=26.59

ans =

Columns 1 through 5

90.1953   56.5243   48.1979   30.1992   16.3204

Columns 6 through 7

11.4729    5.2926
multiply cost by the normalized cumsum of the incident vector to w

Elapsed time is 2.232981 seconds.
mean=26.47, median=26.89

ans =

Columns 1 through 5

94.5059   64.2421   46.3095   26.5896   17.3374

Columns 6 through 7

9.1978    2.6852