In [ ]:
0!5
In [ ]:
1!5
In [ ]:
2!5
In [ ]:
bc=: i. !/ i.
In [ ]:
bc 6
Such a matrix can be used in a variety of interesting ways. For example, its inverse is the matrix of alternating binomials, and its matrix product with a vector of polynomial coefficients (with powers in ascending order) produces the coresponding "expanded" coefficients. For example:
In [ ]:
bct=: bc 6
In [ ]:
bct
In [ ]:
abct=: %. bct
In [ ]:
abct
In [ ]:
X=: +/ . * NB. The matrix product function
In [ ]:
bct X abct
In [ ]:
c=: 5 1 4 0 2 2
In [ ]:
d=: bct X c
In [ ]:
x=: 0 1 2 3 4 5 6 7
In [ ]:
c p. x NB. The polynomial with coefficients c
In [ ]:
d p. x
In [ ]:
c p. x+1
In [ ]:
abct X d
In [ ]:
c
In [ ]:
c=abct X d
If the vector c is written as a column to the right of the matrix bct, the product bct X c is easily computed by hand. Moreover, such computation may be less prone to error than commonly used methods. Try the experiment of expanding the vector c by by this method and by any others you may know.
Finally, it is easy to jot down the table bct of any order, because each row is obtained from the preceding row by adding it to a shift of itself.
It may also be interesting to compute the sums of the columns of bct and abct (+/ bct and +/ abct), particularly since the result of the latter is commonly mis-stated.
It is clear that the product bct X bct contains sums over products of various binomial coefficients. If, therefore, one could spot and articulate the pattern of the elements of the result, it could be used to state a host of identities, provided that the pattern holds for larger tables.
Try to state the pattern in the following results:
In [ ]:
bct X bct
In [ ]:
bct X bct X bct
In [ ]:
bct X bct X bct
In [ ]:
bct X bct X bct X bct
In [ ]:
(bct X bct) % bct
In [ ]:
(bct X bct X bct) % bct
In [ ]:
(bct X bct X bct) % bct
In [ ]:
(bct X bct X bct X bct) % bct
In [ ]: