Conway’s Wizards Generalized

Here I repeat the Conway’s Wizards Puzzle from a previous posting:

Last night I sat behind two wizards on a bus, and overheard the following:

— A: “I have a positive integral number of children, whose ages are positive integers, the sum of which is the number of this bus, while the product is my own age.”
— B: “How interesting! Perhaps if you told me your age and the number of your children, I could work out their individual ages?”
— A: “No.”
— B: “Aha! AT LAST I know how old you are!”

Now what was the number of the bus?

It is obvious that the first wizard has more than two children. If he had one child then his/her age would be the number of the bus and it would be the same as the father’s age. While it is unrealistic, in mathematics many strange things can happen. The important part is that if the wizard A had one child he couldn’t have said ‘No’. The same is true for two children: their age distribution is uniquely defined by the sum and the product of their ages.

Here is a generalization of this puzzle:

Last night I sat behind two wizards on a bus, and overheard the following:

— Wizard A: “I have a positive integral number of children, whose ages are positive integers, the sum of which is the number of this bus, while the product is my own age. Also, the sum of the squares of their ages is the number of dinosaurs in my collection.”
— Wizard B: “How interesting! Perhaps if you told me your age, the number of your children, and the number of dinosaurs, I could work out your children’s individual ages. ”
— Wizard A: “No.”
— Wizard B: “Aha! AT LAST I know how old you are!”

Now what was the number of the bus?

As usual with generalizations, they are drifting far from real life. For this puzzle, you have to open up your mind. In Conway’s original puzzle you do not need to assume that the wizard’s age is in a particular range, but once you solve it, you see that his age makes sense. In this generalized puzzle, you should assume that wizards can live thousands of years, and keep their libido that whole time. Wizards might spend so much of their youth thinking, that they postpone starting their families for a long time. The wizards’ wives are also generalized. They can produce children in great quantities and deliver multiple children at the same time in numbers exceeding the current world record.

Another difference with the original puzzle is that you can’t solve this one without a computer.

You can continue to the next step of generalization and create another puzzle by adding the next symmetric polynomial on the ages of the children, for example, the sum of cubes. In this case, I do not know if the puzzle works: that is, if there is an “AHA” moment there. I invite you, mighty geeks, to try it. Please, send me the answer.

In case you are wondering why the wizard is collecting dinosaurs, I need to point out to you that John H. Conway is a superb puzzle inventor. His puzzle includes a notation suggestion: a for the wizard’s age, b for the bus, c for the number of children. Hence, the dinosaurs.



  1. Konstantin Krayn:

    Dear Dr. Khovanova,

    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


    [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:

  2. Bryan Bischof:

    Hi Dr. Khovanova,

    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.

  3. tanyakh:

    Bryan, I agree with your suggestion to choose other symmetric polynomials. I chose the sum of squares for simplicity of saying it in English.

Leave a comment