Zvavzvmvat |fva(a)| vf rdhvinyrag gb zvavzvmvat |a-s(a)| jurer s(a) vf gur arnerfg zhygvcyr bs cv gb a; rdhvinyragyl, gb zvavzvmvat |a-z.cv| jurer a,z ner vagrtref naq 1<=a<=10^100; rdhvinyragyl, gb zvavzvmvat z|a/z-cv| jvgu gur fnzr pbafgenvag ba a. (Juvpu vf boivbhfyl zber be yrff rdhvinyrag gb fbzrguvat yvxr z<=10^100/cv+1.)
Gurer'f n fgnaqneq nytbevguz sbe guvf, juvpu lbh pna svaq qrfpevorq r.t. urer. V guvax gur erfhyg unf gur sbyybjvat qvtvgf:
bar fvk frira mreb svir gjb frira svir avar fvk guerr svir bar svir fvk svir bar svir fvk frira svir sbhe svir avar rvtug svir avar fvk bar bar mreb frira sbhe svir fvk fvk sbhe avar svir svir svir mreb frira guerr fvk gjb guerr bar guerr avar guerr rvtug bar rvtug rvtug rvtug svir avar mreb gjb frira bar mreb fvk gjb avar guerr frira rvtug sbhe svir gjb mreb avar svir gjb gjb avar svir mreb frira gjb sbhe mreb mreb rvtug gjb frira fvk bar frira svir fvk avar sbhe sbhe sbhe mreb fvk guerr
I wonder if there's a simple worst-case proof that shows how complicated you need to let the seeds get in order to find the actual optimum. For example, if we look for the best integer under 10^85 rather than under 10^100, the seed that leads to this algorithm outputting the optimum is different, or at least the overlap seems small. But I'm having a hard time proving anything about this algorithm, because although small seed numerators could add up to almost anything, in practice they won't.
If it's worth saying, but not worth its own post, then it goes here.
Notes for future OT posters:
1. Please add the 'open_thread' tag.
2. Check if there is an active Open Thread before posting a new one. (Immediately before; refresh the list-of-threads page before posting.)
3. Open Threads should start on Monday, and end on Sunday.
4. Unflag the two options "Notify me of new top level comments on this article" and "