We have just finished Week 10 off with getting our tests back and doing more Big-O examples, which led up to Big-Ω. (I can't believe we finished our tenth week in CSC165 in the blink of an eye.)
I was very happy with my second test. It was better than the first one. The result from the previous test definitely gave me that boost! Although I messed up on the floor proof, the other two proofs were well done. I had trouble remembering how that proof worked; I've looked at the solutions to the second assignment the previous night, but my answer didn't seem to match up. That's okay. I'll practice proofs involving the definition of floor in time for the exam. This test's duration matched with the previous test's duration, which was 50 minutes. It would be nice if I had a bit more time, perhaps to look over my answers and fix any mistakes before submission, but I was capable of answering all questions in 50 minutes in some way.
I'm feeling very comfortable with proof structures. I'm confident with the outer parts of the proof, but the inner part needs a bit of work because the statements are different. For now, though, I'll keep reading the course notes, making annotations, and going to office hours.
November is a pretty hectic month for us with midterms, assignments and all. At the same time, the material presented in CSC165 is piling up. I must admit, Big-O is a complex concept. I'll let it take time to sink in. CSC165 is a difficult course, so to ensure success, I visit Professor Heap during his office hours on Wednesdays. I also make use of the Computer Science Help Centre to study for tests and work on assignments.
As I mentioned before, I understand the proof structure and the definition of Big-O very well. Proving it requires more practice because it all depends on which statements we get. For instance, Big-O can be done with two functions and polynomials. The proof structures are similar. But to enhance our proof, it's crucial that we begin with scratch work before going on to write the proof.
I think I'll be okay with Big-O and Big-Ω pretty soon. It's new material. Once I get the hang of it, I'll be fine before I write the final exam in a couple weeks' time.
I'll also begin practicing sorting algorithms using the approaches seen in both CSC165 and CSC108.
Sunday, 16 November 2014
Saturday, 8 November 2014
Week in Review #6 (!): More with Big-O and completion of assignment and test #2
Has it really been two months since we started CSC165? Time whizzes by in the blink of an eye!
The next instalment in my "Week in Review" series is based on Big-O, which we looked at in weeks 8 and 9, as well as the recent assignment and test.
I had my second test on Wednesday. It was quick and straightforward, consisting of three proofs, just like the practice test. The last proof was on the definition of a floor function, or "the floor of x":
The next instalment in my "Week in Review" series is based on Big-O, which we looked at in weeks 8 and 9, as well as the recent assignment and test.
I had my second test on Wednesday. It was quick and straightforward, consisting of three proofs, just like the practice test. The last proof was on the definition of a floor function, or "the floor of x":
I thought, Wasn't this on the assignment? I could do this! The test was a lot easier than I thought and definitely easier than the first one. The testing effect does help a whole lot.
I've been more prepared for this test than the first test, and I think that this test was a success! Getting a low mark on the first test really motivated me to do better this time around!
Part of my test preparation involved Assignment #2, due two days before the test. It took a while to finish, but I'm hoping I did well on that too. I managed to get some help from friends and a TA at the CS Help Centre.
This week, we began proving the Big-O of polynomials. We've been practicing a lot of proofs, and so proving them wasn't too difficult. We started by writing a proof structure followed by writing up the actual proof.
Last week was introduction to Big-O. We started off by proving the Big-O of n², which is extremely long and mentally exhausting. I was quite relieved when we were introduced to proving the Big-O of polynomials because they aren't as long and complicated.
The definition of Big-O is as follows:
Last week was introduction to Big-O. We started off by proving the Big-O of n², which is extremely long and mentally exhausting. I was quite relieved when we were introduced to proving the Big-O of polynomials because they aren't as long and complicated.
The definition of Big-O is as follows:
(for any function, f, that inputs natural numbers and releases non-negative real numbers)
The statement that needs to be proven is:
We start off by picking a positive real number, c, and a natural number, b, that will work. Then we assume that n is a generic natural number in order to introduce ∀. We assume the antecedent, n ≥ B. I'll put it all together using a proof structure:
Let c' = ____ and B' = _______.
Then c' ∈ R⁺and B' ∈ N.
Assume n ∈ N. # in order to introduce ∀
Assume n ≥ B'. # antecedent; B is an arbitrary natural number
.
.
.
Then ∀ n ∈ N, n ≥ B ⇒ g(n) ≤ cf(n) # introduce ∀ and ⇒
Then ∃ c ∈ R⁺, ∃ B ∈ N, ∀ n ∈ N, n ≥ B ⇒ g(n) ≤ cf(n) # introduce ∃ for b and c
Big-O of n², worst case, and the upper and lower bounds are still a bit unclear to me, so I'll go to office hours when I can, read the course notes, and practice a lot. I get the proof structure, but the actual proof is complicated and doesn't come to me just as easily.
Saturday, 1 November 2014
Week in Review #5: Assignment + test = added stress
We have just finished Week 8. (Time flies.) I have my second assignment due on Monday night, and my second midterm on Wednesday morning.
Since doing poorly on the first test (my first ever test for university), I have decided to change my approach to studying. However, I will continue to make a study sheet, go over tutorial exercises and quizzes, and do the practice test within the 50 minute time frame. I learned from one of my readings in psychology that one of the best ways to do well on a test is to do a practice test according to research; this is known as the testing effect. What I've changed is that I'm starting to use Prof. Heap's slides more wisely. He has encouraged us to make our own annotations in whichever ways we want. I find that writing notes in my notebook isn't as effective as having the slides in front of me, either electronically or on paper. If everything can be seen in front of me, then there's no point spending time writing copious notes. Having the slides printed out or opened on a program such as Adobe Reader saves time; I could highlight things and write down what I think is important to master a certain concept.
I also have the course notes to look at. I can use them to look at concepts in more detail. I'm hoping I can study with friends, too. I have high hopes that the upcoming test will be a success. (I try to be optimistic; I always aim to move forward.) I just need to be careful not to make any silly mistakes.
In addition, Assignment #2 is a bit shorter than Assignment #1, which took us hours to finish. I hope this assignment will be better than the last one, and I can also use this as a study tool for Wednesday. As the weeks progressed, so did my understanding of proofs. I seem to understand the proof structure and scope of indentation. Now, it's simply a matter of practice; I feel I did not practice well enough for the first test. I need to fix up my time management skills.
This week, we began Big-O and Big-Ω. The proofs for both were time-consuming. The big-O of n² means that there is a set of functions with the input being natural numbers and output being positive, real numbers. We also began sorting algorithms. We took a look at a couple examples using Python. They looked very familiar to me because I'm currently taking CSC108.
I would like to wish everyone the best of luck on the assignment and test!
Since doing poorly on the first test (my first ever test for university), I have decided to change my approach to studying. However, I will continue to make a study sheet, go over tutorial exercises and quizzes, and do the practice test within the 50 minute time frame. I learned from one of my readings in psychology that one of the best ways to do well on a test is to do a practice test according to research; this is known as the testing effect. What I've changed is that I'm starting to use Prof. Heap's slides more wisely. He has encouraged us to make our own annotations in whichever ways we want. I find that writing notes in my notebook isn't as effective as having the slides in front of me, either electronically or on paper. If everything can be seen in front of me, then there's no point spending time writing copious notes. Having the slides printed out or opened on a program such as Adobe Reader saves time; I could highlight things and write down what I think is important to master a certain concept.
I also have the course notes to look at. I can use them to look at concepts in more detail. I'm hoping I can study with friends, too. I have high hopes that the upcoming test will be a success. (I try to be optimistic; I always aim to move forward.) I just need to be careful not to make any silly mistakes.
In addition, Assignment #2 is a bit shorter than Assignment #1, which took us hours to finish. I hope this assignment will be better than the last one, and I can also use this as a study tool for Wednesday. As the weeks progressed, so did my understanding of proofs. I seem to understand the proof structure and scope of indentation. Now, it's simply a matter of practice; I feel I did not practice well enough for the first test. I need to fix up my time management skills.
This week, we began Big-O and Big-Ω. The proofs for both were time-consuming. The big-O of n² means that there is a set of functions with the input being natural numbers and output being positive, real numbers. We also began sorting algorithms. We took a look at a couple examples using Python. They looked very familiar to me because I'm currently taking CSC108.
I would like to wish everyone the best of luck on the assignment and test!
Sunday, 26 October 2014
Problem Solving: Penny Piles
Unlike my recent posts, the title of this post will not start with "Week in Review." (I couldn't think of any better titles for my weekly posts.) I'll be writing about a problem solving exercise that our class did yesterday, called "Penny Piles."
The four steps to problem solving by Polya are:
The four steps to problem solving by Polya are:
- Understand the Problem
- Devise a Plan
- Carry Out the Plan
- Look Back
Using this approach, I'll explain how to solve this problem.
- There are two drawers. One of the drawers is filled with 64 pennies, while the other one is empty. The question here is: Can things be arranged so that one of the two drawers has 48 pennies? This is where two operations are introduced: l and r.
- l: If the left drawer has an even number of pennies, half of that amount can be transferred to the right drawer. This operation will not work if the number of pennies on the left drawer is odd.
- r: If the right drawer has an even number of pennies, half of them can be transferred to the left. Once again, this will not work for odd amounts.
- The plan is to consider the range [0, 64]. The goal is to arrange the pennies so that one of the two drawers has 48 pennies as well as another number within the range using the operations l and r from the previous step. To achieve this goal, a number of different possibilities can be mapped out in various ways.
- At the start, the left drawer has 64 and the right drawer has 0. To execute the plan, half of the pennies in the left (32) can be transferred to the right using operator l. Now it's even. Both drawers have 32 pennies each. But one of the drawers must contain 48 pennies as per our problem. Operators l or r can be used in this case because 32 is an even number and the pennies are divided evenly. For example, if we transfer half of the pennies in the left drawer to the right, the result is 16 pennies in the left and 48 in the right. Therefore, it is possible for one of the drawers to have 48 pennies using arrangements, but the sequences are endless. Here is an example sequence using the l operator:
- Start (left, right): 64, 0
- 32, 32
- 16, 48
- 8, 56
- 4, 60
- 2, 62
- Finish: 1, 63
- To check the result, a tree diagram can be drawn, listing all the possibilities. Another way (similar to my approach) is to create an output sequence using only operators l, r, or a combination of both. Using an equation to derive the solution may also come in handy; for example, x + y = 64, where x and y represent pennies in the left and right drawers adding up to 64, respectively. To conclude, any number in the range [0, 64] can be achieved.
Saturday, 18 October 2014
A (Short) Week in Review: More proofs and midterm results
This is the fourth "Week in Review."
This week was short due to Thanksgiving on Monday. Thus, there were no tutorials and only two lectures.
This week was short due to Thanksgiving on Monday. Thus, there were no tutorials and only two lectures.
Unfortunately, I haven't had time to get my test, but my test score wasn't that great. I did pass, so that's something to be happy about, I guess? However, Professor Heap announced in lecture that the class average was in the low 80's. That's amazing! I thought. My test mark is way below the class average. I messed up the first question really badly when I thought I'd do well on it. I didn't do so well on the last question either. That's okay; I'll do better on the next test. But the feeling of getting a mark that is below the class average makes me feel defeated. I'll approach Prof. Heap on Wednesday during office hours to see where I went wrong and move forward. I might be upset temporarily, but I have to keep in mind that this was the first test and that I should still be happy because I passed.
I'll have to admit that I didn't study hard enough. I had my psychology test the very next day and I was a bit too focused on trying to memorize as much as I could because psychology involves memorization of terms. I did study some of the material, though. I still managed to get an adequate result despite my lack of study.
I'll have to admit that I didn't study hard enough. I had my psychology test the very next day and I was a bit too focused on trying to memorize as much as I could because psychology involves memorization of terms. I did study some of the material, though. I still managed to get an adequate result despite my lack of study.
This week was a continuation of proof writing, all with the same proof structure:
We've been looking at proofs for about a week now. More specifically, we've looked at certain kinds of proofs.
Recently, we've learned how to prove using different cases. Sometimes, a statement can have different possibilities. If this is the case, it is best to split the argument into multiple cases. For example, we can consider the cases when a number is odd and a number is even. We can integrate this into our proof after we have made our assumption.
The floor function was introduced. The "floor of x" is the largest integer that is either less than or equal to x. On a graph, it looks like this:
Proofs can be time-consuming to write. In CSC165, we use a proof structure that mostly involves the written word, especially Python-style comments on the side (beginning with "#") as seen in CSC108. In MAT137, I start with my rough work and then carry on with the proof, but I also have to use words. For my problem sets, I lose marks if I do not explain my proof in words.
I often comment on the similarity between CSC165 and MAT137 because I have both on the same days and they complement each other very well. Technically, CSC165 is a computer science course, but it's all about math and logic. Using what I've learned in 165 can help me with the material presented in 137, notably the logic component.
Assume...
(insert "Then" statements here with proper indentation)
Conclude....
We've been looking at proofs for about a week now. More specifically, we've looked at certain kinds of proofs.
Recently, we've learned how to prove using different cases. Sometimes, a statement can have different possibilities. If this is the case, it is best to split the argument into multiple cases. For example, we can consider the cases when a number is odd and a number is even. We can integrate this into our proof after we have made our assumption.
This concept is seen once again in MAT137 on a practice problem set, which is used to help students prepare for Wednesday's test.
I often comment on the similarity between CSC165 and MAT137 because I have both on the same days and they complement each other very well. Technically, CSC165 is a computer science course, but it's all about math and logic. Using what I've learned in 165 can help me with the material presented in 137, notably the logic component.
Thursday, 9 October 2014
Week in Review #3: my first midterm for university
Yesterday morning, I had my first ever midterm test for university. Before the test, I went over all the concepts we've learned up to Week 4. I made study notes, redid my quizzes, and revisited the assignment sample solutions. I looked at a past test from 2013, which seemed to help a bit. I also went to the Computer Science Help Centre at the Bahen Centre to study with friends and ask a TA questions. I should go there for help as well, seeing that it's an excellent and free resource. However, I'm not gonna lie when I say that I did feel very nervous. I hope that my preparation was sufficient in order to do well on this test. My class was even allowed to bring a study sheet.
As I saw the test, I read over it. Some questions were obvious to me; some, well, not so much. Things like negation, true/false, and sets were involved. It wasn't an easy test. The good part is that I was able to finish the test within the fifty minute time frame without leaving any blanks. The not-so-good part is that I don't know how I feel I did on the test. I don't know if I did well or failed it. I'm a bit worried, but I shouldn't be too, too worried because there's another midterm next month followed by the final exam in December. Professor Heap will weigh the two accordingly; the better of the two will be worth 10% while the other is worth 6%. That's not bad.
On a positive note, I'm glad I got the midterm over with.
Aside from the midterm, I had my weekly Tuesday morning tutorial. We went over proof structures, for which we would be quizzed on at the end of the period. It went well aside from the fact that it started to rain when I got out of the subway.
I seem to have a better understanding of proofs now that we went over them in tutorial and in lecture, where we used the examples on the slides. I will use what I've learned in CSC165 to help me write proofs for my upcoming MAT137 midterm. Those two courses make an excellent combo.
As I saw the test, I read over it. Some questions were obvious to me; some, well, not so much. Things like negation, true/false, and sets were involved. It wasn't an easy test. The good part is that I was able to finish the test within the fifty minute time frame without leaving any blanks. The not-so-good part is that I don't know how I feel I did on the test. I don't know if I did well or failed it. I'm a bit worried, but I shouldn't be too, too worried because there's another midterm next month followed by the final exam in December. Professor Heap will weigh the two accordingly; the better of the two will be worth 10% while the other is worth 6%. That's not bad.
On a positive note, I'm glad I got the midterm over with.
Aside from the midterm, I had my weekly Tuesday morning tutorial. We went over proof structures, for which we would be quizzed on at the end of the period. It went well aside from the fact that it started to rain when I got out of the subway.
I seem to have a better understanding of proofs now that we went over them in tutorial and in lecture, where we used the examples on the slides. I will use what I've learned in CSC165 to help me write proofs for my upcoming MAT137 midterm. Those two courses make an excellent combo.
Saturday, 4 October 2014
Week in Review #2: Prove it!
We went over the proof outline this week. This outline helps us write good proofs that are clear and organized. I have seen this already in MAT137, but given the similarity between that and CSC165, it came back to me.
First off, a proof is the explanation of why and how a statement is true. To prove something, we have to believe that the statement is true. We start by understanding why it's true. Once we understand why it's true, we then go on to writing it down. However, it does not stop there. Proof writing is not a finite process. Sometimes we may encounter gaps that need to be fixed that require us to start over. The first step, understanding the proof, is where we try and strengthen our weak spots. In MAT137, we call this "scratch work" or "rough work." It is a messy process, but it is necessary that we go through this process to strengthen any given proof. Much like English writing, there is an audience to our proofs: CSC165 students and staff. We have to make sure that our audience can understand our proofs.
As for style, indentation is required to show scope of assumption. We also begin our sentences with words such as "Assume" and "Then" throughout our proofs. As I learned in MAT137, I could also end a proof with ∎.
This is how a proof would generally look like. We start with "Assume" and end with a concluding statement (starting with "Then" or "Conclude"):
In addition, I had my third quiz in tutorial on Tuesday. When I went over the exercise with the TA, I had a better understanding of the material. The quiz wasn't so hard either.
I also had my first assignment due yesterday. At first, I did not know how to approach many of the questions. I worked with other people to get help. After many hours, it was finally finished. I felt a sense of accomplishment and relief.
This is how a proof would generally look like. We start with "Assume" and end with a concluding statement (starting with "Then" or "Conclude"):
Assume...
Assume...
Then...
.
.
.
Then....
Then...
I also had my first assignment due yesterday. At first, I did not know how to approach many of the questions. I worked with other people to get help. After many hours, it was finally finished. I felt a sense of accomplishment and relief.
Subscribe to:
Posts (Atom)



