Comment by johnisgood

Comment by johnisgood 7 months ago

2 replies

What is the difference between integer compositions and integer partitions? It says a composition is just an ordered partition of an integer, but according to this article, number 4 can be partitioned into 5 parts, but apparently has 8 compositions. I find the 8 compositions much more accurate, but I do not get why it would not have 8 partitions.

tux3 7 months ago

1 + 3 and 3 + 1 are the same partition of 4, because it's a sum with the same two numbers. The order of the 1 and the 3 doesn't matter for partitions.

But that's two compositions.

I think this article could really use more applied, concrete examples if it's intended for programmers.

It seems their idea for connecting math and programming was printing out a bunch of C code, without further motivation. But coding is an applied field, developpers will want a concrete idea of what they can do with it.

This is still too abstract.

  • johnisgood 7 months ago

    Thank you for the explanation, it definitely cleared things up for me.

    > I think this article could really use more applied, concrete examples if it's intended for programmers.

    > This is still too abstract.

    I agree.