 |
|
 |
neutrall Level: Master

 Registered: 28-03-2004 Posts: 122
|
find a Suite.
I'm having problem solving a problem. I must estimaetd the result in a chaing of number, if there's a missing number. EX :
2, 4, 5, 9, 10, X, -25, 40, -60
I must estimate the value of X. the suite of number will always be different.
I've did a small formula to estimate the value, but I far from being sastified with it :
Let's say the suite is the following :
2, 4, 5, 9, A, X, Y, 40, -60
And you have the value of A and Y already, I've did the following :
X = ((Y-A)/2) + A
This only give back exact middle. Which is rarelly the case.
I would like to build a procedure that could see if there's a logic in the suite of number, and then replace.
EX :
given this array
2, 4, 8, 16, 32, 64, X, 256, 512
Given my formula (X = ((Y-A)/2) + A), the result would be : 160. but we all know just by looking at the suite, the actual result should be 128.
Any suggestion?
____________________________
A Stick give a wise man something to think about... and a fool, something to put in is mouth.
|
|
15-10-2005 at 06:49 PM |
|
|
stickleprojects Level: Moderator

 Registered: 09-09-2002 Posts: 891
|
Re: find a Suite.
Hi,
This is not a resolution...
Anyway,
The problem you are describing is very complicated as an open topic.
e.g.
What is the sequence of the following:
1, 3, 5, 7, 11, 13, 17, 19, 22, 29, 37, ?
Ok, we both know that they are prime numbers, but how does a computer know?
What about the following formula:
A = pi.r*r
As you can see the maths equations vary from Prime numbers, to silly combinations determined by a constant not yet defined.
Any restrictions on the formula would be useful.
Kieron
____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)
|
|
24-10-2005 at 11:32 PM |
|
|
neutrall Level: Master

 Registered: 28-03-2004 Posts: 122
|
Re: find a Suite.
To make thing harder, there's no restriction. Those number can eb anything.
There's onw solution I though of, but I don't know how to apply it.
In a graph, try to make a curve that will follow the graph tendency, and then find out what would the missing value be.
Like finding the X in the jpg I've sent. I've use this serie of number ; 15, 60, -15, X, 20, 54, 80, -120. In the graph, the sub could assume what hte value of X is.
Anyone good enough to figure it out?
[Edited by neutrall on 26-10-2005 at 09:31 PM GMT]
____________________________
A Stick give a wise man something to think about... and a fool, something to put in is mouth.
____________________________ Attached:
|
|
27-10-2005 at 02:31 AM |
|
|
|
|
 |
 |