Monday, 1 December 2014

cantor on diagonal number

Hi everyone!
I want to explain cantor's proof on showing the set of real numbers is bigger than the natural numbers.
There were a lot of questions on the part when cantor is working his way down the diagonal and changing the digits. if there are other parts you want explanation on please do tell me and I'll try to to my best in answering them.
Ok back to the proof! If our digit is no greater than 5 we increase it by one and else decrease it by one.
in the first line(see the picture to get a better idea), we will change our digit in the way I just mentioned. Again second line second digit, third line third digit and .... after all the lines are done, make a new number with those changed numbers. we know it's not the same as our first number since it has different number in the first position and we know it is not the same as the n'th number since it has different digit in the n'th position! there we have it! we made a new number that was not in the list.

Tuesday, 25 November 2014

On halting and computabaility!

    I owe you dear followers of this blog(I know no one's reading these but anyways:D) an apology for being late on the slogs in the past two weeks! I know you all have been busy with your last assignments of this term and the midterms.
 

    So let us get to what we are here for. the last thing we worked on in the course was the halting problem. there were a lot of students who got confused on how the proof is and the whole idea of the problem! I was one of those students and I read through the course notes, websites, other slogs and ... to try and get a better understanding of this. As helpful as they were none of them explained it to me better than this short video! I encourage you to take a few minutes out of your busy schedule and take a look at it! I promise it will worth it.https://www.youtube.com/watch?v=92WHN-pAFCs

Sunday, 9 November 2014

Problem solving session

    I like to tackle the handshake at a dinner party problem for this week!
    what we know: 5 couples in the room! couples don't shake hand with each other and two people handshake at most one time.
reading up to here reminds me of a simple graph that with 10 nodes of 5 colors if we say that couples have the same color. There can't be an edge between two same colors and there is at most one edge between two different colors.
    I don't know about you but this made a really clear picture of the problem in my head! Turning all our data into something that we can imagine or even simply draw on a paper.

    In the following the problem says after a while we no that no two individuals have the same number of handshakes in the room.

   we know that one can at most shake hands with 8 people! (10 - partner - him/her self).
   if I for eg shake someones hand, this counts for both of us.
   at this point there are 9 people with different number of handshakes so we should have 0 to 8 handshakes between them! Since there is someone with 0 handshakes then the person with 8 handshakes has definitely shaken hands with Hilary!
........
next step is to analyze the data in a helpful way

Run time of algorithms

The past few weeks lectures have been about run time of functions and different algorithms.
You can check out this website for different famous algorithms run times!



For anyone who is interested In knowing more about algorithms, data structure, graphs and ... I suggest this book which I think If you are going to major in computer science will have it in one of the courses. The book is CLRS and I will post the link for AMAZON here:http://www.amazon.ca/Introduction-Algorithms-Thomas-H-Cormen/dp/0262033844

Sunday, 26 October 2014

Proof! steps leading you to solve your problem!

Here are some great puzzles that i find really helpful towards practicing on the process of problem solving! in the upcoming weeks, I will start on these questions and go through the steps of the solving techniques we learned!great puzzles

Tuesday, 30 September 2014

Kill Logic before it kills you




Hi everybody!
So there were a lot of questions regarding to logic problems and how to negate them, rewrite them symbolically or in English and etc.
I found this file that helped me practice a little more on those matters and I love to share it with you.
I'll put the link down below
https://www.google.ca/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CB0QFjAA&url=http%3A%2F%2Ffitelson.org%2F109%2Fhardegree_ch4.pdf&ei=a2crVKu0MoSnyASzsoGACw&usg=AFQjCNGK4kyGzyrGA3ujsQ8qDP7QkO6t7A&sig2=oPKlLj9bhnSCTkrGjaCOEg

Sunday, 14 September 2014

Interesting math problems

Check this website out if you like challenging math problems!
                                          http://gottfriedville.net/mathprob/index.ht

Different approaches to solve a problem

september 12                                                                              Lec 3

one of the best lectures so far!
The main topic today's lecture was how to look at a problem before starting to try and solve it, which I honestly have to admit I thought to myself '' well, everybody knows what these steps are'' but is wasn't that long after it that I found out I was wrong!

Lets see what these steps are that we often think we know until we begin solving a problem:
  • Always write down what informations the question has given you and what it need you to prove and figure out
  • Try to relate this to another problem you might have solved or seen! Try to relate them for as it can give you goo ideas
  • Sometimes it's a big help to just take the problem apart! Look at the smaller parts and try to solve the puzzle one piece at a time
  • Instead of going from assumption to resolution, look at the problem the other way around! It might seem weird but it can be a good start on solving the problem
Then we got this interesting question which I honestly enjoyed solving(the streetcar conversation**)
    
I'll go threw what I was thinking real quick
  1. The product of the kids ages is 36 so k1*k2*k3=36
  2. The conversation is telling me the sum of their age can't "directly" help me figure the ages out
  3. Some how knowing that there exists an eldest kid who plays the piano is supposed to help me guess
well it looks like the sum of their age did not help! why is that? lets take a look
    lets right down all the factors of 36 and call the set A:
                                                                                         {1,2,3,4,6,9,12,18,36}
Now lets see what the ages can be:
(1,1,36)   (1,2,18)   (1,3,12)   (1,4,9)   (2,3,6)   (2,2,9)!   (3,3,4)   (6,6,1)!
As you see only sum of the two sets with (!) are the same that's knowing that didn't help us at first but now that we have there is an eldest son, (1,6,6) is out of the picture so the ages are 2,2 and 9!



** please comment if you do not know what the question is so I can write it for you.

Functions debate


This was our second class so far.
We were given papers by professor Heap that contained for function written in phyton language, then we were asked to try and figure out what these functions do to our sets of numbers.
I would love to go threw one of them here so
def q0(S1, S2):
 ''' (set, set) -> bool
 Return whether ...
'''
return not all({x in S2 for x in S1})

   This is our function in python! we are giving our function two sets(S1 and S2).
Our outcome is of type bool and that means It's either true(1) or false(0).
lets see what the function does! it says : return not all({x in S2 for x in S1})
so the fuction checks S1 for x first, if they are not in S2(because of the not all) then we get true and otherwise we get false.

Thursday, 11 September 2014

the journey begins


september 8th


The first day of CSC165 was also the first day of starting at university for most of us.
I think it went pretty much as I  was hoping it would.
Our instructure; professor Danny Heap, gave us an idea of what what the course will look like through out the term, assignment and the way we should submit them, tutorials and how to achieve success in this course.
  
one thing that I have been thinking about since my first class at UofT is how much everyone implies on going to our instructure's office hours!

We talked about ambiguity and how amazing is that a single sentence can have so many different meaning. here are some more that  enjoyed:
Fat people eat accumulates
The girl told the story cried
We painted the wall with cracks