News for hackers. Stuff that matters.
Re:Turing machines that should run forever by qb45 on Wednesday May 11, 2016 @03:27PM (#11678455)
They just look for counterexamples. Say, for Goldbach:

  is_prime(n) {
    for (i = 2; i < n; i++)
      if (n % i == 0)
        return false;  // sorry, this isn't prime
    return true;  // no divisors found, prime
  }

  main() {
    for (i = 4; ;i += 2) {  // consider all even numbers i > 2
      for (j = 2; j <= i-2; j++) {  // consider i as the sum j + (i-j)
        if (is_prime(j) && is_prime(i-j))
          break;  // both are prime, so i is a sum of two primes
      }
      if (j > i-2) // oops, we checked all js and nothing was found
        return i;  // i is an even number but not a sum of two primes
    }
  }
You can compile such program yourself and run it to see if it stops ;)

Just remember to use some bignum library instead of plain ints.

Re:Turing machines that should run forever by Mithaldu on Wednesday May 11, 2016 @03:34PM (#11678514)
That is maybe not the most accurate example, but it is amazingly simple and gets the idea across. Thank you. :)