|
|
last edited 17 years ago |
1 | ||
Editor:
Time: 2007/11/18 18:02:23 GMT-8 |
||
Note: |
changed: - f calculates the number of 0-1 matrices with row sums 'A' and column sums 'B'. \begin{axiom} f(A:List PI, B:List PI): FRAC INT == cap(reduce(*, [elementary i for i in A]), reduce(*, [complete i for i in B])) \end{axiom} For example, there are \begin{axiom} f([2,2,2,2], [2,3,3]) \end{axiom} 0-1 matrices whose rows all sum up to two and whose first column has 2 entries equal to one, the others having 3 entries equal to one.
f calculates the number of 0-1 matrices with row sums A
and column sums B
.
f(A:List PI,B:List PI): FRAC INT == cap(reduce(*, [elementary i for i in A]), reduce(*, [complete i for i in B]))
Function declaration f : (List(PositiveInteger),List( PositiveInteger)) -> Fraction(Integer) has been added to workspace.
For example, there are
f([2,2, 2, 2], [2, 3, 3])
Compiling function f with type (List(PositiveInteger),List( PositiveInteger)) -> Fraction(Integer)
(1) |
0-1 matrices whose rows all sum up to two and whose first column has 2 entries equal to one, the others having 3 entries equal to one.