Thursday, July 22, 2010

Algorithms


Scared yet?

Disclaimer:
You probably should be if you're not 9 yet. Quite simply because the word has more letters than the number of times you've been around the sun all your life. This belief is precisely the reason for me not opting to be a Biologist or a Geologist because I'm not supposed to know what the word 'Pneumonoultramicroscopicsilicovolcanoconiosis' means until I'm 45 or a Hippie for that matter considering 'supercalifragilisticexpialidocious' although it would make a viable career option once I turn 34. However if you're not yet 9 or traumatized and know what 'traumatized' means, read on.


Now that we're done with that, an Algorithm is simply a series of steps that you can repeat several times or less in order to solve a problem. It has massive application In the fields of Computer Sciences, Engineering, Mathematics, basically in order to solve any logical problem and several illogical ones.

I like to classify them into 3 types:
Infinite
Repetitive
Processes

Note: Mathematics does not classify Algorithms.

Infinite Algorithms are ones that give a different result every time you undergo the series of steps. Basic mathematical operations can be examples of infinite algorithms. Suppose you have 2 integers a and b. To add the algorithm is to add 1 to a which becomes the new a. And to repeat this b times. Similarly to multiply add a to itself which becomes the new a and to repeat that b times. Similar algorithms can be created for Subtraction and Division.

Repetitive Algorithms are ones which eventually on repeating again and again do return to the initial configuration of the problem but the problem often gets solved somewhere therein if the algorithm is right. If I were to form a circle of a certain arc, my objective is to smoothly transition from one arc to another until I form the circle I return to the point from where I start. Though not to the original condition. Some cases where I do reach the initial conditions come, maybe when I solve the Rubik's cube.

Lastly, the Process. It's a series of steps that you design in order to achieve an objective but this time, there's a procedure. An array of yes or no questions and each choice has a different step you have to follow. Like designing a flow chart. Eg:


Algorithms have several uses especially in fields of Computer Sciences, Logistics. But you can basically use them for anything else. They can be broad and narrow and basically however you want them to.
I'm bored now. Best of luck.

No comments:

Post a Comment