8 Comments

My solution sounds different in my head, but is possibly the same on some level I don't understand. The set of toy counts contains positive and distinct integers. One of those integers, N, is the largest. In order to form N unique pairs, there must be N other distinct positive integers in the set. However, there are only N - 1 positive integers lower than N.

Expand full comment

I feel like the statement of requirements does not match the limitations presumed by the solution, and that the whole problem is kind of busted.

For any number of children `n`, Santa can just produce `n+1` different toys for a trivial solution. If this isn't allowed because Santa must decide how many different toys to manufacture in advanced, then it's easy to see that any fixed number of `m` toys has a finite number of unique combinations, so cannot generalize to any number of children.

Expand full comment

I'm not sure I follow. If there are n children and Santa makes n + 1 kinds of toys, how is he distributing them to the children such that every child gets exactly two toys (which are different kinds)?

Expand full comment

One toy is given to every child, while the remaining n toys are uniquely assigned to one child each.

Expand full comment

In that approach, each of the remaining n toys are given to one child, but the goal is to have each toy given to a different number of children. I.e., toy A is given to 1 child, toy B is given to 2 children, toy D is given to 4 children, etc.

Expand full comment

Where is that requirement stated?

Expand full comment

That's the stated question: "Following the 3 original requirements above, can Santa distribute toys such that each kind of toy is given to a different number of children?"

The idea is that it's easy to meet the three requirements, but unclear whether you can do it such that each kind of toy is given to a different number of children.

Although regardless, if it's not clear, that's on me!

Expand full comment

On re-reading now, it does seem quite clear. My original attempt to scan the problem quickly was not very successful then. I think my brain interpreted the explicit statement of 3 requirements like it would be the definitive list, where Santa's "wish" would be listed there too.

Expand full comment