Let G be a graph on 10 vertices of degrees 1,1,2,3,3,3,4,4,5,8. How many paths of length 2 does G contain?
The number of paths of length 2 is (1 + 1 + 2 + 3 + 3 + 3 + 4 + 4 + 5 + 8)/2 = 34/2 = 17.