All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
my house's number (Posted on 2004-06-21) Difficulty: 3 of 5
My house's number can be written as ABCD but it also equals to A^B * C^D. Find the number ..-no computer programs!!!

See The Solution Submitted by Ady TZIDON    
Rating: 4.5000 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution another method, no programming | Comment 27 of 32 |

<o:p></o:p>

<o:p></o:p>

The key is the value of D, that can't be zero.<o:p></o:p>

<o:p> </o:p>

Ordering the possible values for (A^B) and (C^D) by the units digit :<o:p></o:p>

<o:p> </o:p>

(1, 81, 2401, 6561), (2, 32, 512), (3, 243, 343), (4, 64, 1024), (5, 25, 125, 625, 3125), (6, 16, 36, 216, 256, 1296, 4096, 7776), (7, 27, 2187), (8, 128), (9, 49, 729).<o:p></o:p>

<o:p> </o:p>

Remembering that the house's number lies between 1000 and 9999 :<o:p></o:p>

<o:p> </o:p>

D = 9 requires two powers that ends in (1,9) or (3,3) or (7,7) or (9,1). For (1,9) or (9,1) we need only  1 multiplication (81 x 49). For (3,3), and (7,7), we need no multiplication. <o:p></o:p>

<o:p> </o:p>

D = 8 requires two powers that ends in (1,8) or (8,1) or (2,4) or (4,2). For (1,8) or (8,1), we need no multiplication. For (2,4) or (4,2), we need only 3 multiplications : (2 x 1024), (32 x 64) and (512 x 4).<o:p></o:p>

<o:p> </o:p>

D = 7 requires two powers that ends in (1,7) or (7,1) or (3,9) or (9,3). For (1,7) or (7,1), 2 multiplications. For (3,9) or (9,3), 3 multiplications.<o:p></o:p>

<o:p> </o:p>

D = 6 requires two powers that  ends in (1,6) or (6,1) or (2,3) or (3,2) or (2,8) or (8,2) or (4,4) or (4,9) or (9,4) or (7,8) or (8,7). For (1,6) or (6,1), 5 multiplications (most of all by 1 !!). For (2,3) or (3,2), 2 multiplications. For (2,8) or (8,2), 2  multiplications. For (4,4), 2 multiplications. For (4,9) or (9,4), 3 multiplications. For (7,8) or (8,7), 1 multiplication.  <o:p></o:p>

<o:p> </o:p>

D = 5 requires two powers that ends in (1,5) or (5,1) or (5,5). For (1,5) or (5,1), 2 multiplications. For (5, 5), 2 multiplications.<o:p></o:p>

<o:p> </o:p>

D = 4 requires two powers that ends in (1,4) or (4,1) or (2,7) or (7,2) or (3,8) or (8,3) or (4,6) or (6,4). For (1,4) or (4,1), 3 multiplications. For (2,7) or (7,2), 2 multiplications. For (3,8) or (8,3),  2 multiplications. For (4,6) or (6,4),  5 multiplications.<o:p></o:p>

<o:p> </o:p>

D = 3 requires two powers that ends in (1,3) or (3,1) or (7,9) or (9,7). For (1,3) or (3,1), 1 multiplication. For (7,9) or (9,7), 2 multiplications.<o:p></o:p>

<o:p> </o:p>

D = 2 requires two powers that ends in (1,2) or (2,1) or (2,6) or (6,2) or (3,4) or (4,3). For (1,2) or (2,1), 2 multiplications (that leads to the solution). For (2,6) or (6,2), 6 multiplications. For (3,4) or (4,3), 2 multiplications.<o:p></o:p>

<o:p> </o:p>

D = 1 requires two powers that ends in (1,1) or (3,7) or (7,3) or (9,9). For (1,1), 2 multiplications (by 1). For (3,7) or (7,3), 5 multiplications. For (9,9), 2 multiplications. <o:p></o:p>

<o:p> </o:p>

It seems that these  61 multiplications are too much, but many of them has 1 as a factor, and many others doesn't indeed to be evaluated.<o:p></o:p>

<o:p> </o:p>

Unique solution : For D = 2, factors 32 and 81, product 2592.  <o:p></o:p>


  Posted by ARLEKIM on 2005-02-08 16:54:01
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information