Saturday, November 29, 2014

Last Assignment!

Is it really time for Assignment 3 again?

I'm in the middle of trying to prove number 3, but I feel like it's too simple.
Is it a trick question?

I have to prove that 2^n < 3^n .
It's obviously true, but just stating that it's true (since I cannot think of any way to mathematically prove that it's true) is probably not the right way to justify it.

Update: I'll probably have to look up some ways to prove it by mathematical induction.

Saturday, November 22, 2014

Big Os and Omegas

What is the meaning of these?
It assesses the running time of a program?
I'm thinking we have to graph a function showing the running time, and then we have to estimate approximately how long it will take for the code to execute.

I'm just unsure of what c and B mean.
I know B is the breakpoint and c is the constant that is multiplied with the consequent of the definition of big O, but I'm not sure what it represents when translated graphically (which is how I'm attempting to define it, since that was what we were shown in tutorial.).
At some breakpoint B, it holds true that the consequent function will be greater than the function in the antecedent?
And they are actually the same functions except the consequent is multiplied by some constant?

Sunday, November 9, 2014

A2

Proving the converse of number 2 on the second assignment, I had to find an example of m and n so that it satisfies the conjunction statement of the proof, and then I had to prove that for all k's that the proof holds true. Halfway through the proof, I thought that I had not proved that the proof holds true for all k's, but just for the k's that depends on the existential quantifier associated with the m and n.

But then I remembered that the order of the quantifiers matter.
All the k's were supposed to be dependent on the numbers I chose for m and n.

Tuesday, November 4, 2014

Quiz week of Nov 3

Just came back from writing the quiz.

Halfway through the explanations of sum_up, I realized I read the code wrong.
And then time ran out.

So I realized that sum_up(2) = 3
but I put 2.

I'm a little disappointed in myself, but at least I know what I did wrong?
Instead of moving up to the inner while loop, I went back to the line that assigns j to i
So that's why I got the wrong answer.

So the general formula was supposed to be
s = n + (n-1) + (n-2)

i.e. s = n(n+1) / 2

I hope it doesn't affect my mark too much.
Now I'm getting even more disappointed in myself.

I'm feeling a lot like Liz Lemon right now:



Should have spent more time thinking about the code.

Monday, October 20, 2014

Proof Structures

Given a statement to prove, the proper way to start off the proof is to assume the variables that are assigned the "for all" quantifier are true.
Then for the following variables (say x) assigned the existential quantifier, you have to find an actual example that belongs in the set that satisfies the conditions.
It is sometimes very difficult to find an example that will fit into the proof, so it may be easier work backwards.
That's why in the proof, we say variable x is equal to, in the beginning, an unknown element.

We start at the implication and rearrange the antecedent in such a way that resembles to what we are trying to prove in the consequent.
Most of the time, x can be easily found from the scratch work done from the process of rearranging the antecedent.

Going back to the proof structure, we now know what x is, and so now we can finish the full proof with an x that works, and that will complete the proof.

Saturday, October 11, 2014

Week 5

Just completed week 5. I've done numerous quizzes (which were pretty good) and a term test.

The test was manageable, but I wasn't think through the last question properly. I had to create 3 sets to prove one statement false and another true. I set one of them to be even numbers and the other to be odd. I don't know why I didn't just sign a few numbers to each of the sets. Halfway through the question, I realized I interpreted the statements wrong but I had no time to change it. So that was pretty upsetting.

Apart from that question, the rest of the test was pretty good.

We are starting to go into proving mathematical claims now, which was never really something that I was good at.
What I've gotten from class so far is to assume the things stated in the antecedent, and somehow use that and tweak it so that it resembles the consequent. It might sometimes be easier to try and work out the consequent first so that we know what we should be doing to the antecedent.

Lastly, while studying for the term test, I actually tried to figure things out with truth tables and yes, it works.

Thursday, October 2, 2014

After doing 3 tutorial exercises and an assignment, I've found out that it makes it much easier to translate sentences given to me into symbols. If I assign quantifiers, implications, conjunctions and disjunctions, it is much more easier to solve the negation, converse, or contrapositive of the claim.

When I'm supposed to negate a sentence, I know I have to write it so that the sentence becomes false if it was originally true, but it's much easier to see when it's written symbolically.