Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But if you were to code out such a program it would have to still have an upper bound for the size of the numbers you are testing. My implementation would look like this:

  int i = 4;
  bool sumFound = true;
  while(sumFound)
  {
    sumFound = false;
    for(int p = 0; p < MAX_INT && !sumFound; p++)
    {
      if (isPrime(p))
      {
        for (int q = 0; q < MAX_INT && !sumFound; q++)
        {
          if (isPrime(q))
          {
            if (p + q == i)
            {
              i += 2;
              sumFound = true;
            }	
          }
        }
      }
    }
  }
You could use big integers, but it'd still be bound by whatever the max size is for that. This program would eventually terminate. Could you write an implementation where the limitations of the system don't get in the way of the theoretical mathematical limitation? I guess you could build some system which can accommodate arbitrarily large numbers, but even that would be limited by the computer specs.

I guess what I'm saying is, isn't the implementation of the program the test in itself?



The program must run on the Turing machine. The Turing machine has an infinite tape, so it is able to represent arbitraily large numbers on its tape. It is a different question that a real Turing machine cannot be built in the known physical universe which contains only a finite number of atoms.


Since you don't have a real Turing machine, why would you care? Your computer is not Turing machine.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: