Today, we are going to discuss the topics of halting and
computability. This topic in particular has my mind wrapped up in spirals of
confusion but I will still try to decode its meaning. From what I have read in
the slides, we have to be able to look at a code, decipher an algorithm to
decide if it halts without actually running. There are two possible things that
can occur with the code, it can either halt or do not halt. A simple solution
most people would rely on is to run the code to check if it halts or not. Unfortunately
for us, it is not as simple as that. This particular topic has so many
mysteries that are need to be solved that even expert programmers have been baffled
in trying to prove if a code will halt at every input or loop infinitely. It shows
that it is almost impossible for all problems to be solved with algorithmic developments
(not computable).Wow! I think that I am having a speechless moment right now.
How wonderful! The almighty computer cannot solve all our problems, I concur
that we are doomed!
This is the collatz code that was presented to us in the
lecture slides. The problem here is that it quite difficult to prove that this
code would not loop forever. How this code works is that it stops at every
natural number. The question is how far would it go? If only I knew the answer,
then world would be at peace.
def collatz(n) :
while n > 1 :
if n % 2
== 0:
n =
n / 2
else:
n =
3*n + 1
return "Reached 1…”
Secondly, I do not get how infinity does not equal infinity?
I always knew math was strange.
![]() |
| If we could only halt like Keanu Reeves, then problem solved ! |

No comments:
Post a Comment