|
|
|
|
|
by shadowlight
1802 days ago
|
|
The algorithm that executes an element from the set of all algorithms one at a time until an algorithm succeeds to select an element from a set will work on any set and itself? a = the algorithm
A = set of all selection algorithms
b = any set
def a(x):
while True:
f = a(A) # you have to select an algorithm from the set of selection algorithms
result = f(x)
if result is None:
A = A - f # set of all selection algorithms without f
continue
else:
return result
a(b) #will always return a result or not terminate for any choice of b?
Obviously there's problems with this because I'm not a mathematician and I'm just making stuff up off the top of my head. But would any one who's an expert care to explain what's the issue with the above?I'm looking at it and such an algorithm is defined in terms of itself (like a factorial, which is legal) and may never terminate (which also legal because an algorithm selecting the smallest number from all sets that only contain positive numbers will never terminate either). Wait but then if you look at the code it provably will never terminate because A does not shrink as it recurses. |
|
By _assuming_ that program terminates, you are yourself taking the axiom of choice.
If it _does_ terminate, then it's not an axiom anymore it's a proof.