3

So I've spent some time learning a little about the halting problem, and it's quite fascinating. I tried to simplify it down to these few functions. What do you guys think? Obviously, psuedo-code, so don't get too caught up on the syntax 😆

The Halting Problem:

public String doesItHalt(Callable function){
...
if (...){
return "Yes"
} else {
return "No"
}
}

public int someFunctionFooThatHalts(){
...
}

public int someFunctionFooThatDoesNotHalt(){
...
}

public String inverseAnswer(value){
if (value == "Yes"){
return "No"
}
if (value == "No"){
return "Yes"
}
}

public String inverseHalts(Callable function){
return inverseAnswer(doesItHalt(function))
}

————————————————————————————

$ doesItHalt(someFunctionFooThatHalts)
Yes

$ doesItHalt(someFunctionFooThatDoesNotHalt)
No

$ inverseHalts(someFunctionFooThatHalts)
No

$ inverseHalts(someFunctionFooThatDoesNotHalt)
Yes

$ doesItHalt(inverseHalts(doesItHalt))
???

Comments
  • 0
    Rn I'd just build a ml model using 37% of my data as training set and stop at the first match, the first chapter of "Algorithms to live by: the computer science of human decisions" talks exactly about it!
  • 0
    Whether turing-complete machines halt isn't much of an interesting topic to me, however there is a whole army of machines each more capable than the last which aren't turing complete and therefore lend themselves to analysis.
Add Comment