Tuesday, December 2, 2014

Finally Done

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

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/

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/

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:

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

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
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

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):

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:
  1. There are approximately 9,000,000 people living in Chicago.
  2. On average, there are two persons in each household in Chicago.
  3. Roughly one household in twenty has a piano that is tuned regularly.
  4. Pianos that are tuned regularly are tuned on average about once per year.
  5. It takes a piano tuner about two hours to tune a piano, including travel time.
  6. 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.

  1. 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!
  2. 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!
  3. 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!
  4. 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!
Read more about Fermi here: http://en.wikipedia.org/wiki/Fermi_problem

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

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.