It's been a long semester, but I'm proud to have taken this course (and I think I'll do spectacular on the final exam). Most importantly, I want to thank my TA (no, this is not a kiss-up attempt) for explaining stuff (AKA, everything in this course) to me so that we don't fail the quizzes (or the midterms!).
I'll be honest, I haven't gone to class lately, but only because I have term tests for other courses in the afternoons! I hope I didn't miss much.
All in all, I think this semester has been successful! After all, I have A's in all my assignments and my tests.
From what I can tell from the Assignment sample solutions, my Assignment 3 went well. I'm also extremely proud of myself for coming up with the function xsin(x * pi)!
So where does this leave me? Well, I'm looking at a 90-ish average, but this final exam will seal the deal. I'll have my test in a week or two, so I'll have plenty of time to study. As long as I review the earlier course material and go over previous assignments and proofs, I'll be fine, right?
Well, good luck, and may the odds be ever in your favor.
And I don't quite agree with this post. Math has nothing to do with CSC165!
http://tsod165.blogspot.ca/2014/12/week-12-1124-1130-conclusion.html
Tuesday, December 2, 2014
Saturday, November 22, 2014
Halt! Thinking Not Allowed!
I don't think I've ever been more confused in this course than when we went over Halt. It's just too paradoxical for me. From what I can gather, Halt doesn't work because it works when it doesn't work but doesn't work when it works.
Yeah, I don't know.
And Navel_Gaze is the name for the other function that contains Halt. It's an interesting name, I admit, and it is certainly memorable. It's just that the imagery of a "navel gaze" is somewhat disturbing.
This is to hoping that the next tutorial will explain things to me.
Big Oh seems to make sense to me, but apparently this isn't the case for everyone.
http://ryancsc165.blogspot.ca/
Yeah, I don't know.
And Navel_Gaze is the name for the other function that contains Halt. It's an interesting name, I admit, and it is certainly memorable. It's just that the imagery of a "navel gaze" is somewhat disturbing.
This is to hoping that the next tutorial will explain things to me.
Big Oh seems to make sense to me, but apparently this isn't the case for everyone.
http://ryancsc165.blogspot.ca/
Tuesday, November 18, 2014
Thank God for Tutorials
I just want to say (shamelessly) that I think I learn more in tutorials than my lectures.
The previous week, I had (more or less) no idea what was going on. How do I prove two polynomials are unequal? How do I prove Big-Oh or Big-Theta? How does anything work?!
But after my tutorial and a few examples, everything makes sense. I think it's mostly because the tutorials are two hours long, but the questions are very short. This means that we get a lot of time for our TA's to thoroughly explain the concepts behind the questions!
Hooray for TA's. I think I might actually pass the final exam!
How do you do these proofs?:
http://longcsthought.blogspot.ca/
The previous week, I had (more or less) no idea what was going on. How do I prove two polynomials are unequal? How do I prove Big-Oh or Big-Theta? How does anything work?!
But after my tutorial and a few examples, everything makes sense. I think it's mostly because the tutorials are two hours long, but the questions are very short. This means that we get a lot of time for our TA's to thoroughly explain the concepts behind the questions!
Hooray for TA's. I think I might actually pass the final exam!
How do you do these proofs?:
http://longcsthought.blogspot.ca/
Labels:
Big Oh,
Big Theta,
concepts,
final exam,
long tutorials,
magnets,
questions,
TA,
thanks,
time,
tutorial,
tutorials,
Week 10
Saturday, November 1, 2014
How do I Count?
Counting is, by far, the most difficult task I've had to do this week.
You see, when you are given a program, you can evaluate how efficient it is by counting the number of "steps" it takes to accomplish something.
So if I gave you a program that said something like:
Then you would have two steps. One step to initialize x and another step to print x. Simple right?
Not if we're in CSC165.
Now what if we have a for loop that loops over a list? Well, in this case, we would have to count the number of steps inside the for loop and then multiply that by the number of loops. So if we put our "Hello world" program above into a for loop, we would have something like 2n steps where n is the number of times we loop!
Which isn't bad. Until you start proving Big-Oh, the upper bound. Just looking at the proof is giving me a headache. Sometimes I feel like the proofs work along the lines of "Step 1, step 2, [insert magic here], conclusion."
Looks like I'll have to review the course notes. The notes seem to make sense so far!
I feel like this person's view on proofs is the same resounding view as all of us.
http://lukasfrantzkecsc165.blogspot.ca/2014/10/slog-csc165-week-6.html
You see, when you are given a program, you can evaluate how efficient it is by counting the number of "steps" it takes to accomplish something.
So if I gave you a program that said something like:
x = "Hello world"
print(x)
Then you would have two steps. One step to initialize x and another step to print x. Simple right?
Not if we're in CSC165.
Now what if we have a for loop that loops over a list? Well, in this case, we would have to count the number of steps inside the for loop and then multiply that by the number of loops. So if we put our "Hello world" program above into a for loop, we would have something like 2n steps where n is the number of times we loop!
Which isn't bad. Until you start proving Big-Oh, the upper bound. Just looking at the proof is giving me a headache. Sometimes I feel like the proofs work along the lines of "Step 1, step 2, [insert magic here], conclusion."
Looks like I'll have to review the course notes. The notes seem to make sense so far!
I feel like this person's view on proofs is the same resounding view as all of us.
http://lukasfrantzkecsc165.blogspot.ca/2014/10/slog-csc165-week-6.html
Labels:
being stepped on by UofT,
counting,
course notes,
CSC165,
difficult,
efficiency,
hello world,
hopes,
laziness,
loop,
n,
off by one error,
programming,
proofs,
simple,
steps,
upper bound. Big Oh,
Week 8
Sunday, October 19, 2014
The Limits Strike Back
Well, it looks like limits have come back to haunt me. Although in a different form.
The limits in calculus are defined as
Which is why I think we should have spent more time on limits.
Also, this student sums up how I felt about the exam fairly accurately (too much second guessing!):
http://hayleycsc165experiences.blogspot.ca/2014/10/5th-week-into-csc165.html
The limits in calculus are defined as
For all epsilons greater than zero in the set of reals, there exists a delta greater than zero in the set of reals, such that if the distance of a value x from a value c is less than delta and greater than zero, then the distance between the function and its limit is less than epsilon.Which makes sense, until you see the definition of limits in CSC165, which is basically the same thing but you don't actually understand what a limit is. You just stare at this symbolic definition for a limit and think, "Okay, now how can I prove this?"
Which is why I think we should have spent more time on limits.
Also, this student sums up how I felt about the exam fairly accurately (too much second guessing!):
http://hayleycsc165experiences.blogspot.ca/2014/10/5th-week-into-csc165.html
Labels:
c,
calculus,
CSC165,
delta,
epsilon,
forms,
ghosts,
Greek alphabet,
haunts,
inequalities,
limits,
positive,
positive reals,
proofs,
reals,
Star Wars,
symbols,
Week 6,
x,
zero
Monday, October 13, 2014
How many piano tuners can a Fermi Problem solve for is a Fermi Problem can solve for piano tuners?
So! I decided to give my first go at a math problem that doesn't involve squirrels.
Of course, where the heck am I supposed to get a math problem? I decided to use a combination of Bing and Wikipedia (I used Bing to find the Wikipedia article of which is excerpted):
And I like how I can use this proof as a summary for this class!:
http://deerickchau.blogspot.ca/2014/10/oct-6-to-oct-10.html
Of course, where the heck am I supposed to get a math problem? I decided to use a combination of Bing and Wikipedia (I used Bing to find the Wikipedia article of which is excerpted):
The classic Fermi problem, generally attributed to Fermi,[2] is "How many piano tuners are there in Chicago?" A typical solution to this problem involves multiplying a series of estimates that yield the correct answer if the estimates are correct. For example, we might make the following assumptions:
- There are approximately 9,000,000 people living in Chicago.
- On average, there are two persons in each household in Chicago.
- Roughly one household in twenty has a piano that is tuned regularly.
- Pianos that are tuned regularly are tuned on average about once per year.
- It takes a piano tuner about two hours to tune a piano, including travel time.
- Each piano tuner works eight hours in a day, five days in a week, and 50 weeks in a year.
Okay, so let's hammer down that G. Polya layout.
- Understanding the Problem!
- Well, what do we want to solve for?
- We want to know "How many piano tuners there are in Chicago."
- So we know that our answer should be in the form of:
- "There are (blank) number of piano tuners in Chicago."
- By piano tuners, we're talking about the human beings that walk around tuning pianos!
- Well, what do we know?
- If we only take into account the question itself, I can't really do anything without making at least a few assumptions since I don't know anything about pianos, piano tuners, or Chicago other than the fact that Chicago is a big city somewhere in the northern region of the United States!
- The line after the question confirms this idea by claiming that a "typical solution... involves multiplying a series of estimates."
- So what are the estimates? Let's use the ones given! Let's simplify them for convenience and take all approximations as absolutes.
- There are 9 million people in Chicago.
- There are 2 people in each household in Chicago.
- 1 out of 20 households has 1 piano.
- No household has more than 1 piano.
- Pianos are tuned 1 time a year.
- Piano tuners spend 2 hours tuning pianos.
- Piano tuners spend all their work time tuning pianos.
- Each piano tuner works 8 hours a day.
- Each piano tuner works 5 days a week.
- Each piano tuners works 50 weeks a year.
- Okay, from what I can tell, that's everything we need to know!
- Devising a Plan!
- Find a connection between the data and the unknown.
- Okay, we know that we have a bunch of numbers for each estimate, and that each estimate seems to be related to the one before it!
- For example, there are 9 million people in Chicago.
- There are also 2 people in each household in Chicago.
- We can assume that Chicago is just stating our domain, so we know we're dealing with the same people in the same city!
- Okay, so if there are are 2 people per household, then our number of households must be half the number of people!
- So we know that there are 4.5 million people in Chicago!
- So we can maybe solve for each newly introduced variable (like the number of households, the number of regularly tuned pianos, etc.) with information in the previous line!
- Plan A!
- We can convert each bit of information into a ratio and use dimensional analysis to get an answer!
- The numbers may be big, so a calculator will help!
- Carrying Out the Plan!
- Okay, let's convert everything into easy to dimensional analyze ratios.
- (9 million people)
- (2 people)/(household)
- (1 piano)/(20 household)
- [(1 tune)/(year)]/(piano)
- (2 hour)/(tune)
- (8 hour)/(workday)
- (5 workday)/(workweek).
- [(50 workweek)/(year)]/(piano tuner)
- So there are a few too many parentheses and not enough numbers. Let's simplify them.
- 9,000,000 people
- 2 people/household
- 20 household/piano
- tune/(year*piano)
- 2 hour/tune
- 8 hour/workday
- 5 workday/workweek
- 50 workweek/(year*(piano tuner))
- And now let's multiply them all together remembering that each ratio's numerator is equal to the denominator.
- (9,000,000 people) * (household/(2 people)) = 4,500,000 household
- (4,500,000 household) * (piano/(20 household)) = 225,000 piano
- (225,000 piano) * (tune/(year*piano)) = (225,000 tune)/(year)
- (225,000 tune/year) * (2 hour/tune) = (450,000 hour/year)
- (450,000 hour/year) * (workday/(8 hour)) = 56,250 workday/year
- (56,250 workday/year) * (workweek/(5 workday)) = 11,250 workweek/year
- (11,250 workweek/year) * ((year*piano tuner)/(50 workweek)) = 225 piano tuner
- So our result is 225 piano tuners. Can we put it into our answer sentence?
- "There are 225 piano tuners in Chicago."
- Yup, this is the right answer!
- Looking Back!
- Can we check our result? The answer is yes. We can check it with another person by reading the Wikipedia article and seeing that they also got 225 piano tuners.
- The actual number is reported to be 290!
- From these estimates, we can see that even though we didn't know exactly what the answer is, we landed at a pretty close result just from making approximated assumptions.
- However, upon closer examination, our margin of error is approximately 23%. That's pretty high!
- Imagine being in charge of estimating the number of people that will vote for a certain person during the Presidential elections (in the United States). Do you really want to be that one guy that miscounted 23% of the polls? I heard margins of error for those polls tend to be around 5-15%!
- And do you want to be that person that miscounted for 23% of the people that desperately need supplies after a natural disaster? If there were hundreds or thousands of people, you could potentially kill hundreds or thousands of lives easily.
- So what does this tell us? I think this means that although Fermi was awesome at estimating for a small number of people, estimations like this are bad if you're trying to estimate a larger population!
And I like how I can use this proof as a summary for this class!:
http://deerickchau.blogspot.ca/2014/10/oct-6-to-oct-10.html
Labels:
bad text editor,
Bing,
Chicago,
dimensional analysis,
Fermi,
households,
math,
months,
piano,
piano tuners,
population,
problems,
squirrels,
time,
tuning,
Week 5,
weeks,
wikipedia,
years
Saturday, October 4, 2014
Exam!
Brrrr, the exam is giving me the chills. From what I can tell, our test should mostly cover simple things like negation, but I can't say for sure. I'm just glad we won't have to do proofs! The proofs in MAT137 are confusing enough; I don't need any more to confuse me. Although technically Professor Heap said we might have "a little bit of proofs." I hope it won't be too bad.
Speaking of proofs, we started doing them and the structure seems to be more simple than the MAT137 proofs, but I don't really get them. I mean, sure, it's great that we have everything organized under domains and assumptions, but proofs can't possibly be this simple. Otherwise, I would actually understand MAT137.
So, I should probably make my exam cheat sheet now. Yup, we get a cheat sheet, 8 by 11, according to Professor Heap. We can write anything we want on it! My friends are writing proofs on there, but I plan to just write down equivalent statements. For example, the negation of an implication P implies Q is equivalent to not P implies not Q.
And reading this slog, I remembered that I have the slides to fall back on in my studying:
http://csc165ps.blogspot.ca/2014/09/week-3.html
Well, good luck, everyone.
Speaking of proofs, we started doing them and the structure seems to be more simple than the MAT137 proofs, but I don't really get them. I mean, sure, it's great that we have everything organized under domains and assumptions, but proofs can't possibly be this simple. Otherwise, I would actually understand MAT137.
So, I should probably make my exam cheat sheet now. Yup, we get a cheat sheet, 8 by 11, according to Professor Heap. We can write anything we want on it! My friends are writing proofs on there, but I plan to just write down equivalent statements. For example, the negation of an implication P implies Q is equivalent to not P implies not Q.
And reading this slog, I remembered that I have the slides to fall back on in my studying:
http://csc165ps.blogspot.ca/2014/09/week-3.html
Well, good luck, everyone.
Labels:
8 by 11,
cheat sheet,
cheating,
cold,
death,
exam,
friends,
Heap,
implication,
luck,
MAT137,
negation,
P implies Q,
panic,
pencils,
Professor,
Professor Heap,
proofs,
Week 4,
writing
Saturday, September 27, 2014
September 26, 2014 - Let me tell you a story.
Let me tell you a story.
There was once a young squirrel by the name of Squirrely Squirrel the Squird.
This is Squirrely
Now, Squirrely loves nuts. Some say that Squirrely is never seen without a nut.
In fact, given P, a set of all pictures, S, a set of all pictures of Squirrely, and N, a set of all pictures with a nut, I can say that for all x in P such that for all y in P, x is in S if and only if y is in N. That is to say, for every single picture in the universe, that picture is a picture of Squirrely if and only if that picture has a nut. In fancy notation (for fancy people), that statement is written as ∀x∈P, ∀y∈P, x∈S ⇔ y∈P
Now, what prevented me from saying "for all x in S, x is in N"? ∀x∈S, x∈N
Or what about "for all x in P, if x is in S, then x is in N"? ∀x∈P, x∈S ⇒ x∈N
They're all equivalent statements... or are they?
Answer, these statements are not equivalent! My original statement claims that every picture of Squirrely has a nut AND every picture of a nut has Squirrely. The latter two statements only imply that Squirrely is always seen with a nut, but they say nothing about nuts being seen with Squirrely.
Yes, if there is a nut in the world, the nut will always be in the clutches of Squirrely.
Which brings us to our current point: logic is hard.
P.S. This is a cool website for symbols, but it keeps making a gray background when I copy and paste: http://en.wikipedia.org/wiki/List_of_logic_symbols
P.P.S. This is a link to a cool programmer who has no idea what he's doing, like me! I mean, we're both struggling to get through this course.
http://beardlessprogrammer.blogspot.ca/
There was once a young squirrel by the name of Squirrely Squirrel the Squird.
This is Squirrely
| Squirrely Squirrel the Squird holding a nut. |
Now, Squirrely loves nuts. Some say that Squirrely is never seen without a nut.
In fact, given P, a set of all pictures, S, a set of all pictures of Squirrely, and N, a set of all pictures with a nut, I can say that for all x in P such that for all y in P, x is in S if and only if y is in N. That is to say, for every single picture in the universe, that picture is a picture of Squirrely if and only if that picture has a nut. In fancy notation (for fancy people), that statement is written as ∀x∈P, ∀y∈P, x∈S ⇔ y∈P
Now, what prevented me from saying "for all x in S, x is in N"? ∀x∈S, x∈N
Or what about "for all x in P, if x is in S, then x is in N"? ∀x∈P, x∈S ⇒ x∈N
They're all equivalent statements... or are they?
Answer, these statements are not equivalent! My original statement claims that every picture of Squirrely has a nut AND every picture of a nut has Squirrely. The latter two statements only imply that Squirrely is always seen with a nut, but they say nothing about nuts being seen with Squirrely.
Yes, if there is a nut in the world, the nut will always be in the clutches of Squirrely.
Which brings us to our current point: logic is hard.
P.S. This is a cool website for symbols, but it keeps making a gray background when I copy and paste: http://en.wikipedia.org/wiki/List_of_logic_symbols
P.P.S. This is a link to a cool programmer who has no idea what he's doing, like me! I mean, we're both struggling to get through this course.
http://beardlessprogrammer.blogspot.ca/
Labels:
American spelling,
black,
difficult,
fancy,
green,
iff,
implication,
material equivalence,
metal,
nuts,
pictures,
sentences,
squirrels,
Squirrely,
statements,
symbols,
Week 3,
wikipedia
Friday, September 19, 2014
September 19, 2014 - "It was a dark and drowsy morning"
Hello, world!
It appears that the universe is in need of another one of my blogs again.
Fun fact, 1:45 AM is typically not the best time to be blogging.
Fun fact, 1:45 AM is typically not the best time to be blogging.
To posterity: the most important thing about CSC165 is that you should never schedule your blog night to be the night before the due date. For example, tonight (or I guess this morning?) I'm in a hurry to finish this blog and all of my other work I scheduled for Friday just so I can have a day off on Friday for other scheduled activities.
Speaking of CSC165, I have to say that these past two weeks have been interesting. Either that, or my sleep deprivation is taking the best out of my brain's ability to logic. For starters, I learned that Python has a set builder notation to not only save me time when creating detailed lists, but also to bombard my computer with infinite loops in a more sophisticated fashion (have yet to test)!
Then everything dissolved into "What."
I have a new proposition for mankind: The "What" theory. It goes something like this - "If the problem involves logic, then brains are bound to melt." For example, the "any" and "all" functions seemed simple enough, but it's important to read something like "x in s2 for x in s1" as:
I have a new proposition for mankind: The "What" theory. It goes something like this - "If the problem involves logic, then brains are bound to melt." For example, the "any" and "all" functions seemed simple enough, but it's important to read something like "x in s2 for x in s1" as:
Each element given in s1 is also an element in s2. The problem is that I intuitively think that the subset should have been written first to avoid confusion. If I made the Python language, I would have made it more simple, like "s1 subset s2."
Then we have the wonderful Venn diagrams which confused everyone! I think the Venn diagrams were an alright exercise to work out the kinks of the logic process, but the X's and O's were very confusing! We even had a debate in my tutorial over whether or not we should have minimized the usage of X's and O's if the X's and O's were already implied. Wow, even talking about it is starting to confuse me.
I suppose the one problem I have with this course is the lack of practice problems! I don't know what to do in order to improve my grade if I understand the course material but I'm not familiar with the course material! I can only check if my three Python programs passed three tests so many times.
But hey, as long as I stay optimistic, what's the worst that can't happen? Hooray for bad jokes?
And hey, here's another example:
"'If you're rich, then you must have a job in the field of computer science' is a false statement (counter example: Justin Bieber)."
Source:
http://165slogs.blogspot.ca/search?updated-max=2014-10-12T19:38:00-07:00&max-results=7
I suppose the one problem I have with this course is the lack of practice problems! I don't know what to do in order to improve my grade if I understand the course material but I'm not familiar with the course material! I can only check if my three Python programs passed three tests so many times.
But hey, as long as I stay optimistic, what's the worst that can't happen? Hooray for bad jokes?
And hey, here's another example:
"'If you're rich, then you must have a job in the field of computer science' is a false statement (counter example: Justin Bieber)."
Source:
http://165slogs.blogspot.ca/search?updated-max=2014-10-12T19:38:00-07:00&max-results=7
Subscribe to:
Posts (Atom)