Finding Number Pairs with Reversible Results

  • Context: High School 
  • Thread starter Thread starter Greg Bernhardt
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around finding pairs of numbers that, when added, yield a result that is the reverse of the result obtained when the same numbers are multiplied. The focus is on identifying such pairs for both two-digit and three-digit results, with an emphasis on computational methods for solving the problem.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant identifies pairs of numbers (24 and 3, 47 and 2) that meet the criteria for two-digit results, and suggests there is only one such pair for three-digit results.
  • Another participant questions the fairness of using a computer to exhaustively search for solutions.
  • There is a discussion about the lack of an analytic solution to the problem, with some suggesting that heuristic methods may be necessary.
  • A participant shares a solution obtained through a Matlab program and expresses a desire for clarity on the acceptable use of computational resources in such problems.
  • Another participant mentions using C++ to arrive at a solution, indicating that their code successfully identified a valid pair (497 and 2) that meets the criteria.
  • One participant acknowledges the point made by another regarding the use of computational methods in the context of the competition.

Areas of Agreement / Disagreement

Participants express differing views on the appropriateness of using computational methods to solve the problem, with some supporting the use of programming while others question its alignment with the spirit of the challenge. The discussion remains unresolved regarding the general rules for resource use in such problems.

Contextual Notes

There are limitations regarding the clarity of rules on computational resource use, and the discussion reflects uncertainty about the nature of acceptable methods for solving the problem.

Who May Find This Useful

Individuals interested in mathematical puzzles, programming solutions to numerical problems, and discussions about computational methods in problem-solving may find this thread useful.

Messages
19,917
Reaction score
10,945
If you add 9 and 9 you get 18, and if you multiply 9 by 9 you get 81 (the reverse of 18). There are 2 more pairs of numbers with the same characteristics and where the result is two-digit:
24 + 3 = 27 and 24 * 3 = 72
and
47 + 2 = 49 and 47 * 2 = 94

But there is only one pair of numbers with a triple-digit result and its reversion.

What are the 2 numbers?
 
Mathematics news on Phys.org
Is it fair game to exhaust these via computer?
 
seeing as there isn't a solution under a million... I am assuming you can use a computer

update: arg.. it's too big for QBASIC...
 
Last edited:
Hurkyl, you've used a computer to get a brain teaser in the past... and I think brum has a point insofar as there's not really an analytic solution to the problem (heuristics maybe, but even those basically boil down to trying out a very large set of computations to see if you can stumble on the right answer).

Anyway, I have the solution from a Matlab program I wrote but after your post I decided to wait on Greg's input into this. In the future I think it should be more explicit what resources are and are not allowed in general (eg I would think google is a no-no for any of these) and in particular cases (eg the acceptability of the use of a computer program for a question like this one).
 
Yah, I did on a previous one, but it didn't dawn on me until just now that it might not be in the spirit of the competition.
 
hmmm... well I suppose use a computer, except if it's a program especially for that calculation.
 
I too have come up with an answer. Instead of matlab, I used c++.

[edit]
So is that a yes for a program. Its my own code. See below:

#include <iostream>
#include <sstream>
#include <string>

using namespace std ;

bool reverse_equal( int x , int y )
{
string s1 , s1_flip = "" , s2 ;
ostringstream s1_stream , s2_stream ;
int xy_flip ;
s1_stream << x+y ;
s2_stream << x*y ;
s1 = s1_stream.str() ;
s2 = s2_stream.str() ;
for( int z = s1.length() - 1; z >= 0 ; z-- )
s1_flip += s1[z] ;
if( s1_flip == s2 ) return true ;
else return false ;
}

int main( void )
{
for( int x = 1; x < 1000 ; x++ )
{
for( int y = 1; y < 500 ; y++ )
{
if( reverse_equal( x , y ) )
{
count << "X: " << x << endl ;
count << "Y: " << y << endl ;
count << "X+Y: " << x+y << endl ;
count << "X*Y: " << x*y << endl << endl ;
}
}
} }


Answer :

X: 497
Y: 2
X+Y: 499
X*Y: 994
[edit]
 
Last edited:

Similar threads

  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 24 ·
Replies
24
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 77 ·
3
Replies
77
Views
9K