Initially evaluate the primes up to N
Then evaluate the Goldbach Conjecture using the primes previously calculated
Goldbach's conjecture is one of the oldest and best-known unsolved problems in
number theory and in all of mathematics. It states: Every even integer greater
than 2 can be expressed as the sum of two primes.
Let N be the integer up to which we test
We require the primes up to maxP = sqroot(N)+1
Use a sieve to find primes up to maxP
Partition the range up to N to find all the primes in that range, in parallel
Create a single list of primes which is broadcast in parallel to Goldbach workers
Each worker is allocated an (overlapping) range of primes
Each worker then finds all the sequential even numbers it can calculate from its range of primes
Collect the results from each worker and ensure that ranges overlap, except for the last
The maximum Goldbach number will be less than 2*N
Author, Licence and Copyright statement author Jon Kerridge School of Computing Edinburgh Napier University Merchiston Campus, Colinton Road Edinburgh EH10 5DT Author contact: j.kerridge (at) napier.ac.uk Copyright Jon Kerridge Edinburgh Napier University * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.