Calling all Maths geniuses - help is requested !, page 1
Pages: <<  1    2  >>
ATS Members have flagged this thread 0 times
Topic started on 28-10-2009 @ 04:18 AM by tauristercus
Hi all,

I'm working on a personal maths project and have reached a point where a little outside help in the maths department would be extremely welcome ... and I'm more than certain that we have ATS members who are well versed in mathematics and may be able to provide such assistance and insight
If nothing else, perhaps my question will serve to brush off some of those cobwebs that tend to accumulate over the years on all of our brain cells !

Ok, what I'm after is some form of mathematical "short cut" to arrive at a required solution given a bit of input to start with. Basically, I use the staring input and perform some simple calculations and eventually end up with the answer I'm looking for. The problem is that there may be times when it becomes necessary to have to repeat those simple calculations over and over, maybe for 100's, 1000's or even millions of times before reaching the solution ... and so I need that "short cut" to effectively bypass as many of those repeated intermediary calculations and thereby save a heck of a lot of processing time.


Basically, I start of with 2 input values say, 129 and 3154.
I then create a quadratic equation using these values which will look like this:



Now I find the roots of this quadratic which in this example are 32.78 and 96.22

If the roots are BOTH integer values only, then these roots are the solution I was looking for ... and end of story.

But if either or both are NOT integer values, e.g. (23.76 and 57.9) ... or (237.2 and 673.58) ... or (76 and 142.62) then we modify the two starting numbers by adding 24 to the smaller of the two, and subtracting 1 from the larger of the two as shown here:

129 + 24 = 153 and
3154 - 1 = 3153


Now we repeat the process using these two new numbers of 153 and 3153 by creating a quadratic equation


and trying to find two INTEGER roots.

Again, if we find them ... then success and we stop ... otherwise repeat by adding 24 and subtracting 1 from the two numbers just used and creating yet again, a new pair of numbers to try.
This process of adding 24 and subtracting 1 continues as many times as necessary (a few times, 100's, 1000's, etc of times) until we find those two integer roots.


At this point I have to mention that the two original starting numbers will ALWAYS eventually result in two integer roots, because these two starting numbers have been specifically selected based on the advance knowledge that integer roots DO exist when these numbers (or their 'modified' numbers) are placed into quadratic form.


Here is an example of the entire process of finding the two integer roots starting with two original numbers of 9 and 3159. It takes only 10 iterations to arrive at the quadratic that produces integer roots.
Note that we're starting at the bottom of the table and working our way up to the top.
I should also mention at this point that if the roots happen to be complex, then they're ignored and the iterations continue ... we're ONLY looking for those TWO INTEGER roots !




Here is a graphical view of the 2 roots:




So as you can see in this example, it was trivial to find the two integer roots after just 10 iterations. But not all cases are this easy and could involve 1000's and millions of iterations before those two integer roots eventually pop up ... and this leads back to my original request for assistance ... to find some "short cut" that will help to eliminate as many of those repeated intermediary iterations as possible and "jump" from the original starting two numbers to the 'modified" two numbers that will produce the integer roots.

So in summary, and using the above example, I basically need a method or a short cut to go from starting numbers 9 and 3159, to final numbers 225 and 3150 in the most efficient and effective way possible.


If anyone's interested in trying this out for themselves with other pairs of starting numbers, use the following pairs which will definitely eventually produce integer roots.

7 and 602
10 and 265
23 and 1866
10 and 13215


Ok, that's all there is to it ... so anyone have any brilliant suggestions or ideas ? I'd be incredibly grateful for such help !

[edit on 28/10/09 by tauristercus]


reply posted on 28-10-2009 @ 06:03 AM by chiron613
I'm not sure I fully understand what you want. Do you mean you want some equation or formula that would allow you to enter your starting values (and perhaps -1 and 24 as well), that would immediately give you the ending values that are integers? If you do, then I'm not able to help you. I'm not sure there's a closed form for this process, and I'm not sure I'm up to finding it, even if there is one.

Are you looking for a programming algorithm to do that? Then you can likely put one together without too much difficulty. The "hard" part would be finding a function that solves the quadratic equation, but there are libraries that will do that for you. Since I don't know what language (if any) you would be using, I can't give a specific example, but I can give you a sort of "pseudo-code" idea of how to go about it.

1 A = 129
2. B = 3153
3. Root1, Root2 = solve(x^2-AX+B) /* This would solve the quadratic and give the roots)
4. If ((Root1=int(Root1)) AND (Root2=int(Root2))) then STOP (You've got your solution).
5. If A>B then A=A-1; B=B+24; Goto 3
6. A=A+24; B=B-1 Goto 3

This should do it, more or less (I haven't actually tested it, so it might be buggy). Even if it does take a few million iterations, it shouldn't require all that much time on a normal computer.

I'm curious to know what this is about, and why you are so certain that this process will always yield an integer value eventually. I'm also wondering what happens when your values wind up changing places - when your "smaller" number gets 24 added to it so many times that it becomes larger than the "larger" number. Then they swap places, back and forth...


reply posted on 28-10-2009 @ 06:20 AM by ::.mika.::
reply to post by tauristercus



bypassing the iteration ???

i'd be curious to see the algorithm that would do that without iteration... (might take longer to find it than to run 100000000 times the algorithm using iteration...)

~~~~~~~~~~

xxx=3*x*37


reply posted on 28-10-2009 @ 06:25 AM by tauristercus
Originally posted by chiron613
I'm not sure I fully understand what you want. Do you mean you want some equation or formula that would allow you to enter your starting values (and perhaps -1 and 24 as well), that would immediately give you the ending values that are integers? If you do, then I'm not able to help you. I'm not sure there's a closed form for this process, and I'm not sure I'm up to finding it, even if there is one.


Yes, thats exactly what I'm hoping to find and why I'm asking for help here on ATS.
A computer program that has to process potentially millions of iterations starting with the initial 2 values is way to slow for my purposes and therefore I need some kind of function that will give me a direct short cut to the final roots ... or even if it only reduces the number of iterations by some factor, that would also be a huge help.


I'm curious to know what this is about, and why you are so certain that this process will always yield an integer value eventually. I'm also wondering what happens when your values wind up changing places - when your "smaller" number gets 24 added to it so many times that it becomes larger than the "larger" number. Then they swap places, back and forth...

I didn't think it would take too many posts before someone asked why I'm doing this

I've had a very long interest (obsession ?) with prime numbers, especially with recovering the initial 2 prime numbers that were multiplied together to give a product. e.g 7 x 11 = 77.
In other words, if you were only given the product 77 and were asked to determine the original 2 primes used to create this value, you'd basically have little choice except to use "brute force" techniques and hammer away at this 77 value with every prime number that was smaller than the square root of this value ... eventually finding that 7 is one prime factor and therefore 11 is the other prime factor.

It's taken me a number of years but I've successfully derived an alternative method of retrieving the prime factors of ANY product that is supplied. It's already been succesfully tested on small digit length products and succesfully extracts both primes in each case. The only remaining issue I have is the subject of this thread, and if it can be resolved, will make this an incredibly useful tool for extracting primes from ANY size product and will do this extremely quickly.


reply posted on 28-10-2009 @ 06:45 AM by EnlightenUp
reply to post by tauristercus



I made a small edit to my previous post with another possible check which would set a starting point.


reply posted on 28-10-2009 @ 06:54 AM by tauristercus
Originally posted by EnlightenUp
reply to
post by tauristercus



I made a small edit to my previous post with another possible check which would set a starting point.


Again, thankyou for that and I'll give it some time tomorrow morning and see if there's any promising leads arising from that.


reply posted on 28-10-2009 @ 07:04 AM by xmaddness
reply to post by tauristercus



I see where my mistake was now.

But if either or both are NOT integer values, e.g. (23.76 and 57.9) ... or (237.2 and 673.58) ... or (76 and 142.62) then we modify the two starting numbers by adding 24 to the smaller of the two, and subtracting 1 from the larger of the two as shown here:



I saw the 23.76 number, and the fact that you added 24 to the smaller of the two, and assumed you were rounding the 23.76 up to the next number, 24, and adding that as a seed value for the next iteration.

I reread it and I see what you meant. I will put some more thought into this and see what I can come up with as far as a proof.

This may be a good candidate for proof by contradiction or contrapositive.


reply posted on 28-10-2009 @ 07:09 AM by tauristercus
reply to post by chiron613




I'm curious to know what this is about, and why you are so certain that this process will always yield an integer value eventually. I'm also wondering what happens when your values wind up changing places - when your "smaller" number gets 24 added to it so many times that it becomes larger than the "larger" number. Then they swap places, back and forth...


Sorry, I forgot to answer this part of your previous post.


I don't have a rigorous proof yet to conclusively state that "this process will always yield an integer value eventually" but I have run thousands of small scale tests using relatively small prime numbers to create the product ... and in each and every case, integer roots have ALWAYS been generated eventually.
Once the integer roots have been obtained, it's a ludicrously simple arithmetic operation to map both roots onto the original prime numbers that were used.


As for "the values eventually changing places", this in practice has never happened as the integer roots have in each case been reached long before the 1st value has any chance of growing larger than the 2nd value.


reply posted on 28-10-2009 @ 07:12 AM by tauristercus
Originally posted by xmaddness
reply to
post by tauristercus



I see where my mistake was now.

But if either or both are NOT integer values, e.g. (23.76 and 57.9) ... or (237.2 and 673.58) ... or (76 and 142.62) then we modify the two starting numbers by adding 24 to the smaller of the two, and subtracting 1 from the larger of the two as shown here:



I saw the 23.76 number, and the fact that you added 24 to the smaller of the two, and assumed you were rounding the 23.76 up to the next number, 24, and adding that as a seed value for the next iteration.

I reread it and I see what you meant. I will put some more thought into this and see what I can come up with as far as a proof.

This may be a good candidate for proof by contradiction or contrapositive.


Wonderful ... go for it

And sorry if in my eagerness I wasn't as clear as I would have liked to be regarding the addition and subtraction of those values during each iteration ... but you seem to have got the idea now
Pages: <<  1    2  >>    ^^TOP^^




ATS Live North America is broadcasting in 4 minutes.
Today's Show: ATS Live: 96: Super powers, Falklands Woes, Stan Deyo Interview, Syria, Telepathy, The Devils Chord.