Thread: Use Euclid's algorithm to Prove Goldbach's Guess?? Please Help!

  1. #1
    C/C++Newbie Antigloss's Avatar
    Join Date
    May 2005
    Posts
    216

    Use Euclid's algorithm to Prove Goldbach's Guess?? Please Help!

    My teacher asked me to write a C program to prove Goldbach's Guess using Euclid's algorithm: Any even number greater or equal to 6 can be the sum of two odd prime number. Please use Euclid's algorithm to write the program. For any input that is greater or equal to 6 and that is an even number, print two odd prime number whose sum is equal to the input.

    I only know that Euclid's algorithm is used to calculate the greatest common divisor. I have no idea on how to use it to prove the Goldbach's Guess. Could somebody give me some hints? Thanks.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Make a list of primes. Divide a number by one of them. See if the that number is a prime.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Do you actually have it called the "greatest common divisor" when it was taught to you? We always learned the "greatest common factor".

    *shrug*

    Anyway, from what I understand the modern Goldbach Conjecture has yet to be fully proven by anyone. So I don't know how your teacher expects his students to do it.
    Sent from my iPad®

  4. #4
    C/C++Newbie Antigloss's Avatar
    Join Date
    May 2005
    Posts
    216
    No, my teacher don't actually expect me to prove this Conjecture. He just want me to write a program which print out two odd prime numbers according to the input. And the program should use Euclid's algorithm.

    >> Do you actually have it called the "greatest common divisor" when it was taught to you? We always learned the "greatest common factor".

    << Well...I am not from English speaking country, my English is really not good enough to express everything in English. It's very common that I write out something which is not what I really want to say.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Guess the number program help needed
    By msbrownsugah in forum C Programming
    Replies: 7
    Last Post: 05-06-2009, 05:58 PM
  2. Hangman Game Troubles
    By emerica240 in forum C Programming
    Replies: 9
    Last Post: 11-26-2008, 01:39 AM
  3. Sine (Sin) Algorithm Help
    By StaticKyle in forum C Programming
    Replies: 52
    Last Post: 05-13-2008, 08:37 AM
  4. Issue w/ Guess My Number Program
    By mkylman in forum C++ Programming
    Replies: 5
    Last Post: 08-23-2007, 01:31 AM
  5. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM