Pages

Friday, June 21, 2013

Don't know how to solve problems? Need Good Grades? Read this...


Although computer science students and alums may not design experiments to look for the annihilation vector resulting from dark matter collisions in space, our working methods are identical to the untrained eye (other than perhaps being slouched over computer/laptop in addition to staring at a whiteboard). We may not get the coolest jobs - like earning millions of dollars for hitting a ball with a stick or eking sounds out of dead animal skin - but we sure learn how to solve problems.

"How" you ask? It's elementary my dear reader... using the power of algorithms and design patterns. Disclaimer: I am not claiming that Computer Science is the only field that employs algorithms and design patterns - but computer science students are drilled to use these techniques right from the beginning unlike most other fields I have come across.


So what are algorithms and design patterns? In plain speak - an algorithm is a set of repeatable steps used to solve a problem (the key word here is repeatable) and design patterns are collections of algorithms used on a set of similar problems. A cookbook would be a good example of a design pattern and an individual recipe in the cookbook would be a algorithm.

Algorithms are very powerful tools. They are meant to teach even the dumbest of all creations - the CPU - to execute tasks that are impossible for the human mind to fathom. Algorithms allow us to take something as complicated as weather modeling and reduce it to a set of repeatable steps that can be used around the world. IBM's Watson beat Ken Jennings in Jeapordy using design patterns and algorithms. Similarly Deep Blue presided over Kasparov at chess the same way. These computers basically drew upon a huge number of patterns that looked similar to the way a current challenge was posed to them. These patterns were then narrowed down to a set of steps that allowed the computer to identify the correct answer and solve the problem. Of course, it helps that computers are able to do these tasks in a matter of nanoseconds.

So what is the first step towards solving a problem using the algorithmic approach? The first would be find the relevant cookbook - or design pattern that would help create actionable steps.

For example -
Problem: I want to create a design for a single family house with one balcony
Design Pattern: Find a blueprint for another single family house with one balcony. This can then be customized to what you would like it to look like, and other requirements and limitations. You wouldn't however need to figure out how to get started if you had a template that you could draw upon.

We could even obtain a set of actions that need to be completed (in broad terms) to construct the house from the previous house's . So, now that we have an actionable solution - how about we create the algorithm for it:

Buy some land
Find an architect
Customize another house's blueprint for our house
Find a contractor
Get all the permits required for the house
Build the house

This algorithm can be further broken down into sub-tasks (sub-algorithms) that may be different from the previous house's algorithm.

The point I am making here is that this design pattern and algorithm helped me create an actionable plan to build a house without possibly knowing anything about how to do so earlier. Most problems can be faced using this method. This is because using an algorithmic approach to solve problems will at worst give you a checklist to complete any task - perhaps the most foolproof way to get anything done

A good example of me using this to my advantage was when I studied for my Financial Accounting final. I didn't do too well on the mid-term because I was confused on what I need to do and how I should approach a subject I had never studied before. However, for the final, I drew upon my experience and created an action plan from my past experiences of taking exams.

I then created a series of steps that would help me learn the course material and help me prepare for my exam. When I created the action plan I was able to track my progress which allowed me to manage my time better as well. Thanks to the action plan I was very well prepared for my final and obtained one of the top marks in the class.


2 comments:

  1. Good post. I like the way you connected the design plan and the house and the way you ultimately solved the problem of getting through financial accounting. I think you could expand the financial accounting example a bit more. That would have tied it to the rest of the post more tightly and made it more crisp. But I still really liked the way you write the concept of algorithms and design patterns and made them relevant to problem solving in general.

    ReplyDelete
  2. Yea I need to elaborate. I didn't want the article to become too long and boring though

    ReplyDelete