Home / Expert Answers / Computer Science / q2-goldbach-39-s-conjecture-is-one-of-the-oldest-and-best-known-unsolved-problems-in-the-number-theo-pa602

(Solved): Q2) Goldbach's conjecture is one of the oldest and best-known unsolved problems in the number theo ...



Q2) Goldbachs conjecture is one of the oldest and best-known unsolved problems in the number theory of mathematics. Every ev

Q2) Goldbach's conjecture is one of the oldest and best-known unsolved problems in the number theory of mathematics. Every even integer greater than 2 can be expressed as the sum of two primes. 1. write a function Gold(x) that takes an positive even number \( \mathrm{x}>2 \) and it will return the number of distinct pairs of prime numbers exist whose addition is \( \mathrm{x} \). For example, Gold(8) should return 1 (since the only pair of prime numbers that gives 8 is \( (3,5) \) ), while Gold(14) should return 2 (there are two pairs, \( (7,7) \) and \( (3,11) \) ). 2. Write a program that will do the following: a- Create an array initialized to zero to store Gold(x) for all even numbers from 4-10,000. b. Loop over all the even numbers in the range, call Gold with the even number and save the result of Gold in the corresponding entry of the array. Use the prime numbers array produced by \( Q 1 \). c. Check how many entries in the array for which the conjecture is violated. The points \( \mathrm{b} \) and \( \mathrm{c} \) should be performed as two loops. Parallelize the code using OpenMP. Try executing the program with 1, 2, 3, and 4 threads. Experiment with different scheduling strategies of the loop iterations (e.g., static, dynamic, guided, with different chunk sizes(at least 5)) and report your comparative results. Calculate speedup and efficiency. (20 marks)


We have an Answer from Expert

View Expert Answer

Expert Answer


Dear student please check the below solution step by step for better understanding and the code is working at my end. #include int isPrime(i
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe