Thursday 2 April 2015

Earlier Post Revisit

    Although I have spent much of this semester re-reading my old posts to assess my growth as a computer scientist, I find this post to be especially important to reflect on. While recursion is still my favorite computer science concept to date, I think that at the time of this post I didn't have as much of a solid grasp on this concept as I believed I did. Certainly working on minimax helped my understanding tremendously but I do not believe that I was truly comfortable with using recursion until much later when I had more practice. Furthermore, I think my frustration with binary search trees noted in the end of my post was simply a symptom of this uncomfortably which became clear to me after looking over my code again as I had suggested I might. Working on option A of Assignment 3 was a far greater challenge and really solidified the idea of using recursion just as any other computer science tool that I have learned to date. After pouring over pruning for several hours and completing myopic and memoization in minutes, as noted in a previous post, I can now confidently say that I both understand and am very confident in my writing of recursive functions.

    Despite my slight hurdle with recursion, I found this course to be relatively straight forward conceptually. Assignments 2 and 3 were definitely challenging but they were very effective in pushing us to become stronger problem solvers; I enjoyed every minute of working on them. This will be my final post regarding CSC148 so I would like to take a moment to thank all of the TAs, instructors, and fellow students for the amount of support given to me throughout the course. You all contributed to a fantastic semester studying CS!

In addition, these slogs were especially helpful and interesting:
Sam
https://csc148winter2015.wordpress.com/
Monica


Note to my TA: I was unaware that this post was to be made last week. I did post last week, just not about the assigned topic so I would like this to be marked as my Week 11 Revisit post if possible.

Friday 27 March 2015

Pruning and Course Content

    I am extremely excited to hear that, as of today, our TAs are finally off strike and we can all put our fears of changed marking schemes to rest. I find this especially relieving in working on assignment 3, knowing that it will indeed be marked at some point.

    More on assignment 3, I can finally say that I have successfully implemented each optimization for minimax and I couldn't be more excited. It took me several days of deep thought and nights of madly tapping at my keyboard to fully understand the pruning algorithm but at 3 am today, my hard work payed off. I'm certainly not done with commenting and cleaning up my code but I must say that this assignment has been the most effective exercise for my learning that I have completed in this course. I really felt that I could put everything we have been taught, as well as the problem solving skills developed in past labs and assignments, to good use in strengthening my Computer Science toolbox.

    With regards to course content I have not found ideas involving big-Oh to be very difficult so far, but deriving formulas for the number of steps executed in a function has always been my weakness. In order to combat this, I will be looking over my notes from CSC165 this weekend as well as completing Lab 10. Moving on, I have found our discussion on testing with assertions and unittest to be very useful in A3 in verifying the correctness of my strategies. I was able to extensively test StrategyMinimaxMemoize and StrategyMinimaxPrune with a heavily modified version of the test file we were given in the week 9 lab, but on second though it may have been a good exercise to write the file from scratch. I think after spending this weekend working on the small issues in understanding I have, my final week of this course will be exceptionally enjoyable as always.

Sunday 22 March 2015

Assignment 3 and Labs

    This past week has been incredibly hectic for me with the effects of the TA strike on this course. Unfortunately I have been unable to complete lab #9 this week and will have to work on it some time next week along with lab #10. With the work that I have had a chance to put into lab #9 I must say that I am quite confused. The file "bt_functions.py" imports BTNode from a file we were not given, I copied the BTNode class we were shown in lecture and attempted to use this for the lab which gave rise to a whole new set of problems. Comparing two BTNodes for equality is proving to be rather annoying as there is no __eq__() method in the BTNode file posted in Diane's lecture materials, I get the impression that I should not need to use it. This being said, I cannot think of another way to assert the equality of two nodes. To anyone reading this, do you think I should just write an __eq__() method for BTNode, or is there some other way to proceed with the lab?

    Moving on to Assignment 3, I have chosen to work on option A and I'm extremely excited to build off of my minimax algorithm. My partner (Saman) and I have decided that, to make the most of our learning in this assignment, he will be working on option B. Our idea is to meet up after we have both completed a version of the assignment and to compare, deciding who's might be better to hand in. We have both made great progress so far, I have already implemented the memoization and myopia strategies and am now just trying to make sense of the description for "pruning". I think this assignment has been and will continue to be extremely effective in both testing my previous knowledge of recursion and helping to develop my confidence in writing more complex recursive functions. I feel that even if the TAs continue to strike and this assignment goes unmarked, it will certainly be a fantastic exercise in preparing all of us for the final exam.

Somewhat unrelated, I've had this song stuck in my head during all of my work on A3... I think it's fitting.

Friday 13 March 2015

Second Test and BST Mutation

    After much reflection and conversing with other students about our second midterm, I feel that each question was exceptionally fair to the material we have studied so far. As I have posted about in the past, I try not to estimate my grade before I receive a marked test back but I felt reasonably confident with each question. This being said, I am concerned that I will not be able to see a marked copy of my test due to the TA strike. The impending modification of this course due to a lack of staff might also greatly impact my study strategies of reviewing previous tests and assignments, ultimately effecting my final exam grade. Perhaps worse, I worry that I may never see a grade for my beloved minimax.py on Assignment 2.

    With regards to course content this week, I have found this idea of binary search tree mutation conceptually quite simple however, the implementation of the insert function was deeply disturbing to me. Even after reading the posted code (from Diane's lecture materials) I was still quite confused about how each case was being handled. My fears were quickly put to rest after completing the exercises in Lab 08, where I spent much time becoming comfortable with these tree mutating functions. Not only this, but I spent much time playing with all of the code in order to test my knowledge, especially for the "balanced_delete" function. I had no issue with the rest of the lab except for the question asking "Can you improve the height in some way?". I am confused by the question, is this asking if we can lower the height of the tree? Or is it asking if we can somehow modify the code for the height method in order to improve its efficiency? If the latter was meant, then I am not sure how to proceed as the code for the height method appears (to me) to be as efficient as possible. I will be asking about this on Piazza but to anyone reading this who knows, please let me know in the comments.

Friday 6 March 2015

Linked Lists and Labs

    As I'm sure everyone has noticed, this week has been nothing short of crazy for students in almost all programs at U of T due to the TA strike. It seems that my normal study strategy of completing lab exercises alone at home has made this week far easier for me. This being said, I am aware of several students that have had issues with this lab without the support of our TAs. I feel very strongly about all of us students helping each other in every way we can and I will be posting my work for all exercises every week. My solutions to this week's lab can be found here and, as always, I am very much open to constructive criticism. This slogger is doing the same (I am not sure of their name) and I have found it very useful going over their solutions to compare with mine.

    Moving on, I have found the course content this week to be relatively straightforward. This idea of Linked Lists seemed quite natural to me and, as mentioned previously, I did not find the lab exceptionally difficult. I must say that I greatly enjoy topics such as this that include everything in my CSC148 toolbox and allow me to really test my learning. Speaking of testing my learning, Assignment 2 was due this week and despite the last minute changes to our starter code, Saman and I were able to hand everything in several hours early. I would like to post my code for the Minimax strategy (I'm very proud of it) but at this point I believe people can still hand in late assignments so perhaps I will make my code available in this post at a later date.

EDIT: My strategy_minimax code can be found here

Friday 27 February 2015

Summary of Recursion

    Recursion is certainly my favorite programming concept that we have covered this semester. This being said, beginning with the suggested style of tracing recursive code was much harder for me to wrap my head around than the code itself and I have since developed my own methods. Combining recursive code with list comprehensions was also somewhat easy for me and seemed quite logical. After a small amount of practice with writing basic functions using these ideas, both the lab exercises and our weekly quiz were exceptionally easy for me.

    Although I already posted about my thoughts on the combination of recursive code with trees, I feel that this topic is certainly worth revisiting in light of Assignment 2. As I mentioned in my last post, I generally spend a great deal of time studying the lab exercises before each weekly lab, I found this to be crucial in aiding my understanding of recursion with trees. The abstractness of this concept, although quite interesting, was very challenging for me to wrap my head around and I found that learning at home at my own pace with no time constraints allowed me to fully grasp these ideas. The true test of my abilities was the Minimax algorithm (in Assignment 2), even with my solid understanding of recursion with trees, I still found this to be extremely challenging. After roughly 5 hours of drawing pictures, madly typing code, and consuming large amounts of caffeine, I managed to fully complete Minimax and I feel that I have become a much stronger student as a result.

    Moving on to my first impressions of binary search trees, I find this concept somewhat challenging but not exceptionally difficult. With my relatively strong understanding of recursion in non-binary search trees and my study strategy of completing lab exercises at home, I am just starting to become more comfortable with writing functions that complete various tasks involving these objects. I certainly will need more practice beyond the Additional Exercises in this week's lab, so I may spend some time this weekend rewriting all of my solutions to lab #6.

These are my solutions to the Additional Exercises in Lab #6 (with corrected docstring examples). If anyone finds any bugs, please let me know in the comments.

Sunday 15 February 2015

Summary of Object-Oriented Programming Concepts

    So far, I have been quite pleased with the course content of CSC148 and it's emphasis on object-oriented design. Our detailed discussion on classes has left me quite satisfied in adding a new approach to problem solving and a powerful tool to my arsenal of computer science knowledge. Beginning with basic class design, I felt very comfortable writing classes such as "point.py" (featured in lecture), and each week, each new addition to our Point seemed incredibly logical and simple for me to understand. As a result, our discussion on special methods also made much sense to me. I felt that I already had a basic understanding of this concept after CSC108, and these lectures only further increased my confidence with writing code of this sort. I felt precisely the same about inheritance, so I won't discus it further. Perhaps a topic I have not discussed in any great detail is my understanding of stacks and queues. I found this somewhat difficult to grasp initially, but after completing the lab exercises early, helping other students with their code, and completing all of the additional exercises in each lab, I feel that I have a very good understanding of how these objects work and their value to us as programmers. Moving on to recursion and trees, I very much enjoyed each of our discussions on both concepts. I have previously posted about my thoughts on recursion, however the combination of this concept with tree objects was an especially interesting challenge for me. So, in order to really strengthen my understanding and confidence, I spent a great deal of time tracing my code in my head for the lab exercises before executing; making sure that each function would work correctly.

    Also on the topic of stacks, I think Saman's idea to write a Hanoi tower puzzle game with stacks has the potential to be very interesting. Check out his post here.

    Moving on to the feedback I received for A1 and the midterm, I was quite relieved to see that I scored highly on both. On A1, I made a small mistake in an "__eq__" method, forgetting to compare the type of the two arguments (using the isinstance function), and also making a string class that only represented the winner in a GameState. These were small errors that are easily corrected and I think I could have avoided this if I had been more careful. With regards to the test, I made the same error as in my assignment (not comparing the type in "__eq__") as well as a silly mistake in my wording of one of my docstrings. Again, I think that in the future I should be spending more time looking closely for mistakes like these as they may cost me significantly more marks in the future.


These are my solutions for the Additional Exercises in Lab #5:

Friday 6 February 2015

Test and Thoughts So Far

    I have had much time to reflect on the test given on Wednesday and have concluded that each question was exceptionally fair, exactly what we have been prepared for. The question on recursion was also very easy for me (hopefully I had the correct idea) which made it a very fun exercise for the topic I studied so carefully. As for my performance on said test, I feel that I knew all of the material and studied appropriately, however, I make a point of not trying to predict what my mark might be before I receive any grade.

    With regards to the discussion on Monday on test cases, I must say that I am very intimidated. Although I had a chance to practice with unittest in this week's lab, the topic was very difficult for me to accept last semester in CSC108. I think my issue was in my lack of understanding of how unittest works as a class and not knowing what the implementation of the method "unittest.TestCase" looks like. This being said, the actual implementation of a subclass of unittest.TestCase for a specific function is not at all a difficult concept for me and I do feel slightly more confident with this topic than in CSC108. Back to my confusion, the code seen under the "if __name__ == '__main__':" line in a test class continues to elude me. Why is it that "unittest.main(exit=False)" must be executed? What does "exit=False" do? I believe these are questions that I will have to answer on my own time, so perhaps this weekend I will read up on unittest to strengthen my understanding of this.

Also, I am not posting anything on recursion this week since I have nothing more to say about the topic. My thoughts on this can be found in last week's post.

Friday 30 January 2015

First Impressions and Assignment 1

    So far in this semester, I have been thoroughly enjoying CSC148. As the next step up from CSC108 and CSC165 (for me), I find the course to be not only reasonable in it's expectations and overall difficulty but quite intellectually stimulating when dealing with concepts such as recursion. More on recursion, I find this idea very fascinating to see in practice and I eagerly await my next lecture on Monday covering merge sort. This being said, it is certainly not an easy concept for me. Although I completed all assigned lab exercises correctly, I still found myself taking a long time on each problem so I think it might be beneficial to practice writing more functions at home in order to strengthen my understanding. Aside from this, most of the course content on classes made a great deal of sense to me, especially with the practice that I got completing Assignment 1.

    More on Assignment 1, I felt that it was pretty straightforward. I think that my use of a chalkboard to organize my thoughts on what each class should do and a basic idea of how it should do it was a very effective strategy in completing this assignment. As a result, the writing of all the code was a very short process for me, aside from some of the tricky design choices. I very much hope that my assignment is what the professors and TA's are looking for.

    In addition, I have a test on Wednesday next week and am quite nervous due to the small number of topics we have covered. I feel relatively confident in every concept aside from reading a paragraph describing a class and hinting at what methods it might need. I find myself over-thinking what the class needs or completing the exercise in a different way than is expected of me. Though I suppose after completing Assignment 1 I do feel slightly more confident with this. Regardless, I think some reviewing this weekend will be necessary. I will post next week with my thoughts having completed the test.

Tuesday 20 January 2015

Beginning CSC148 and Why Geeks Must Know How to Write

    I've just started my first semester of Intro to Computer Science (CSC148) at U of T and have been delighted to find that students are instructed to keep a weekly updated course SLOG. I found that the requirement of  keeping a log of last semester in CSC165 was extremely useful in helping me to reflect on my learning regularly, as well as allowing me to revisit and answer forgotten questions I'd had in previous weeks.

    Beginning with the topic of why geeks should know how to write seems rather fitting, as many of my encounters with fellow geeks over text communication have been rather strenuous. It is quite frustrating to me that, at times, the writings of individuals involved in the technology community can be far more cryptic than the complex systems said individuals implement. Although we are, after all, geeks and English is not necessarily a thrilling area of study for us, we should all most definitely know how to interact with non-geeks, at least over text. Not only this, but we should also know how to interact with our fellow geeks. Since (by assumption) we are logical thinkers with desire for as little ambiguity as possible, it makes the most sense to have enough power over the English language, just like any programming language, to eliminate such ambiguity. This is certainly a function "1337" speak simply does not allow for (pun intended).

    Aside from the issues with clarity with others, I also feel it important to know how to write to ourselves. I've lost count of the amount of times I have written several lines of comments to describe a small role in a snippet of my code, all to completely eliminate my own future misunderstanding. Just as Mark Dalrymple posted about in his blog (Adventures in Debugging - Keeping a Log), leaving notes to oneself in order to pick up work precisely where one left off is exceedingly useful and time efficient.

Also, this proof of the halting problem in the form of a Dr. Seuss style poem is nothing short of awesome.
How Dr. Seuss would prove the halting problem

Friday 28 November 2014

End of Semester Final Post

    As of this coming Monday, we will have reached the end of this semester's CSC165 lectures, all that is left to do now is to complete Assignment #3 and study for the final exam. Looking back on this course as a whole, I can honestly say that I enjoyed it quite a lot. The course has not only aided my ability to think logically, but it has also built up my overall confidence in writing proofs immensely. Such confidence has allowed me to find excitement in writing proofs and inspired me to pursue a double major in Mathematics and CS. All I can say is thank you to my TA Madina and Prof. Heap, you have helped greatly to make my first semester at U of T as enjoyable as possible.

Friday 21 November 2014

Assignment 3 and Reactions to Lectures

    Because of the fall break, I have much less to say about lectures this week than normal. This being said, the introduction of halting is a somewhat difficult concept for me to wrap my head around and I think a fair amount of review and practice is required. I am currently searching for any other student's SLOG who has covered halting in a clear manor, though it seems that finding such a SLOG seems more challenging than the concept of halting.

    With regards to Assignment number 3, I have been exceptionally excited about proving some of the statements. So far I have completed 2 of the 6 proofs (or disproofs) and have been greatly stimulated by each, I can only look forward to my completion of the other 4. More specifically, I found the first statement somewhat challenging to think about and to prove or disprove simply because of my eagerness to complete epsilon delta type limit proofs. This is normally an advantage for me as it was in Assignment 2, however thinking about the statement in this way helped me none during the discovery phase but helped me to improve my problem solving tactics which I found quite enjoyable. Due to my previously mentioned feelings on halting, I do somewhat fear the final proof on Assignment 3 but at the same time believe that it will be an excellent way for me to improve my comfort with this concept.

Friday 14 November 2014

More Interesting Proofs

    This week's material has been quite interesting, our work on more complex proofs involving big-oh and big-omega definitions have been good fun for me and I look forward to practicing more proofs as well as reading over past lecture slides. I believe this may be because I take MAT137 and, as a result, am exposed to many proofs (though I think this course has made me feel much more confident in writing proofs). As a result of this, and now that the step counting has passed, I believe that my overall enjoyment of this course will be restored back to normal. This being said, I do think that step counting will be important on the exam and future courses so I will continue to familiarize myself with this by completing exercises at home and actively participating in CSC108 lectures on the same topic. So far, I can already see a great increase in my abilities to count steps in Python programs and derive upper and lower bounding functions for their worst case scenarios.

    This problem solving episode looks interesting. I am not sure that I understand it completely but I will read it over again, attempting to make some sense at a later date.
http://andrewgoupilcsc165.blogspot.ca/2014/11/week-9-problem-solving.html

     In addition, I received my marks back for our second term test and scored 29.5/30. I am quite pleased with this mark as the proof I felt was the most weak (referenced in last week's post) got a 10/10, but one I felt most confident about (the last proof) lost half a mark. In typing this I have realized that I completely forgot to pick up my graded test from Prof. Heap's office today... but I am quite eager to see what I did incorrectly on the last proof.

    Finally, I thought to share a song I like that relates to math. This song is based off pi , the bass drum pattern corresponds to each digit in pi up to 71 decimal places and there are many other subtitles that I do not care to type. The description of the YouTube video has a quite good description of said subtleties.


Saturday 8 November 2014

Term Test and Tutorial

    This week in class, we continued the topic of bounding sorts and explored big Oh proofs a bit more detail. As stated last week, the actual proofs for big Oh aren't especially challenging for me, however I am still having issues with looking given code and writing equations that bound it, particularly from below. This week's tutorial was certainly helpful for me, however I believe that I scored poorly on the last part of the quiz. Even worse (or perhaps better), I figured out the solution in my head on my way out of the Bahen Centre. This may be a good sign of my grasping of this concept, however I feel that further practice in tutorial  and for homework is most definitely needed.

    We also had our term test this week on Wednesday. I think it went OK for me, out of the three questions I feel quite confident about two. I am, however, bothered about the second question (the almost epsilon-delta style statement), I had a solution in my head and I knew how the proof was supposed to go but there was one issue with the floor function which I could not seem to overcome. Later, in Prof. Heap's office hours, we went through it together and I was missing one easy step that I knew fully well how to do (maybe my sleep deprivation is catching up with me). I do hope that my proof structure and the steps that I wrote are worth some of the 10 possible marks for that question and that I earned a more than mediocre mark. I suppose only time will tell, I will post about the results in my next entry.

In addition, I found this person's slog entry rather interesting.
http://juliaslog.wordpress.com/2014/10/27/a-series-of-unfortunately-inconclusive-events/

Although the problem solving episode was inconclusive, their thought to use python to gain a greater understanding of the problem was quite fascinating for me as I quite often find myself working out some problems using python. Perhaps this is as a strategy I will use in future problem solving episodes.

Friday 31 October 2014

Worst Case Proofs for Bounding a Sort

    This week's classes have been primarily focused on bounding worst case scenarios of a sort function. The concept of this comes quite easily to me, however the initial stages of upper and lower bound proofs have only proven my need for practice with these sorts of problems (no pun intended). This being said, after visiting Prof. Heap's rather busy office hours, my understanding of how the initial expressions seen in each proof relate to the code we were shown (slide "bounding a sort") was greatly strengthened. From the aforementioned step onward, the proofs make quite a lot of sense and are exceptionally easy for me. I believe I simply need to review my notes once more in order to grasp this fully. I am also reading other student's SLOG's but I have yet to find one that seems to express similar feelings as mine toward this concept or help to assist my learning. It seems that many student's SLOG's are incomplete.

    The tutorial this week was also enjoyable and my quiz went exceptionally well (I think). I feel quite rewarded by my studying to make up for my beyond poor performance on last week's quiz. I must say, however, that the tutorial this week was almost identical to last week's. Not that this is a bad thing, I certainly needed the review, but I feel that I could definitely benefit from a tutorial on bounding a sort. Perhaps this is next week's tutorial topic.

    I have also completed Assignment #2, correcting some of my mistakes that I made last week on which to prove or disprove. The epsilon delta style proofs of the floor functions were honestly the high point of my week (academically), much fun was had with these and I may post more details on my proof style once past the due date.

Friday 24 October 2014

More on Proofs and Intro to the Big O

    This week in class we wrapped up our discussions on proofs, finishing with a slide on allowed inferences. Nothing too challenging, this covered some of the more obvious inferences we may make in our proofs, however it was certainly worth going over.  On Wednesday, Prof. Heap introduced the somewhat perplexing concept of sorting and the big O. The idea of counting steps and comparing functions based on their rates of change is not exceptionally difficult for me, though I do fear this will become much harder.

    Unfortunately, I believe that I performed quite poorly on this week's quiz in tutorial. The proof we were asked to do was not that difficult but I erased my first answer thinking I got it wrong. At this point I realized that I was initially correct but did not have enough time to re-write my original solution. This was incredibly disappointing to me but I will try not to worry too much about a quiz worth only around 1% of my final mark.

    This week I have also began work on Assignment #2. So far, I have only decided which statements I will need to prove and disprove and brainstormed some ideas on how to go about doing this. Claims 1.2 and 1.3, being close to the form of the epsilon-delta definition of a limit, were quite interesting for me to think about. As I mentioned in an earlier post, my newly acquired knowledge from MAT137 on this type of proof has helped me approach these claims with much confidence, allowing me to see the fun in proving or disproving. I predict that I will have minimal difficulty with the creative aspects of these proofs, being only annoyed with the tedium of their structures.

Friday 17 October 2014

Week 6

    This week's course content was less than normal due to Thanksgiving on Monday, but the two lectures I did attend were not incredibly challenging for me. This being said, confidence with proofs is somewhat lacking, I infrequently get to that "lightbulb" moment I desperately crave. So, my goal for the coming weeks is to practice writing proofs with the correct structure, and to read over the course notes in order to become more confident with proofs. Today we continued our discussion on basic proofs and Prof. Heap presented a simple epsilon delta proof. This was especially easy for me as I am taking MAT137 and we have already covered epsilon delta proofs.

    On Wednesday I received my marked term test and found that I did quite well. The only question I lost marks on was the last, asking us to give examples of sets that satisfied one condition and not the other. I think I could have completed this correctly had I had more time, but I'm not overly concerned about these lost marks. I think my study strategies have been successful and I'm quite pleased with the results.

Sunday 12 October 2014

Unit Test and Proofs

    This week's course content hasn't been exceptionally challenging for me. The continuation of our learning about proofs seems to make sense, and I look forward to working on the proof by contradiction shown in lecture on Friday (For all elements of the natural numbers n, a prime number exists which is greater than n). Although, the most challenging and important event to me this week was the unit test on Wednesday. I feel like it was exceptionally fair, full of types of questions we have seen in lectures and in tutorials before and it certainly helped to ease some of my worries of exceptionally hard tests and exams with this course. This is not to say that the test was incredibly easy, both question 1 part b and the final question were quite challenging. This being said, I feel like any questions that I did not receive full marks on were completely due to silly mistakes or slight mix-ups on my end, especially with question 1. Overall, I am fairly confident that I did reasonably well.

Sunday 5 October 2014

Week 4

    The course content for this week was not exceptionally challenging for me, though I find the form of proofs slightly annoying. It seems that just as I became sick of proofs in MAT137, we started on them in CSC165, however I am fully aware of the necessity of my understanding of this. I am currently only really annoyed with the tutorial exercises that have been posted, for both exercises everything seems to make sense until the middle.

Example: The proof structure is required for the following statement.

    For all X in the set of integers, for all Y in the set of integers. If X >= Y, then there exists Z in the set of integers where X <= Z <= Y.

(Ignoring most comments in this structure for now.)

    Assume X is a typical integer
        Assume Y is a typical integer
            Assume X <= Y
                Then R
                    .
                    .
                    .
                 Assume there exists Z in the set of integers                                 # This step and
                 Then there exists Z in the set of integers where X <= Z <= Y          # this step are
                                                                                                                  # confusing me
            Then X <= Y implies that there exists Z in the set of integers where X <= Z <= Y
        Then for all Y, If X <= Y, then there exists Z in the set of integers where X <= Z <= Y
    Then for all X, for all Y, If X <= Y, then there exists Z in the set of integers where X <= Z <= Y


    I plan to ask many questions in tutorial on Tuesday as I must prioritize with my studying. I'm getting the impression that the majority of Wednesday's test will be on logical notation so this is will be my primary focus.

Thursday 25 September 2014

Course Content for This Week

    This week's course content has been somewhat fascinating, however, some aspects are still quite tedious to me. My applied study strategies from last week have been quite effective in allowing me to see the fun in each logic problem. Questions involving switching from English to symbolic form and back are certainly some of my favorites. In addition, I have been completing the answers for Assignment 1 with much ease. The tedium occurs in my slight difficulty with the logic laws such as communicative, associative, and distributive laws. This is not due to my inability to see each pattern and why each rule works, it is simply because of the way I look at each statement. I believe that I could figure out each identity on the go without needing to memorize the patterns. I am far more interested in knowing why things work than memorizing patterns and types of questions. However, it may be the unfortunate case that I must memorize these in order to save time and brain power on tests and exams. Only future quizzes and tests will be indicators of this.

Tuesday 16 September 2014

Streetcar Drama Solution Attempt

Streetcar Drama (from lecture slides) Solution Attempt

I approached this problem by first assuming that person B has 3 children, all older than 1, with each age a positive integer and one eldest, so I need to find 3 integers. The product of all ages is equal to 36 and I set the sum of all ages equal to the variable y. I then set the age of Child 1 to the variable a, the age of Child 2 to the variable b, and the age of Child 3 to the variable c. Initially, my instincts told me to look for clues while attempting to use 3 variable substitution.

I started thinking about possible situations, perhaps person B has twins or even triplets. Person B must have either one eldest and two younger twins, or children all of different ages. I ruled out triplets because the children's ages could not be equal to a cube root of 36 while remaining an integer. I also disregarded the addition of the eldest child playing piano because I felt that it was unnecessary.

I then thought about possible ways that person A might not be able to figure out the ages based on 2 equations, which are:

In the case of all different ages:

× b × c = 36
a + b + c = y

In the case of one eldest and two younger twins:

In this case a = c, so we can write a in place of c
a × × b = 36
a + a + b =y


Because of person A's response to the sum of the ages ("That still doesn't tell me how old they are."), it seems clear that this wasn't enough information for person A to use algebra and solve. In the case of twins and one older child, person B should have been able to use substitution to solve (2 unknowns in each of the 2 equations). But she or he did not, which leads me to believe that there must have been 3 unknowns in each of the 2 equations (one can not use algebra to solve this).

This completely stumped me until I began writing factors of 36.

× 18
× 9
× 3 × 3
× 2 × 9
× 2 × 3 × 3
× 12
× 2 × 6

I then realized that 3, 2, and 9 are the only set of 3 factors of 36 with all different values. I concluded that these must be the ages of each child.

This being said, I believe my solution is flawed, because if I assume that Person A could potentially do 2 variable substitution using mental math, it would also be reasonable to assume that he or she could figure out 3 different factors that multiply to 36.

Overcoming Frustration with Logic Questions


    Spending the past two weeks on basic logic in CSC165 has been incredibly tedious and somewhat annoying to me. Although I fully understand the necessity for these core ideas, I still find myself more thrilled by challenging problems such as, "Streetcar Drama" (presented several lectures ago). I'm working to appreciate these concepts, completing all given questions as fast as possible and reading ahead in the course notes, in an attempt to find pleasure in the completion of each new question. I felt that this week's tutorial as well as the quiz were exceptionally easy partially due to my study habits. I'm quite sure that with continued commitment to the course material, the level of difficulty will remain manageable for me.