[erlang-questions] [Erlang-Question] Is Erlang good for Matrix manipulation and AI related algorithms
Wed Nov 16 17:33:55 CET 2011
Forget what I said about Catalan Numbers (these count paths staying
below the diagonal).
What you need is this: http://mathworld.wolfram.com/LatticePath.html
>From this you could easily derive that the number of paths in a n x m
x k cuboid is:
(n+m+k)! / (n!*m!*k!)
Well that was easier than I thought.
On Tue, Nov 15, 2011 at 6:19 AM, Barco You <barcojie@REDACTED> wrote:
> Hi Peer,
> Could you please show me the one-line operation in erlang? Thank you!
> On Tue, Nov 15, 2011 at 1:18 PM, Peer Stritzinger <peerst@REDACTED> wrote:
>> On Thu, Nov 10, 2011 at 6:39 AM, Barco You <barcojie@REDACTED> wrote:
>> > I hope to know there are how many paths across a specific point in a
>> > cubic
>> > lattice if we walk from the origin to the far-most diagonal point.
>> It is not difficult to derive a closed form for this number, then
>> It'll be a fast O(1) operation in one line in any language.
>> -- Peer
More information about the erlang-questions