# different what?

vdmcc w.meeussen.vdmcc at vandemoortele.be
Mon Oct 11 21:19:11 CEST 1999

```Eric & Collin & others,
Formulating stuff
clearly is clearly
not my strongest point.
I meant to count 'multiplicities' as below:
Step_by_step:

Table[(Plus @@@ KSubsets[Range[2n], n]), {n, 0, 4}] // ColumnForm

{0},
{1, 2},
{3, 4, 5, 5, 6, 7},
{6, 7, 8, 9, 8, 9, 10, 10, 11, 12, 9, 10, 11, 11, 12, 13, 12, 13,
14, 15},
{10, 11, 12, 13, 14, 12, 13, 14, 15, 14, 15, 16, 16, 17, 18, 13,
14, 15, 16, 15, 16, 17, 17, 18, 19, 16, 17, 18, 18, 19, 20, 19,
20, 21, 22, 14, 15, 16, 17, 16, 17, 18, 18, 19, 20, 17, 18, 19,
19, 20, 21, 20, 21, 22, 23, 18, 19, 20, 20, 21, 22, 21, 22, 23,
24, 22, 23, 24, 25, 26}

**These are the outcomes (less offset):
Table[(Plus @@@ KSubsets[Range[2n], n]) - n(n + 1)/2, {n, 0, 4}]
{{0},
{0, 1},
{0, 1, 2, 2, 3, 4},
{0, 1, 2, 3, 2, 3, 4, 4, 5, 6, 3, 4, 5, 5,
6, 7, 6, 7, 8, 9},
{0, 1, 2, 3, 4, 2, 3, 4, 5, 4, 5, 6, 6, 7, 8, 3, 4, 5,
6, 5, 6, 7, 7, 8, 9, 6, 7, 8, 8, 9, 10, 9, 10, 11, 12, 4, 5, 6, 7, 6, 7,
8, 8, 9, 10, 7, 8, 9, 9, 10, 11, 10, 11, 12, 13, 8, 9, 10, 10, 11, 12,
11,
12, 13, 14, 12, 13, 14, 15, 16}}

** there are indeed n^2+1 different ones **
Table[Split[Sort[(Plus @@@ KSubsets[Range[2n], n]) - n(n + 1)/2]], {n, 0,
4}]

{{{0}},
{{0}, {1}},
{{0}, {1}, {2, 2}, {3}, {4}},
{{0}, {1}, {2, 2}, {3, 3,
3}, {4, 4, 4}, {5, 5, 5}, {6, 6, 6}, {7, 7}, {8}, {9}},
{{0}, {1}, {2,
2}, {3, 3, 3}, {4, 4, 4, 4, 4}, {5, 5, 5, 5, 5}, {6, 6, 6, 6, 6, 6,
6}, {7, 7, 7, 7, 7, 7, 7}, {8, 8, 8, 8, 8, 8, 8, 8}, {9, 9, 9, 9, 9,
9,
9}, {10, 10, 10, 10, 10, 10, 10}, {11, 11, 11, 11, 11}, {12, 12, 12,
12,
12}, {13, 13, 13}, {14, 14}, {15}, {16}}}

** these are their frequencies, or multiplicities if you will **
** "how many KSubsets add up to a given value ? " **
Table[Length /@
Split[Sort[(Plus @@@ KSubsets[Range[2n], n]) - n(n + 1)/2]], {n, 0, 4}]
{{1},
{1, 1},
{1, 1, 2, 1, 1},
{1, 1, 2, 3, 3, 3, 3, 2, 1, 1},
{1, 1, 2, 3, 5, 5, 7, 7, 8, 7, 7, 5, 5, 3, 2, 1, 1}}

** What I should have 'asked' is:
** "how many different multiplicities are there?"

Length[Union[#]] & /@
Table[Length /@
Split[Sort[(Plus @@@ KSubsets[Range[2n], n]) - n(n + 1)/2]], {n, 0,
4}]

{1, 1, 2, 3, 6, ..}

w.meeussen.vdmcc at vandemoortele.be
tel  +32 (0) 51 33 21 11
fax +32 (0) 51 33 21 75

```