I also have recently been thinking about Conway more like Konstantin above, and have similarly confirmed his 46/47 values. The next case seems to rapidly approach hard to compute in a reasonable amount of time.

I was hoping to ask you about your choice of generalization. You say that the next generalization is by adding a condition for the sum of squares of children’s ages (the parts of the partition of the bus number); you further say that the next symmetric polynomial would be the sum of cubes. I feel a little surprised that those are the “next” symmetric polynomials. In which sense is this a progression? From what I can tell, you start with sum, which is the degree 1 elementary symmetric polynomial, then go to the degree $k$ elementary polynomial for partition of $k$ parts. From here, going to sum of squares returns you back to degree two symmetric, but it’s not an elementary symmetric function, so I wonder where the inspiration comes from.

I thought of the generalization a bit differently:

Taking a step back here and thinking about the actual relationship between the sum of the children’s ages and the product, one can see that they’re actually the first and last symmetric polynomials, so rather than taking $n$-powers, when trying to generalize, we should instead fill in those symmetric polynomials in between!

For a given $B$, we now have our partition $p$ that we wish to consider the symmetric polynomials for. Recall that for $k$ variables, there are $k$ symmetric polynomials corresponding to the various degrees. So no longer will the number of conditions be fixed in this generalization. The number of partition parts $C$ will determine the number of conditions that must be satisfied.

For example, let’s consider the bus number 5:

First, we see the partitions with 3 parts are $(1,1,3)$, $(1,2,2)$, and the corresponding symmetric polynomials are:

– $e_1 = x_1 + x_2 + x_3$,

– $e_2 = x_1*x_2 + x_2*x_3 + x_1*x_3$,

– $e_3 = x_1*x_2*x_3$.

In this case the output tuple would be of length three. So when investigating for such tuples that match, we need consider these further conditions.

It’s tricky to imagine an elegant phrasing to the puzzle in this way, but you could say “I’m willing to tell you the sum of products of all _combinations_ of my children’s ages”, instead of the sum and product conditions.

One simplification is to consider $B$ and the $C$ as separated for the sake of checking cases now. Since the number of assumptions changes this will simplify the logic, and the output of the sequence should be for a given $B$ how many $C$ tuples can be produced by more than one partition of $B$ such that $e_i(p_1)=e_j(p_2)$ for all $i,j$.

The original puzzle relaxes this condition to need only satisfy this for $e_1$ and $e_C$. It’s fine to let your puzzle be some specific set of these elementary symmetric polynomials, like the first $k$ for partitions with at least $k$ parts, and all that exist for those with less than $k$.

I wrote the code for these cases as well now.

]]>As late in coming as this comment is, your intuition about the step of generalization of Conway’s Wizards riddle that involves the sum of cubes appears to have been vindicated: two bus numbers, 46 and 47, satisfy all the conditions rather than a unique one. And the wizard ain’t getting younger.

It is sad that the riddle’s author is no longer with us.

— Konstantin

Out:

[empty <46]

sum()=46, len()=7, prod()=62720, sum(^2)=466, sum(^3)=5806

(1, 4, 4, 4, 5, 14, 14)

(2, 2, 2, 7, 7, 10, 16)

sum()=47, len()=8, prod()=62720, sum(^2)=467, sum(^3)=5807

(1, 1, 4, 4, 4, 5, 14, 14)

(1, 2, 2, 2, 7, 7, 10, 16)

sum()=48, len()=9, prod()=62720, sum(^2)=468, sum(^3)=5808

(1, 1, 1, 4, 4, 4, 5, 14, 14)

(1, 1, 2, 2, 2, 7, 7, 10, 16)

sum()=48, len()=8, prod()=125440, sum(^2)=470, sum(^3)=5814

(1, 2, 4, 4, 4, 5, 14, 14)

(2, 2, 2, 2, 7, 7, 10, 16)

Python code here:

https://www.pythonanywhere.com/user/ognslon/shares/dd4809e84e1d4f658dcda285a8a0515d/