I wonder if for every algorithm a [professional (working somewhere respectable and getting paid( for whatever that is worth))] computer programmer writes- do they test it across multiple computers to find various running times, compare their algorithms to other similar algorithms and find the running times of those algorithms and then finally, write big O proofs to precisely determine if their algorithm is faster than those other similar algorithms?
That seems to be a lot of work no? And if the algorithm is slower- how frustrating!
Wednesday, March 24, 2010
Friday, February 12, 2010
On Proofs
I do not particularly like solving proofs because I tend to run into problems. Writing proofs requires two primary attributes: having a familiar grasp of the syntax or formatting of the proofs and having an understanding of how the information given in the definition can be manipulated to achieve the end, desired result. I always struggle with one or the other. I am taking PHL245 (modern symbolic logic) and MAT137 (calculus and analysis) and I am finding that they and CSC165 are all blurring together. So far PHL245 and CSC165 have covered almost identical material-with the exception being that there is more emphasis on philosophical topics in the philosophy course and more mathematical topics in this one- and although the same concepts are being taught, the proof structures are different.
Often, problems in PHL245 are restricted to a certain set of rules in solving proofs (to encourage ingenuity). For instance let say they is a statement of the form:
(P -> S), (S v R) -> T, T -> ~Q, ~Z ->Q, Therefore, P -> Z
The proof for this would be int this form:
1 Show P -> Z
2 P Assume cd
3 Show Z
4 S P1, 2 MP
5 S v R 4 ADD
6 T P2, 5 MP
7 ~Q P3, 6 Mp
8 ~~Z 7, P4 MT
9 Z 8 DN
10 P -> Z 2, 3 cd \\
Although I do not think anyone could fail to understand this logic of this argument, they may not
understand the syntax. For instance:
4 S P1, 2 MP
Means that on the forth line of the proof, S can be implied because premise 1 says that P implies
S, and line 2 assumes P.
However CSC165 contains a similar and strict, yet slightly different syntax. If the above proof is
written out differently for PHL245, it will be wrong. In a slightly different language: P->S, P, Therefore S. And slightly different again: (P->S) ^ P, by Implication, S. The word Implication is synonymous with the abbreviation MP which means Modus Ponens or affirming by affirming.
The reason that one system of formatting is adopted of another is for the integrity of the community. If two people try to talk to each other, each speaking a different language and hearing a language foreign to them, I will not matter if the meaning of the words form a consistent whole. They have no idea what each other are saying! This adopting a format which everyone will use to do the same function is important.
The important lesson here, is to be careful learning too many languages at once. There is an advantage to doing this. By taking PHL245 and CSC165, many of the same topics are presented in slightly different lights. There have been times when while stuck in one course, I have used my knowledge of the other to solve the problem. But at the same time, one should be careful not to mix the two formats together. There have been times when I've starred at a problem for a half an hour simply because the syntax did not seem familiar in the context. The solution to all of this is to do a lot of practice.
The other have of solving proofs is the manipulation of the parts of the problem to achieve the desired result. Every proof is a little different but many are at least similar. I'll go into more detail later, but it is suffice to say that the only way to become good at proofs is to practice. If one is lacking motivation then that person had best be a natural genius. If one is not a natural genius and also lacking motivation-like myself-I am not sure what to say. Or else I would have solved my life's many problems already
Often, problems in PHL245 are restricted to a certain set of rules in solving proofs (to encourage ingenuity). For instance let say they is a statement of the form:
(P -> S), (S v R) -> T, T -> ~Q, ~Z ->Q, Therefore, P -> Z
The proof for this would be int this form:
1 Show P -> Z
2 P Assume cd
3 Show Z
4 S P1, 2 MP
5 S v R 4 ADD
6 T P2, 5 MP
7 ~Q P3, 6 Mp
8 ~~Z 7, P4 MT
9 Z 8 DN
10 P -> Z 2, 3 cd \\
Although I do not think anyone could fail to understand this logic of this argument, they may not
understand the syntax. For instance:
4 S P1, 2 MP
Means that on the forth line of the proof, S can be implied because premise 1 says that P implies
S, and line 2 assumes P.
However CSC165 contains a similar and strict, yet slightly different syntax. If the above proof is
written out differently for PHL245, it will be wrong. In a slightly different language: P->S, P, Therefore S. And slightly different again: (P->S) ^ P, by Implication, S. The word Implication is synonymous with the abbreviation MP which means Modus Ponens or affirming by affirming.
The reason that one system of formatting is adopted of another is for the integrity of the community. If two people try to talk to each other, each speaking a different language and hearing a language foreign to them, I will not matter if the meaning of the words form a consistent whole. They have no idea what each other are saying! This adopting a format which everyone will use to do the same function is important.
The important lesson here, is to be careful learning too many languages at once. There is an advantage to doing this. By taking PHL245 and CSC165, many of the same topics are presented in slightly different lights. There have been times when while stuck in one course, I have used my knowledge of the other to solve the problem. But at the same time, one should be careful not to mix the two formats together. There have been times when I've starred at a problem for a half an hour simply because the syntax did not seem familiar in the context. The solution to all of this is to do a lot of practice.
The other have of solving proofs is the manipulation of the parts of the problem to achieve the desired result. Every proof is a little different but many are at least similar. I'll go into more detail later, but it is suffice to say that the only way to become good at proofs is to practice. If one is lacking motivation then that person had best be a natural genius. If one is not a natural genius and also lacking motivation-like myself-I am not sure what to say. Or else I would have solved my life's many problems already
Friday, January 29, 2010
Another tip for solving problems - work slowly. I found that when trying to translate a sentence into symbolic logic to determine its truth value, I would often get ahead of myself and screw up. I've spent ridiculous amounts of time trying to work out simple errors, like the fallacy of affirming the consequent. If I became very frustrated, I would write out every step of the problem in greater detail than was probably necessary. Slow it down and take it real easy.
Important tip for problem solving - go to sleep on time. When trying to operate with fewer hours of sleep, I feel that I become irritable and I suffer from lack of concentration. Its becomes very difficult to concentrate on the problem and very easy to allow myself to play Mass Effect 2, which is a pretty cool game.
Subscribe to:
Posts (Atom)