Just to add onto week 11, I finally understand how reduction works! So if you wish to see if a program is computable or if it halts, we can insert that function inside the halt function. Now inside the halt function there will be another function that runs the arguments inside the halt parameter. Now, if the program that we're trying to halt has the same result as halt, it reduces to halt and is not computable.
Now for week 12, the good thing is that countability and induction is not on the exam, but we should learn it anyways because why not. Anyways for countability, I found it interesting to have such a specific definition that allowed the set of natural numbers to be equal in size of the set of even natural numbers. This is simply because for each natural number, there is an equivalent even natural number, and so the pairing goes to infinity, thus being the same size. I found this confusing as I always thought that some infinities are greater than others. For example, there are more real numbers between 0 and 1 than there are in the infinite set of integers according to random credible sources I googled online. Anyhow, it all made sense once Professor Larry defined the definition of mapping.
Now for induction, I find that it reminds me of recursion. Where if I prove one case, the rest are also proven. So there is always one base case, and with the inductive step, all the cases after the base case are proven as well. A good metaphor is the domino effect, where if one domino is proven to be falling, so will all the ones after it.
Anyhow, I think this is the end of CSC165 and my SLOG. And despite not having that many posts, I've always tried to catch up and do multiple posts together in one. Now its off to the exam and wish me good luck!
Thanks for the explaining reduction. I didn't quite get it yet, but I think I get some idea of it! Great work! And GOOD LUCK :)
ReplyDeleteHow about this, I'll explain it this way,
ReplyDeleteLook at this halt program that I used for Assignment 3
def halt(a,b):
def meaning of life(c,d):
”””
return True if c(d) returns 42, False otherwise.
”””
def hitchhiker guide to the galaxy(e):
a(b)//argument e is not needed
return 42
return meaning of life(hitchhiker guide to the galaxy,b)
So if you look at the program, If a(b) halts, then hitchhiker guide to the galaxy(e) will return 42, so then meaning of life(hitchhiker guide to the galaxy,b) and halt(a,b) returns True
And in the other case, If a(b) does not halt, then hitchhiker guide to the galaxy(e) will not return 42, so then meaning of life(hitchhiker guide to the galaxy,b) and halt(c,d)
returns False
Therefore meaning of life is not computable as a non-computable function
halt(a,b) reduces to meaning of life(c,d).
Great work Simon, your analogy of induction vs recursion is really accurate, I find it this way too, like, that's how I learned recursion myself.
ReplyDeleteGood way to explain reduction ! Your way of reduction explaining makes me understand something actually.
ReplyDelete