|
|
Subject:
Need an Algorithm for this Integer problem. Can you figure it out?
Category: Science > Math Asked by: zeusdman-ga List Price: $50.00 |
Posted:
19 May 2006 09:06 PDT
Expires: 18 Jun 2006 09:06 PDT Question ID: 730401 |
Need an Algorithm for this Integer problem. Can you figure it out? Looking for an algorithm to perform the following mathematical function: Given an INTEGER up to a maximum of 21 digits, decompose the number into a formula like this: X^y + W^v + S^t = Number (X^Y means X to the power of Y and so forth) where the bases X, W, S are integers between [2-255] and the exponents y,v,t are also integers between [0-255]. Lets see if there is a math genius that can figure this out with an algorithm that will work for all numbers up to 21 digits | |
|
|
There is no answer at this time. |
|
Subject:
Re: Need an Algorithm for this Integer problem. Can you figure it out?
From: rracecarr-ga on 19 May 2006 11:01 PDT |
You can't get 1 or 2 for starters... |
Subject:
Re: Need an Algorithm for this Integer problem. Can you figure it out?
From: bipolarmoment-ga on 19 May 2006 11:27 PDT |
Why the constraint of 2-255 on the bases? |
Subject:
Re: Need an Algorithm for this Integer problem. Can you figure it out?
From: oblok-ga on 19 May 2006 11:50 PDT |
Yup - impossible. You want an algorithm to decompose 10^21 different values, but your formula (with constrants) cannot create 10^21 different values. (It can create values much larger than 10^21, but you need your formula to be able to represent ALL different integers up to 10^21.) |
Subject:
Re: Need an Algorithm for this Integer problem. Can you figure it out?
From: rracecarr-ga on 19 May 2006 18:33 PDT |
Good point oblok. Total number of ways to choose X,W,S,y,v,t is 254^3*256^3 = 2.75E14, more than a million times too small. |
Subject:
Re: Need an Algorithm for this Integer problem. Can you figure it out?
From: brix24-ga on 20 May 2006 04:35 PDT |
zeusdman, When you write "formulas _like_ this," do you mean to allow a variable number of terms on the left and do you mean to allow repetitions of an exponent, i.e., 3^0=1 3^0 + 2^0=2 but not 3^0 + 3^0 + .... = 1000? (At the moment, I don't know if this will allow a solution; I'm just asking if this interpretation is a possibility.) |
Subject:
Re: Need an Algorithm for this Integer problem. Can you figure it out?
From: frde-ga on 20 May 2006 04:46 PDT |
@zeusdman-ga I can see what you are getting at. A 6 byte unsigned integer looks like :- Debug.Print Format(255# ^ 6, "#########################") 274941996890625 eg: 15 digits which is a lot less than 21 digits By making the first two bytes into X^Y you can get some incredibly large numbers, but to get a complete range of numbers you need to be able to fill in the 'holes' With two bytes the maximum range that you can 100% describe is 65025 255^1 255 255^2 65025 255^3 16581375 255^4 4228250625 Notice how the jumps become unfillable My guess is that you have a legacy system with a 6 byte Float field (Pascal) and you want to expand its range. Unfortunately pure binary is the only way of storing a precise number, IEEE or BCD will give you a (wildly inaccurate) approximation. |
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 Home - Answers FAQ - Terms of Service - Privacy Policy |