On 17/10/2021 18:09, Charlie-Boo wrote:
> I have never asked about a PE problem before, but this is so frustrating here I am. It has to do with definitions.
>
> The problem is to count how many ways you can put m identical candles in n distinct candleholders in a (circular) chandelier and be balanced. f(n,m) = the number. The problem seems to be what they consider "balanced". They say:
>
> "If only one candle is fitted, then the chandelier will be imbalanced. However, if a second identical candle is placed in the opposite candleholder (assuming n is even) then perfect balance will be achieved and the chandelier will hang level."
>
That is true, but I doubt that's their /definition/ of balanced?
Probably the intended definition is just mean that "the chandelier
balances" in the obvious way. So I expect f(12,3) = 4 ? That's because
the following placements balance: {0,4,8}, {1,5,9}, {2,6,10}, {3,7,11}
and those are the only placements that balance.
Ok, more formally, I assume the candleholders are equally space, and for
a placement with position vectors e_1, e_2, ... e_n the balancing
requirement would be e_1 + ... + e_n = 0.
> If this means we put in pairs of candles on opposite sides then there are m/2 pairs and n/2 places we can put them, so the answer is trivial: The number of subsets of size m/2 from a set of size n/2 i.e. (n/2)C(m/2). (This would be unprecedented.)
>
> They give f(12,4)=15 which is in fact 6C2.
Yes, but when placing 4 candles, all balancing placements will have to
have the placements in opposite pairs. Hmmm, that needs a proper proof,
but e.g. if we place 3 in an equilateral triangle, the last candle will
unbalance everything. So your (n/2)C(m/2) happens to work for this input.
>
> They give f(36,6)=876 but 18C3 is 816. I am missing 60. That suggests that not all candles are in pairs e.g. an equilateral triangle of 3 candles balances so I could put a pair at each vertex. But that would add many more than 60.
Well, I've not calculated anything, but the difference for f(36,6) is
that they can be placed in two sets of 3 equilateral triangles. (But
some of those placements will also result in opposite pairs, so overall
would think this would add 12*10/2 = 60. Hey that's exactly your
shortfall!
So you do you say you'd need many more than 60? We can divide the
holders into 3 runs of 12, so we choose one of those first giving the 12
factor, then the next triangle must contain one of the remaining 11 in
the run, but /not/ the one opposite one of the first placements, so
there are 10 possibilities, and we divide by 2 because the order of
choosing the triangles doesn't matter.
A more worrying problem for me is whether there are balancing placements
which /don't/ consist of subsets with rotational symmetry. That's a
genuine maths problem rather than a programming problem, and I think the
answer is "no", but I don't have an instant proof of that...
Mike.