OFFSET
0,2
COMMENTS
LINKS
B. E. Sagan, Y-N. Yeh and P. Zhang, The Wiener Polynomial of a Graph, Internat. J. of Quantum Chem., 60, 1996, 959-969.
FORMULA
W(m,n) = m^2 + n^2 + 3*m*n + 2*m + 2*n + 1.
The Wiener polynomial of the graph G(n,m) is P(m,n;t) = (m+n+1)*t + (1/2)*(m^2 + n^2 + m + n)*t^2 + m*n*t^3.
EXAMPLE
W(1,2)=18 because in the graph with vertex set {A,a,B,b,b'} and edge set {AB, Aa, Bb, Bb'} we have 4 pairs of vertices at distance 1 (the edges), 4 pairs at distance 2 (Ab, Ab', Ba, bb') and 2 pairs at distance 3 (ab,ab'); 4*1 + 4*2 + 2*3 = 18.
The square array starts:
1, 4, 9, 16, 25, ...;
4, 10, 18, 28, 30, ...;
9, 18, 29, 42, 57, ...;
16, 28, 42, 58, 76, ...;
MAPLE
W := proc (m, n) options operator, arrow: m^2+n^2+3*m*n+2*m+2*n+1 end proc: for n from 0 to 10 do seq(W(n-i, i), i = 0 .. n) end do; # yields the antidiagonals in triangular form
W := proc (m, n) options operator, arrow: m^2+n^2+3*m*n+2*m+2*n+1 end proc: for m from 0 to 9 do seq(W(m, n), n = 0 .. 9) end do; # yields the first 10 entries of each of rows 0, 1, 2, ..., 9
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Jun 30 2011
STATUS
approved