Monday, 29 September 2014

CSC165-Week 3- The Folding Problem

2014/9/27 - Week 3

The main topic for today's lecture was how to look at a problem before starting to try and solve it.


  • write down information given 
  • relate this to another problem
  • look at question in parts
  • resolution to assumption instead of assumption to resolution 


The paper folding exercise helped further this concept. By writing down the the folds in the notation of "U for up and D for down",

1
D
2
D D U
3
D D U D D U U
4
D D U D D U U D D D U U D U U

After thinking about the process in which we were told to fold the paper, I was able to recognize a pattern.  Since we were always told to fold the paper down the middle, then there must be a correlation if not hint that pointed us towards the middle of the up-and-down list.

Here is what I found:

Folds
Pattern
1
D
2
D D U
3
D D U D D U U
4
D D U D D U U D D D U U D U U

After analyzing the data, I noticed that the second  half of the folding process is a carbon copy of the line above with the addition of an extra D in the middle, separating the inverted first half.

In total, my group was able to find 3 different patterns in this exercise; however, only 2 of them were we able to write a python function to represent our findings.  Referencing to http://brendannealslog165.blogspot.ca/. From this pattern, we were able to generate a python code that embodied the entirety of the folding pattern that we noticed in class.

From this we were able to realize that the only way for us to write the code was to follow the problem solving steps. Had we not realized that the wording in the question, we would not have discovered the hint about folding the paper down the middle and finding the middle of the pattern.

Wednesday, 17 September 2014

CSC165-Week 2 - Logic = Illogical?

2014/09/17- Week 2

CSC165 started on September 8, 2014. My first math course in University took place at Sid Smith Hall.

I was troubled by the True/False statements when the professor introduced the concept of "P(false) => Q(anything)" yielding a true statement. I always thought that if the antecedent was false, the statement would yield false. However, my question was quickly answered by my MAT137 lecture in which the professor gave an interesting example:

"1=0                 I am in love"

In the statement above, even if the antecedent is false, the statement will still yield true.  The truth table furthered my understanding of "If....then..." statements by simply organizing the 4 cases into  a table.

P Q
T T
T F
F T
F F

In addition, I was confused by the python codes that were listed on the lecture notes. The problem stated that we had to comment on the functions given: q0, q1, q2, q3. However, I did not understand the meaning that was enclosed by the triple quotations. Later on in CSC108, the professor promptly went over the docstrings, which solved my dilemma about the "... ->bool" statement. This statement is used to evaluate True/False statements. 

Tuesday, 16 September 2014

CSC165 - Week 1- The Introduction to Reasoning

2014/09/15

My First Blog Post!!!

This marks the beginning of my CSC165H1 F course with Professor Heap.  In all honesty, I was pretty nervous about this course since it was something that I had never done before. Courses like CSC108 and MAT137 did not bother me due to the fact that I was pretty confident in my calculus and programming in C. For this course, I did not know what to expect. Hopefully, everything turns out fine and I would be able to understand the material of this course.

Good luck to everyone and this marks the beginning of my slog posts for CSC165H1 F 2014.