Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: Combinatorics problem. (Updated with more info.)by danaj (Friar) |
on Dec 11, 2015 at 23:06 UTC ( [id://1150081]=note: print w/replies, xml ) | Need Help?? |
From DLMF or MathWorld we see the number of restricted compositions is binomial(n-1,m-1). So:
Basically the same with Math::Pari or Pari/GP. Chinn and Heubach (2003) and Opdyke (2008) have interesting info relating restricted compositions to Pascal's triangle. Edit: There's also some interesting but scattered info on OEISWiki, including the idea of encoding the compositions as RLE on binary. For generating the sequences, Kelleher's paper is a great reference.
In Section
Seekers of Perl Wisdom
|
|