Consider a matrix $A$ of size $n\times n$. I want to fill it with one and zero such that there are exactly two entries one in each row and each column, and the other entries are zero.
In how many different ways I can fill $A$?

  • 2
    $\begingroup$ I don't see much relation to matrices or permutations here. It's mostly combinatorics, ways to order things under certain constraints. $\endgroup$ – Asaf Karagila Apr 25 '11 at 14:15
  • $\begingroup$ Well, I can see a relation to matrices and permutations and I do not see the utility of removing the tags. $\endgroup$ – Phira Apr 25 '11 at 14:40
  • $\begingroup$ @user9325: You can always put them back, but in case you do - please elaborate why. $\endgroup$ – Asaf Karagila Apr 25 '11 at 14:43
  • 2
    $\begingroup$ @Asaf I think that the onus is on you to justify why you took them away instead of asking me to elaborate. The number is related to derangements, the matrices are matrices that are a direct generalization of permutation matrices, the column number in each row can be chained together to form a fixed-point free permutation and I find it highly ironic to say that you do not see the relation to permutations because it is only about the ways to order things. $\endgroup$ – Phira Apr 25 '11 at 14:55
  • $\begingroup$ There is also the question what tags are good for. I think that "permutation" and "matrix" is exactly what comes to mind if one tries to find this question. (I certainly do not disagree with the tag combinatorics.) $\endgroup$ – Phira Apr 25 '11 at 14:57

You find your series in the online encyclopedia of integer series.


Note that the given formulas are all recursive, sums or asymptotic results.

In particular, the generating function is related to the generating functions of derangements, permutations without fixed points.

  • $\begingroup$ Finding this is not too hard. Calculating by had the numbers 0,1,6,90 for orders 1-4 brings it right up. $\endgroup$ – Ross Millikan Apr 25 '11 at 15:11
  • 2
    $\begingroup$ I'll just note the closed form $n(n-1)\frac{(2n-2)!}{2^{2n-2}}{}_1 F_1\left(2-n;\frac32-n;-\frac12\right)$ listed in the OEIS. $\endgroup$ – J. M. is a poor mathematician Apr 25 '11 at 15:28
  • $\begingroup$ Asymptotically, it is $$\frac{n!^2}{\sqrt{n\pi e}}$$ $\endgroup$ – Ross Millikan Apr 26 '11 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.