3 ms·
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 t
by johnisgood 1y ago
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 1y ago1 + 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 1y agoThank 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.