Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Combinatorics problem. (Updated with more info.)

by Discipulus (Canon)
on Dec 11, 2015 at 20:16 UTC ( [id://1150068]=note: print w/replies, xml ) Need Help??


in reply to Re: Combinatorics problem. (Updated with more info.)
in thread Combinatorics problem. (Updated with more info.)

++ oiskuu i suspected that the answer had to be in the triangle.. congrats!

L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^3: Combinatorics problem. (Updated with more info.)
by danaj (Friar) on Dec 11, 2015 at 23:06 UTC

    From DLMF or MathWorld we see the number of restricted compositions is binomial(n-1,m-1). So:

    perl -Mntheory=:all -E 'say binomial(12-1,7-1)' 462

    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1150068]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-24 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found