 | iainking@gmail.com wrote: > David C. Ullrich wrote: > > On Thu, 20 Jan 2005 12:27:18 +0000 (UTC), "Justin" > > wrote: > > > > >Hey, JSH, I've a powerful factoring method for you! Here is the > > >pseudocode: > > > > > >input a > > >let b=random(0...a) > > >let c=random(0...a) > > >If a=b*c then print "The number ",a," factors as ",b," * ",c," !!!" > > >end > > > > > >It factors in...well...instantaneously in that it does not depend on > the > > >size of the input (other than that multiplication)! > > > > > >And it sometimes works! I tried it with a=0 and it worked! > > > > Can you or anyone else explain why it doesn't _always_ seem to > > work? (Just throwing that out there as a research question in > > case there are any real mathematicians reading.) > > There are a couple of lines missing: > > input a > start: > let b=random(0...a) > let c=random(0...a) > If a=b*c then > print "The number ",a," factors as ",b," * ",c," !!!" > end > else > goto start > end > > Now it always works. (well.....) > Note I'm not a real mathematician, so to those same real > mathematicians, if they are reading - sometimes this gives the answer > immediately, but sometimes it seems to take an awfully long time.
The problem is the program only finds "proper" factors. Perhaps you need to use a higher-dimensional tautological space.
Also, you seem to have completely ignored the problem with the overrated ring of algebraic integers.
|
|