Sunday, January 27, 2013

Weekly Log2

Something new I learned this week:

This week I learned the steps to solve a problem. Take the classic paper-folding example, first step is to understand the problem: "Given the number of folds, figure out the crease pattern." It is important to know that the crease pattern means whether the lines made by paper folding are up or down. Then we need to devise a plan, like "try small cases and look for a pattern". Then execute the plan, and look back. In the first class, when professor brought up this question, I had no clue what he was talking about, the core issue was misunderstanding of the word "crease".After asking my neighbor,I finally figured it out.


I also learned  the evolution of computers and programs. The history of computers can be traced back to 5 thousands years ago, the ancient tally system: clay tablets and abacuses.The number system Hindu-Arabic in ancient world uses positional notation.

In machine age, there arises gears to extract taxes, called Pascaline. During industrial revolution, French inventor Jacquard invented Jacquard loom that could automatically weave complicated patterns. Babbage difference engine would have evaluated polynomials if the fund was adequate.All those inventions and progresses lead to our computers today.



Reflection about my study method:

I think it is important to get out the shell and ask for help actively. I used to be ashamed of my inadequate English and tried to hide it by keeping silent when encounter problems, now I realize that the more you hide, the less likely you will ever improve.


Questions and Challenges:

However, even I can digest the general information, I can't understand
analog computers model wold using smoothly-varying quantities such as water", what is analog computers model? And why is it "smoothly-varying"? Hope my knowledgeable TA can help me out.

My achievement:

I also learned another interesting function of DrRacket, which is designing definition. I can  handle the basic operation such as defining identifiers to stand for values,defining a function with a place-holder for a value used repeatedly.

Friendly remainder for everyone:

One important remainder for everyone especially myself -- always check your email -- because I don't know my tutorial room changed from MP to BA, I missed my tutorial...True story.




Thursday, January 17, 2013

Weekly Log 1: Starting to Get Familiar with Algorithms


Before listening to the Computer Science lecture, I, as a not-so-much tech-savvy type, believed that computers tend to be more like artificial intelligence, which is manipulated by humans and secretly planning to free from chains. In addition to fear and concern, I, like everyone else, rely on computer programs and applications tremendously without thinking about how those amazing tools were created. After the first lecture, I sort of gain a sense of why humans civilizations need such a machine to promote progress and how programs are created. The thing is, we need computers to do work for us and facilitate our life (obviously they won't get bored). We create programs by giving computers direct and definite commands step by step to solve certain problems. Like tutoring a toddler to make a peanut butter sandwich, we need to give very specific instructions to avoid vagueness and misunderstanding.

A good example of creating simple algorithm is "Euclid's GCD" using DrRacket. To be honest, I was completely lost when Professor Heap talked about Euclid's method. Then after reading the numeric examples on Wikipedia, I understand. Now everything makes sense. However, the thing confuses me the most is the plenty of brackets needed as part of input. Guess I will develop my computer mindset along with the course.
Week 2 we dig deeper about algorithms and basically understood that algorithms are not perfect. There is no such algorithm that can solve every problem. Partially because sometimes the problem itself is self-contradictory like " this statement is false", the algorithm to decide whether declarative English sentences are true cannot process it. 

Another drawback is that algorithms may take too long when the operation is lengthy such as Fibonacci number, (by definition, the first two numbers in the Fibonacci sequence are 0 and 1 (alternatively, 1 and 1), and each subsequent number is the sum of the previous two). In order to know the (fib 30), you need to know fib 29 and fib 28, which leads to fib 28, 27, and fib 27, 26 and etc. Even computers are expected to be fast, they cannot process such large amount of operation in a short time.  The thing I found frustrating is that when professor was typing the instruction on the DrRacket platform, I had no idea how to read or interpretate those daunting codes. I really need to talk to my TA.

When it comes to debating between two algorithms designed to solve the same problem, we definitely should choose the simple one. The dictionary example illustrates how linear search and binary search work, the former clearly requires a huge amount to time while the latter is terse and fast.

When considering about creating a new algorithm, we have to know the core of the problem, then devise a plan or more plans then try the plan(s). After testing, assessment and evaluations is necessary to improve and polish the algorithm.