Sunday, March 31, 2013

WEEK 11 (MAR 25 - MAR 29) - A3 and Halt

Assignment 3 is due on next Wednesday; we have finished the first four questions without any trouble. For the last quetion, I do not quite understand the question. My partner and I decide to go to tomorrow's office hour and ask about it.
We started a new topic this week, which was about proving non-computable function. To be honest, I had a lot of trouble understanding it, especially for the part that navel_gaze passed in itself as a parameter. Even though this chapter was not long, I believed that it was the most difficult part in this course. However, after reviewing Monday's notes, I was kind of getting it.
The exams are getting closer and this may be my last SLOG entry. This course really helps me a lot on writing assignments for CSC148. And I believe that it will be more useful to my future CSC courses.

Sunday, March 24, 2013

Week 10 (MAR 18 - MAR 22) - Big O Proofs

We did more big O proofs this week. I learned the difference between big O, big omega and big theta, which confused me a lot when the professor first mentioned them. We also learned how to disprove a big O statement. There was one question we did in class that used L'Hopital Rule. I thought it was a good review for MAT137. I realized that chapter 3 was a great prepare for this chapter; writing big O proofs were not that hard for me after wrting various types of proofs.
We got our test back on Wednesday, and I did quite well in this test. I realized that this test was out of 19, which meant a small mistake would make a huge difference in percentages.
The questions we did on Friday were quite interesting; they were about proving whether the addition/multiplication of two functions is bouned by another function, which was a little bit different than the questions we did before.

Sunday, March 17, 2013

Week 9 (MAR 11 - MAR 15) - Term Test 2

At the beginning of this week, we did some big O proofs by using the definition of big O. Then on Wednesday, we tried another problem-solving question. I was busy preparing the test at the time, so I had not figured it out yet. The test was fairly straightforward and the questions were very similar to what we had been taught in class. For the first question, I remembered that we did a similar one in the tutorial and it was easier than the quiz question.

Since it is approaching the end of the term, I am going to be very busy for the following weeks. However, I probably will find some time to do another problem-solving type of questions before the term ends.

Sunday, March 10, 2013

Week 8 (MAR 4 - MAR 8) - A2 and Big O Proofs

We went to the help centre on this Monday. Our solution was okay but there was one line that was not obvious how we got to there, so we took the TA's suggestion and added a comment to that line. Later this week, I got an email about the A2's sample solution. Our proof for question 6 was different from the prof's sample solution, so I started wondering whether we could get full mark for that question. Overall, I believed that we did okay for A2.

This week we did some big O proofs together in class. I was okay with proving the upper bound, but I was not so sure about how to prove the lower bound, especially for the last example that we did on this Friday. I noticed that many of my classmates did not get it either. I would reviewed this part of the notes, and if I still did not get it, I would go to the prof's office hour.

Next week we are going to have our second test. I am a little nervous because I am still not confident in writing proofs. I am planning to review the lecture slides and do the sample test next week.  Hopefully I can get a better result for this test.

Friday, March 1, 2013

Week 6 & 7 (FEB 11 - FEB 15 & FEB 25 - MAR1) - Assignment 2 and Test Result


Back from the break!

I just realized that I forgot to write my SLOG for the week before the reading week. We got our tests back during that week. And I did quite well; the only mistake I had made was that I forgot to give an example of delta. Also, we tried to solve a problem about diagonals. Because the question was much more complicated compared to the previous "folding" question, we had not got a solution yet. I decided to find some time later after the class to figure it out

We started a new topic this week, which was about the big O and efficiency. This was not the first time I had heard these words.  I had learned some basics in both grade 12 computer science and CSC108. However, since these courses focused more on programming, the teachers taught very briefly on this topic. Therefore, I was not very confident in determining the running time before today.

My friend and I finished the second assignment yesterday. The last question was a little difficult to prove; it took us a lot of time to figure it out. However, we were still not sure about whether our proof was correct. We were planning to go to the office hour next week.

Friday, February 8, 2013

Week 5 (FEB 4 - FEB 8) - Term Test 1

Today, we had our first term test. I was a bit surprised that the number of questions in the actual test was less than the number of questions in the sample test. To be honest, I was a little worried about the possibility of not being able to finish the test on time yesterday.
This test was not hard, and unlike some wired tests that we had done in high school, it was exactly what we learned from the lecture. The only surprise might be, that there were some questions about delta-epsilon. I thought that it was not going to be covered in this test, so I did not review this part of the notes. However, since delta-epsilon definition of limit also used implication and quantifiers, I got my answer by re-reading the statements for a few times and I used graphs to explain it.

This week was all about proofs; we learned how to prove an implication and prove by contradiction. We did some examples together, and these examples really gave me an idea about how to write a proof. The format of proofs interested me; it was really similar to writing Python codes. However, I still did not feel confident to write proofs by myself because sometimes I did not know where to start, and wrong starting point led me to a wrong conclusion. Maybe it was because I was lack of practice, so I probably would find some proofs to do during the reading week.

Sunday, February 3, 2013

Folding

Unknown: the sequence of ups and downs by folding a strip of paper
Condition: folding left over right
Data: need to be collected by our own

 
Plan A:
Step 1: Fold a strip of paper
Step 2: Record the ups and downs
Step 3: Repeat the process for different number of folds
Step 3: Find the patterns

 
Plan B:
Step 1: Same as Plan A
Step 2: Find out why it is producing up/down by looking at the paper (folds) and the way we folded it
Step 3: Find the sequence based on the reason discovered in Step 2

 
We started by carrying out Plan B first. Unfortunately, as the folds increase, we lost track of the ups and downs. And it was really difficult to find out the answer by simply looking at the folds.
As a result, we changed our plan.


Here was the data that we collected.


 



By looking at the total number of the ups and downs, I realized that the ups and downs might be somehow symmetrical.

The total number of ups and downs was related to the previous one.
Let c = the current total number of ups and downs, p = the previous total number of ups and downs
We found out that c = p*2 + 1, and c must be an integer that is greater to 1.
Therefore, I believed the ups and downs were somehow related to the previous ups and downs.

Also, based on the hint given by the professor, we founded out that our first fold were always in the middle of the overall pattern of folds. Because of this, the ups and downs must be symmetrical.


Therefore, I made the following table to figure it out.
 

Fold
 
1

 

D
 
2

 

U

D

D
 
3

 

U

U

D

D

U

D

D

 

4

U

U

D

U

U

D

D

D

U

U

D

D

U

D

D

As you can see, the first fold always occurred in the middle.
We also found out:
1.       The ups and downs on the right side of the first fold were always the copy of the previous ups and downs.
2.       The ups and downs on the right were flipped to produce the ups and downs on the left side, which means the ups and downs were mirror symmetric.

This can be explained by the way of folding the paper. The U’s and D’s on the left side were the same as the right side before we unfolded the paper for the last time. If we unfolded the paper, these U’s and D’s would be flipped, which was exactly what we founded out on above.

According to the explanation above, I realized that this flipping-process was being repeated each time when we unfolded, and the center one was always D.
According to this discover, I made my predication for 5 folds.
If you unfold for the first time, there will be only one D.
Unfolding 2nd time: UDD
Unfolding 3rd time: UUDDUDD
Unfolding 4th time: UUDUUDDDUUDDUDD
Unfolding the last time: UUDUUDDUUUDDUDDDUUDUUDDDUUDDUDD


To make life easier, I made a Python function to predict the sequence given the number of folds.
 
 
 
 












To examine the conclusion, we decided to make 5 folds.

It was UUDUUDDUUUDDUDDDUUDUUDDDUUDDUDD, which was exactly what we predicted.
And there were 31 U’s and D’s in total; we could get the same answer by using the formula c = p*2 + 1.
Q.E.D.