Just another Perl shrine | |
PerlMonks |
Re: compute paths in Pascal's triangle (aka Tartaglia's one)by hdb (Monsignor) |
on Mar 22, 2018 at 13:58 UTC ( [id://1211524]=note: print w/replies, xml ) | Need Help?? |
The property you mention is simple to prove: "the number in a specific tile is also the number of different shortest path from the top tile". In any path to a tile n-k, you have (n-k) (n minus k) moves left, and k moves right. Only the order of these moves determine the specific path. The number of possible permutations of (n-k) and k identical elements each is n! / k! / (n-k)! which is the number in the tile.
In Section
Seekers of Perl Wisdom
|
|