Intro to Algorithm

Hello, This is Bndsbon. Different than all the blog posts before, today I am going to talk about Algorithms. However, I am not going to cover all the deep and profound concepts but rather the basic and foundamental knowledge about algorithms in this blog post. So pay attention!

Algorithm is, basically a very detailed way to solve a problem, the ways are usually listed step by step. It is like a key to a lock, and this key is made to the very detail that almost every one in the world can understand the process.

* Since the alogrithm is a step by step instruction, a single mistake would cause the whole operation to failure. So every step in the algorithm needs to be precisely right. 

Properties of alogrithm:

Finiteness-an alogrithm must be finite to fill it’s purpose, to operate.

Definess-obscure should not appear in a computer alogrithm

Input

Output

Effectiveness-the alogrithm need to finish it’s purpose with in a finite number of time

Now you must be tempted to try to build some algorithms by yourselves. Here is a simple alogrithm game that you can have a glance at what algorithms really are: LightBot

Here is what you will get after the finishing the whole game

_1_ff36462ebf2bc2f065238cbaf8b26a96.jpg

The Lightbot is basically a game where you can encounter some basic algorithms. Where you have to plan ahead before the bot jumps. The more chanlleges you accomplish, the more difficult the game will get. After this game, I realized the importance of precision in writing alogorithms, if you made something wrong in one step, the whole opertation will be a failure. This is something we should be aware about not only in writing alogrithms, but also in our daily life, we should be precise and accurate all the time!

There are four types of expressions in alogrithms, and they are: Simple English, Flow Chart, Pseudocode, and Programming Language. And today we will be looking at flow chart and pseudocode.

Flow Chart: It is a type of expression / diagram that visually represents the process/procedure of the algorithm. It is like what our mind will do when we are giving a certain instruction, such as counting a number.

Here is an example of a flow chart

LampFlowchart.svg.png

Picture from Wikipedia 

 

Pseudocode: A more simplified programming language, more easy to understand, and more user-friendly.

Fig-3-Pseudo-code-for-firefly-algorithm.png

Picture from ResearchGate 

Over today’s lesson, I learned a lot of new informations, more informations that is directly related to programming. It is very fun, and I am feeling like we are getting closer and closer to computer programming. I can not wait to program a application by myself!

Looking forward to our next Computer Science Class!

 

References:

“Flowchart.” Wikipedia. N.p.: Wikimedia Foundation, 6 Nov. 2016. Web. 15 Nov. 2016.

“Fig. 3. Pseudo-code for firefly algorithm.” ResearchGate. n.d. Web. 15 Nov. 2016.

One thought on “Intro to Algorithm

Add yours

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑