On Thu, Aug 23, 2018 at 08:47:12AM -0700, Brent Meeker wrote:
> 
> 
> On 8/22/2018 7:01 PM, Jason Resch wrote:
> > There are also programs for which no one knows if they are computable or
> > not.  If you can prove whether or not this function ever completes, you
> > will be world famous, and may even earn a million dollars (though I
> > think the prize has been retracted, it might be oferred again):
> > 
> > Step 1: Set X = 4
> > Step 2: Set R = 0
> > Step 3: For each Y from 1 to X, if both Y and (X – Y) are prime, set R = 1
> > Step 4: If R = 1, Set X = X + 2 and go to Step 2
> > Step 5: If R = 0, print X and halt
> > 
> > All you have to prove is the computer either never gets to step 5 or
> > that it does get to step 5.  Mathematicians have been working on a
> > related problem for 300 years, no one has solved it yet.
> 
> X=6 so go to Step 2 and Set R=0
> When Y=2 and (X-Y)=4 they are not both prime. Leave R=0.
> Go to step 5 print 6 and halt.

I read step 3 as a loop, ie check all Y from 1 to X (actually 1 to X/2
will suffice) before moving to step 4. In your example, the loop will
check Y=3, and (X-Y)=3, so R=1, and so step 4 mean X=X+2 and step 2 is
executed again.

IIUC, if the twin primes conjecture were true, then the above program
will never halt, but I could be wrong on that.

Cheers
-- 

----------------------------------------------------------------------------
Dr Russell Standish                    Phone 0425 253119 (mobile)
Principal, High Performance Coders
Visiting Senior Research Fellow        [email protected]
Economics, Kingston University         http://www.hpcoders.com.au
----------------------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"Everything List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/everything-list.
For more options, visit https://groups.google.com/d/optout.

Reply via email to