# Solving an alphametic puzzle by eavesdropping

I took part in a meeting of puzzle maniacs. I overheard a conversation between two persons.

A: Hey, solve this alphametic problem. LHS is a square of two-digit number and RHS is a four-digit number.

B: Does it contain some middle steps?

A: No. That's a whole. Can you solve it?

B: The answer cannot be determined. If we know whether the number is odd or even, it could be unique.

A: Wait, please. Let me read again. Oh, sorry. The parity was mentioned in the problem.

B: OK. That figures. If the parity was given reversely, we couldn't get the unique answer.

I did not see their problem. But, I could solve it just by eavesdropping.

What's the answer of this alphametic problem?

PS. The parity in the dialogue means whether the RHS number is odd or even.

$$93^2 = 8649$$

Reasoning:

There are 3 possible puzzles matching the conversation:
$$(AB)^2 = CDCB$$, where AB can be 56, 45, 81 or 91
$$(AB)^2 = CDDB$$, where AB can be 46, 35, 65 or 85
$$(AB)^2 = CDEA$$, where AB can be 42, 48 or 93
If A said that the number is even, and B deduced the unique answer, then AB can be either 56 or 46, leaving "I" unable to solve it.
Therefore the number is odd, and the answer is $$93^2 = 8649$$.

Puzzle: $$(AB)^2 = CDEA$$
The solutions are: $$42^2 = 1764$$, $$48^2 = 2304$$, $$93^2 = 8649$$

For the parity part:

If we know A is odd, AB is 93, otherwise its 42 or 48
If we know B is odd, AB is 93, otherwise its 42 or 48
If we know C is odd, AB is 42, otherwise its 48 or 93
If we know D is even, AB is 93, otherwise its 42 or 48
E must be even in this puzzle

However...

We still can't deduce the answer of the alphametic problem, unless we heard the sentence about parity clearly. If we know which number/letter's parity is given, we can get the answer.

I listed all the squares between 1000~9999. There are only 67 of them so its relatively easy to bruteforce. After listing the squares I looked for the potential puzzles with 3 solutions or more and find this.

• The parity means that of the RHS number. Apr 11 '20 at 16:00
• Get it, the answer is now updated accordingly. Apr 11 '20 at 16:08

I have no idea how to prove its uniqueness, but here is a possible situation:

Puzzle: $$AB^2=CDCB$$.
The solutions: $$56^2=3136$$, $$81^2=6561$$, $$91^2=8281$$, $$45^2=2025$$.
Unique if we know the numbers are even.

How I get this:

Let the last digit be same (so my work will be easier) and list squares of two-digit integers ending with $$1,5,6$$.

• Find some more possible situations. Apr 11 '20 at 16:02