You are given the functions: h1(f,*args) and h2(f,*args)
Both are methods which are already defined for you (here the asterisk indicates a variable number of arguments)
f is a function, *args is a list of parameters to be passed to that function
h1 returns a boolean value: True if the function f ever halts when called on *args and False if it doesn't (assuming the machine running it has infinite time and memory and that the interpreter/compiler for the language you're writing in knows how to handle infinite time and memory).
If f(*args) would ever make a call to h1 or h2, h1 throws an exception
h2 behaves exactly like h1 except that if f makes calls to h1, then h2 will not throw an exception
In as few characters as possible, write a program which takes no input and should output:
The Collatz Conjecture is {True/False}
Goldbach's Conjecture is {True/False}
The Twin Primes Conjecture is {True/False}
based on the validity of each of those conjectures.
Here are wikipedia links explaining each of the conjectures:
http://en.wikipedia.org/wiki/Collatz_conjecture
http://en.wikipedia.org/wiki/Goldbach%27s_conjecture
http://en.wikipedia.org/wiki/Twin_prime
You may assume any big integer library in whatever language you choose to use will successfully represent arbitrary large integers. In other words, we'll assume any language/library which is capable of expressing 3**(3**10)
is also capable of expressing 3**(3**(3**10))
on a sufficiently beefy machine.
Obviously since it's impossible to run your program, please provide an explanation of how it works along with the code