Google Answers Logo
View Question
 
Q: Mathematics ( Answered,   1 Comment )
Question  
Subject: Mathematics
Category: Science > Math
Asked by: erospilot27-ga
List Price: $50.00
Posted: 04 Dec 2004 14:08 PST
Expires: 03 Jan 2005 14:08 PST
Question ID: 438117
Prove that 12, 12, 21, and 31 are the only double-digit numbers whose
squares are the reverses of the squares of the reverses of double
digit numbers, specifically the aforementioned numbers.  Both show why
it works for these numbers, and that only these numbers work this way.
Answer  
Subject: Re: Mathematics
Answered By: leapinglizard-ga on 04 Dec 2004 15:01 PST
 
Dear erospilot27,


Since the domain of double-digit numbers is rather small, we can carry
out an exhaustive search to see which ones satisfy the property. We
can use the following Python script to test every number between 10
and 99, inclusive.


#------ begin prove.py
roots = {}

for x in range(10, 100):
    square = x*x
    copy = square
    reverse = 0
    while copy > 0:
        reverse = 10*reverse + copy%10
        copy = copy/10

    if roots.has_key(reverse):
        print 'found %d and %d :' % (roots[reverse], x),
        print ' %d^2 = %d, %d = %d^2' % (x, square, reverse, roots[reverse])

    roots[square] = x

#------ end prove.py


The execution result is the following.


found 12 and 21 :  21^2 = 441, 144 = 12^2
found 13 and 31 :  31^2 = 961, 169 = 13^2
found 33 and 99 :  99^2 = 9801, 1089 = 33^2


It is clearly true for each of 12, 21, 13, and 31 that its square is
the reverse of the square of the reverse of a double-digit number. For
33 and 99, the property holds as long as we admit that 33 is the
reverse of a double-digit number, namely itself. However, notice that
33 is not the reverse of 99. We can exclude 33 and 99 from our final
result by rewording the proposition as follows.

  The only double-digit numbers such that their square is the reverse of the
  square of the reverse of the number are 12, 21, 13, and 31.

A more elegant way to put it is the following.

  The only double-digit numbers N such that N^2 = R^2 if R is the reverse of N
  are 12, 21, 13, and 31.


Regards,

leapinglizard

Request for Answer Clarification by erospilot27-ga on 05 Dec 2004 23:55 PST
Thank you very much fro your prompt answer.  I was wondering, however,
if there was a formula or a set way to figure this out without using a
program, likewise without going through each and every number.

Thank you kindly,

erospilot27

Clarification of Answer by leapinglizard-ga on 06 Dec 2004 14:19 PST
I don't see a better way to solve this problem than by exhaustive
search, since the possible values are so few and the algebraic
solution would be so complex.

I can certainly show you the beginnings of an abstract formulation. If
a double-digit number is expressed as

  n = 10a + b

for

  0 < a < 10

and

  0 < b < 10

then its reverse is another double-digit number, 

  r = 10b + a.

The squares of n and its reverse are

  n^2 = (10a + b)^2 = 100a^2 + 20ab + b^2

and

  r^2 = (10b + a)^2 = 100b^2 + 20ab + a^2

respectively.

If we propose that n^2 be the reverse of r^2, then, knowing that the
square of a double-digit number is at most four digits long, we have

  n^2 = 1000w + 100x + 10y + z

for

  0 <= w < 10,  0 <= x < 10,  0 <= y < 10,  0 <= z < 10

and

  r^2 = 1000z + 100y + 10x + w.

By this point we have four equations in six unknowns. There are
further and uglier complications to come, because w = 0 means that n^2
is four digits long, making the formula for r^2 invalid. It seems that
we in fact need two sets of equations, one for the case where n^2 has
four digits and one where it has three.

The case-by-case analysis of these equations promises to be so lengthy
and inscrutable that we are better off examining each of the possible
two-digit values, of which there are merely 9*9 = 81 in all. This is
one of those problems where exhaustive search is the simplest
solution.

leapinglizard

Request for Answer Clarification by erospilot27-ga on 13 Dec 2004 12:15 PST
leapinglizard,

please look at comment posted and reply.

thanks

erospilot

Clarification of Answer by leapinglizard-ga on 13 Dec 2004 16:06 PST
The comment agrees with me.

leapinglizard
Comments  
Subject: Re: Mathematics
From: efn-ga on 07 Dec 2004 08:31 PST
 
An algebraic solution would indeed be painful, and an exhaustive
search is indeed the simplest way to find the numbers, but a
number-theoretic analysis is also possible.  I will sketch the outline
and leapinglizard is welcome to finish it, if so inclined.

First, observe that both squares must have the same number of digits. 
The highest two-digit number with a three-digit square is 31, so
either both root numbers are less than or equal to 31, or both are
greater than 31.

If both are less than or equal to 31, the second digit of either
cannot be greater than 3, because then its reverse would be greater
than 31.  23 is out for the same reason.  That leaves 10, 11, 12, 13,
20, 21, 22, 30, and 31.  10, 20, and 30 work in the sense that 03
squared is equal to 009, but these seem to be ruled out by the problem
statement.  Similarly, 11 and 22 work, since, for example, 11 reversed
is 11 and 121 reversed is 121, but these too seem to be ruled out. 
12, 13, 21, and 31 are all that is left, and as we have seen, they
work.

What remains is to show that none of the numbers with four-digit
squares work.  We can do this by analyzing them by their last digits. 
Numbers ending in zero are ruled out as noted above.  Numbers ending
in 1 or 2 will not have reverses greater than 31, so they don't work. 
If a number ends in 3, its square will end in 9, so the reverse of the
square will be a four-digit number starting with 9.  For the square of
the reverse to be at least 9000, the reverse must be at least 95, but
since the original number ended in 3, its reverse must start with 3,
and there is no two-digit number that starts with 3 and is at least
95.

Similar analyses can be done for the ending digits 4 through 9.

Even this analysis shows only that 12-21 and 13-31 are the only
numbers that work and doesn't really show _why_ they work.

--efn

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy