Back to the topic, on this week's short lecture we were introduced with a few new concepts and the first one is whether a program will halt or not. Halting for a program basically means that if the program will stop doing its computing business and returns the control to the person who is giving the command. It is important to distinguish the difference between a very hard program which takes a long time to run, and a program were its not halting and goes on an infant loop.
It is also very important to know that it is impossible to construct a program that can show whether a program will halt or not because when we tries to write any function that has the magical power of showing the function will halt or not on an input (example like H(f,i) in the picture below) we can basically write down a function called navel_gaze, and by proving that navel_gaze is not commutable because its contradiction to itself so it implies that the function used in navel
_gaze is also not commutable, proving its impossible to generate a function that knows whether the function will halt or not.
![]() |
| course note chapter 5, pg 8 |
Countable sets include anything that is a subset of Natural numbers, Rational numbers is also countable due to it uses Natural numbers as its base (n/m , where n and m is natural numbers) so that we can always refer one Rational number to a Natural number without skipping, thus making it countable. Real numbers not countable because there is infinite amount of numbers you can find in it, and by giving out any of the numbers in between you can prove it not countable by a counter example.
The most important idea we learned in the lecture is where computer programs can only written to be work with sets that are countable lAl<=lNl , and anything that is not countable would be a mismatch in size.

No comments:
Post a Comment