Friday, December 5, 2008
Last Post : (
The last week comes to and end with a midterm test, I had no problems doing a test on the last day, the only challenge was getting here on time. But like usual , I was late again , almost 20 minutes , but luckily half of the material I was already prepared for , although I did have some difficulty proving the finite language question. Luckily since Danny's such a nice guy , he gave me some extra time , and I am very thank full for that (I hope I keep getting more teachers like him). Anyways so this course comes to and end ,although the exam is still left. Again , thank you Danny , I'll try my best not to be late for the exam. : )
Friday, November 28, 2008
Week 12 of CSC236
The second last week started off well for me , coming to class on time for once. But on Wednesday and Friday i reverted to my old habit of being late and now i am very confused about Context Free Grammar. Although i understand the concept and the meaning behind it, i am confused about a lot of the notation. Especially what S ==>*x means. Hopefully ill get this straightened up by the next midterm.
Monday, November 24, 2008
Week 11 of CSC236
Yet again this week is swamped. Along with 236 assignment and problem set, i also have my stats midterm , csc207 project. Because of this , there isn't very much i can do this week in terms of 236 , except the assignment and the problem set. Again i decided to work in a group because it would lighten my load as well as my partners'. Luckily we'll get the assignment done on time and properly, as for the problem set, i was planning on not doing it , but i managed to type it up the day before it was due, hopefully it'll be correct.
Monday, November 17, 2008
Fika's Dramatic Problem Solving Episode.
This will be my problem solving episode for the problem set 5. The problem is as follows :
Prove that if language L has a finite number of strings, then there is is some regular expression that denotes L.
After reading the statement a few times, my understanding of the problem is that we must show that a language with a certain number of strings , k , can be written with a regular expression of the form R+S , RS , or R*. But of coarse not all of the regular expressions can denote the language , so the problem was figuring out the suitable expression.
The next step in problem solving is devising a plan(s).This problem looked quite similar to the problem on page 193 of the text. The only difference is that the language in the book is defined to be infinite , rather than our finite case. So of coarse induction was the obvious way to proceed. By assuming that a language with k strings can be denoted by a regular expression , we could prove for a language with k + 1 strings. So using simple induction seemed like the ideal way to go , as it proved an important result in the base cases, which we will need and use later in the induction step. Complete induction could also have been used to prove this statement, but in simple induction I could easily the logic of combining regular expressions of a Language with k strings and a Language with 1 string.
Now to carry out my plan to prove the statement with simple induction. Of coarse when using simple induction we prove the base cases first. Since the cases where language is empty ,the language contains epsilon (the empty string) and a language with only 1 string are the interesting cases,I proved them in the base case. In the induction step, we assume that a language (L) with k strings can be denotes by the regular expression R. Now by constructing a new language with the language L , and an element x , we can create a language with k+1 strings. We know that L' = L + x , so we know that L' can be denoted by a regular expression R for the language L and a regular expression that denotes a string x, which by our base case we know exists. So by using our induction hypothesis , and our base case , we can construct L' by the regular expressions that denote L and the string x. Thereby proving that a language consisting of k+1 strings can be denoted by a regular expression.
Looking back at the problem, it was obvious that I could've proven the statement by using complete induction , or even structural induction. But I am confident that my solution is correct and using test languages , I could see that the union of regular expressions can denote any finite ( or infinite) language because by breaking the language into two pieces , I can create a regular expression for each portion of the language.
Perhaps this wasn't as dramatic as I first thought it would be , but I hope this gives the viewer some understand of the concept and I hope my solution didn't confuse anyone. This concludes the Dramatic Problem Solving Episode.
Prove that if language L has a finite number of strings, then there is is some regular expression that denotes L.
After reading the statement a few times, my understanding of the problem is that we must show that a language with a certain number of strings , k , can be written with a regular expression of the form R+S , RS , or R*. But of coarse not all of the regular expressions can denote the language , so the problem was figuring out the suitable expression.
The next step in problem solving is devising a plan(s).This problem looked quite similar to the problem on page 193 of the text. The only difference is that the language in the book is defined to be infinite , rather than our finite case. So of coarse induction was the obvious way to proceed. By assuming that a language with k strings can be denoted by a regular expression , we could prove for a language with k + 1 strings. So using simple induction seemed like the ideal way to go , as it proved an important result in the base cases, which we will need and use later in the induction step. Complete induction could also have been used to prove this statement, but in simple induction I could easily the logic of combining regular expressions of a Language with k strings and a Language with 1 string.
Now to carry out my plan to prove the statement with simple induction. Of coarse when using simple induction we prove the base cases first. Since the cases where language is empty ,the language contains epsilon (the empty string) and a language with only 1 string are the interesting cases,I proved them in the base case. In the induction step, we assume that a language (L) with k strings can be denotes by the regular expression R. Now by constructing a new language with the language L , and an element x , we can create a language with k+1 strings. We know that L' = L + x , so we know that L' can be denoted by a regular expression R for the language L and a regular expression that denotes a string x, which by our base case we know exists. So by using our induction hypothesis , and our base case , we can construct L' by the regular expressions that denote L and the string x. Thereby proving that a language consisting of k+1 strings can be denoted by a regular expression.
Looking back at the problem, it was obvious that I could've proven the statement by using complete induction , or even structural induction. But I am confident that my solution is correct and using test languages , I could see that the union of regular expressions can denote any finite ( or infinite) language because by breaking the language into two pieces , I can create a regular expression for each portion of the language.
Perhaps this wasn't as dramatic as I first thought it would be , but I hope this gives the viewer some understand of the concept and I hope my solution didn't confuse anyone. This concludes the Dramatic Problem Solving Episode.
Week 10 of CSC236
Again being late has put me a little behind for the Monday class, but luckily DFSA's aren't that hard to understand , and I find them creepily interesting. I had to teach myself what the notations d(q,a) meant exactly, but luckily Prof. Heap's notes are very easy to understand, but sadly the book isn't quite clear on this chapter. But I think I taught myself well enough to understand the notation. Creating the DFSA's is also eerily fun, also its very good at explaining the states of the Languages and strings.
On Friday I was quite pleased to get my test and problem set 4 back. I genuinely though I had messed up the last test, but to my pleasant surprise I did quite well , at least a lot better than I thought I would. Hard to believe its already week 10 , the school days go by so fast. Sadly this was my only "free" week this semester , but luckily we only have 3 more long weeks left of school remaining.
On Friday I was quite pleased to get my test and problem set 4 back. I genuinely though I had messed up the last test, but to my pleasant surprise I did quite well , at least a lot better than I thought I would. Hard to believe its already week 10 , the school days go by so fast. Sadly this was my only "free" week this semester , but luckily we only have 3 more long weeks left of school remaining.
Saturday, November 8, 2008
Week 9 of CSC236
In the beginning of the week it seemed very odd to me to prove properties of strings in "Languages". But when i started to look at it as if the languages were methods or predefined parameters etc , it made sense that combining these strings can help show some properties of some language.
Luckily I was on time this time , a few minutes earlier in fact , for the test. The test itself wasn't too difficult , except the last question. The only reason I had trouble with it because of the minimal time I spent studying csc236 because of my calculus test. But still hopefully I will do adequate on the test, we will see next week.
Luckily I was on time this time , a few minutes earlier in fact , for the test. The test itself wasn't too difficult , except the last question. The only reason I had trouble with it because of the minimal time I spent studying csc236 because of my calculus test. But still hopefully I will do adequate on the test, we will see next week.
Monday, November 3, 2008
Week 8 of CSC236
After a very stress filled and a packed weekend I finally managed to get the A2 done. I decided to work in a group to lighten my load as well as my partners' load as well since we all had a tonne of other things due. I wrote the good copy of the problem set the night before just because I could not get any time to start on it anytime earlier. Although it was easy , it still took me some time to write it up properly as my rough work was very , well rough.
Loop iteration isn't very hard especially when you figure out the precondition and postcondition, but thats where the problem lies for me. I find it difficult to come up with a suitable precondition , especially if its a function like pow , where the conditions are very trivial which makes them hard for me. Hopefully ill understand loop invariants a little better by the end of the week after my very busy week.
Loop iteration isn't very hard especially when you figure out the precondition and postcondition, but thats where the problem lies for me. I find it difficult to come up with a suitable precondition , especially if its a function like pow , where the conditions are very trivial which makes them hard for me. Hopefully ill understand loop invariants a little better by the end of the week after my very busy week.
Week 7 of CSC236
The lectures this week seemed a little confusing to me , perhaps because I was late again. The program correctness of recBinSearch wasn't too bad to understand , but the gcd function confused me in the beginning especially the property of gcd(n,m) being equal to gcd(m,r). But after reading over the notes a few times and looking at the examples in the book , I realized that the common divisors of n/m and of m/r have similar sets.
Next week should be interesting especially with the 207 project phase coming up along with a zillion other assignments.
Next week should be interesting especially with the 207 project phase coming up along with a zillion other assignments.
Friday, October 17, 2008
Week 6 of CSC236
Theser recursive functions were always a tad overwhelming , especially ion first year. but after seeing how to unwind them and solve / prove their time complexities , I'm beginning to become a lot of more comfortable with them. The problem set this week wasn't a hard one , but of coarse with the 207 assignment it was eventually started the day before it was due. but of coarse looking at the examples from the class , I began to unwind it , where I saw the familiar summation notation. After rummaging through my old notes I found out the formula to solve the series and then the proof was easy after that. I'd hoped to do a tad better on the first test , but I guess being late even a few minutes has quite an impact on my mark.
Friday, October 10, 2008
Week 5 of CSC236
Structural induction seems very familiar to simple induction that we have done in class. Especially the full binary tree problems and the set theory problems which rely a lot on the structure of the item which we need to prove. It seems odd at first that trees need to be proven without using the number of nodes, but i suppose it is important to prove items with their previous structure intact. The test seemed easily , except maybe the time constraint made it a little difficult to think clearly.The questions did not seem very difficult , but obviously without notes , in the beginning they seemed a little difficult , but as started to write the induction proof structure , the proof came together very nicely. Again maybe a little more time would've helped me to finish the last question.
Monday, October 6, 2008
Week 4 of CSC236
Finishing the first assignment wasn't so bad , except for the last question which was a bit confusing to start with ,but after doing some scratch work i managed to finish all of my assignment at 9:30 pm.
Recursion always gave me some problems when i was programming , but doing recursive problems on paper always cleared things up. Doing these Fibonacci type problems always helped me to solve other recursive problems and I also find that doing induction proofs with recursion is easier since there are always recursive terms left over that can be combined and simplified. Also the time complexity calculations seem to be a lot simpler then last year, perhaps because this will be the second time doing them.
Looking forward to the first term test which I absolutely cannot mess up, for me its important to get a good mark in the beginning of the course as it sets the tone for me for the rest of the courses duration.
Recursion always gave me some problems when i was programming , but doing recursive problems on paper always cleared things up. Doing these Fibonacci type problems always helped me to solve other recursive problems and I also find that doing induction proofs with recursion is easier since there are always recursive terms left over that can be combined and simplified. Also the time complexity calculations seem to be a lot simpler then last year, perhaps because this will be the second time doing them.
Looking forward to the first term test which I absolutely cannot mess up, for me its important to get a good mark in the beginning of the course as it sets the tone for me for the rest of the courses duration.
Friday, September 26, 2008
Week 3 of CSC236
Perhaps it was because I'm late almost every class now , but I start off the class being a little confused about the problem thats being taken up.Luckily Prof. Heap writes his solutions in a very understandable way so that when he starts to write the actual proof I understand the problem right away. It was very interesting to see induction proof's using the Principle of Well Ordering.I find it easier to not write base cases since its obviously less writing.Using the Principle of Well Ordering you do don't have to write the base case explicitly, but its still there because you are using the fact that there is a smallest number for which the problem is true for.
Although the 3 proofs of induction we use are similar , I did not know that they implied one another. After seeing the proof , you can see that for example proving something by complete induction , you can conclude something about the smallest element in the principle of well ordering for another fact. It would be very interesting to see a cross over of the induction proofs , maybe we'll see them later on.
I was wondering if you could prove something even though the proposition is false , and today i got to see that. It was interesting to see that even by adding 1 word like "full" with binary tree could make a difference between a correct and a wrong proof, or even how adding 1 to a constant can be used to correct a false proof. Looking forward to completing the assignment this weekend , hopefully the last question won't give me problems.
I was happy to see that the problem set 2 was quite easy , the only "difficult" part was to find out the number N for which the postage could be made. Also it was nice to see I did well in problem set 1 , hopefully I can use the problem sets to boost my mark , even if it'll be by a small factor. Looking forward to completing the assignment this weekend , hopefully the last question won't give me problems.
I found this pretty amusing.
Although the 3 proofs of induction we use are similar , I did not know that they implied one another. After seeing the proof , you can see that for example proving something by complete induction , you can conclude something about the smallest element in the principle of well ordering for another fact. It would be very interesting to see a cross over of the induction proofs , maybe we'll see them later on.
I was wondering if you could prove something even though the proposition is false , and today i got to see that. It was interesting to see that even by adding 1 word like "full" with binary tree could make a difference between a correct and a wrong proof, or even how adding 1 to a constant can be used to correct a false proof. Looking forward to completing the assignment this weekend , hopefully the last question won't give me problems.
I was happy to see that the problem set 2 was quite easy , the only "difficult" part was to find out the number N for which the postage could be made. Also it was nice to see I did well in problem set 1 , hopefully I can use the problem sets to boost my mark , even if it'll be by a small factor. Looking forward to completing the assignment this weekend , hopefully the last question won't give me problems.
I found this pretty amusing.
Tuesday, September 23, 2008
Week 2 of CSC236
Now onto the second week. Breathing a sigh of relief after finishing the first problem set. But another problem set awaited me after my long journey home. Hopefully it won't be harder than PS 1. To me it was the perfect difficulty for a problem set as it reinforced the material covered during the previous week. Week 2 material seemed a tad weird in the beginning. But after the second lecture of week 2 I really liked the complete induction proofs , they are more or less the same as simple induction , especially the antecedent that's used for both. The consequent part is quite simple , especially if I can make a connection between the current n case to any of the previously assumed cases. The only question that gave me some trouble was the full binary tree example. Most likely because I was late for class , but during the actual proof I could see how using each embedded tree in the left and right node trees can create odd number of nodes.
The stamp problem was nothing new since we did it in CSC165 last year. But using strong induction it seemed a lot easier, the only part that gave me trouble was why we had to start induction after the 11 cent postage , but after attempting problem set 2 and reading the book it became very clear. The book although good for examples , to me doesn't compare to the lectures , because to me it's a lot easier to understand Prof. Heap explain the different cases , and why the base cases are 12 for example in the postage problem.
For the new problem set and assignment i really need to push myself to start early since I'm already swamped with assignments and already a bit behind. Hopefully my assignment proofs will be adequate.
I'll be adding random and weird pictures sometimes to keep you entertained. Hope you enjoy them!
The stamp problem was nothing new since we did it in CSC165 last year. But using strong induction it seemed a lot easier, the only part that gave me trouble was why we had to start induction after the 11 cent postage , but after attempting problem set 2 and reading the book it became very clear. The book although good for examples , to me doesn't compare to the lectures , because to me it's a lot easier to understand Prof. Heap explain the different cases , and why the base cases are 12 for example in the postage problem.
For the new problem set and assignment i really need to push myself to start early since I'm already swamped with assignments and already a bit behind. Hopefully my assignment proofs will be adequate.
I'll be adding random and weird pictures sometimes to keep you entertained. Hope you enjoy them!
Monday, September 15, 2008
Week 1 of CSC236
First week of this theory course seemed very familiar to the CSC165 theory course from first year. So far its been fairly easy since the induction proofs have been very simple and straight forward. Its been quite easy so far especially the new form of the proofs. Last year's proofs were quite methodical and had to be written in a certain form. Although they weren't hard , the proofs layout this year is quite easy , suitable to my lazy self. Also the new tablet projector way of teaching is quite clear, Danny can write however small or big and i can see it perfectly even from the back of the class, although the climate in the class room is almost like back home in the good old humid days.
Looking forward to working on the first assignment, although I still have two weeks ,I think it'll be best if I started sooner rather than last year when I procrastinated to the end. The problem set doesn't seem to be too difficult , I've already started working on it and am half way through it, although the second question seems to be giving me some migraines.But I have lots of time to figure it out and I'm sure I can finish it easily.
So far its been quite an interesting first week , in all my courses. Looking forward to the rest of the year hopefully I wont fall off the bandwagon. 0 or 1 , only two choices. Although I did have a nightmare where I saw a 2 , but we all know theres no such thing as 2.
Looking forward to working on the first assignment, although I still have two weeks ,I think it'll be best if I started sooner rather than last year when I procrastinated to the end. The problem set doesn't seem to be too difficult , I've already started working on it and am half way through it, although the second question seems to be giving me some migraines.But I have lots of time to figure it out and I'm sure I can finish it easily.
So far its been quite an interesting first week , in all my courses. Looking forward to the rest of the year hopefully I wont fall off the bandwagon. 0 or 1 , only two choices. Although I did have a nightmare where I saw a 2 , but we all know theres no such thing as 2.
Subscribe to:
Comments (Atom)
