Introduction to Algorithm

In this week’s class, the term “algorithm” was introduced to me for the first time. We learned what algorithms are, their characteristics, and computational thinking.

The Term “Algorithm”

Algorithm is a set of step-by-step clear instructions in the right order to solve problems in a limited time interval and in the most efficient way. 

We did some activities in class to understand this term better which Demi acted as a robot and I as the person who gave instructions telling Demi the robot what to do. Demi’s eyes were covered which means she couldn’t see anything, and I had to use words to tell her what to do to achieve the goal of giving the water bottle to Lily. After the activities, we figured out some ways to improve my instructions so that they could be clearer and more unambiguous.

We did another activity on paper which we needed to figure out a routine to visit the city in the most efficient way without missing any sites or visiting a site for more than once. We then recorded this routine so that other people can read these instructions and know what to do.

By these two activities, we were able to have a deeper understanding of the term “algorithm”.

Algorithm

The Characteristics of an Algorithm

So what makes an algorithm an algorithm? An algorithm would have certain characteristics which make it an algorithm. The characteristics of an algorithm include finiteness, definiteness, input and output, and effectiveness. 

Finiteness means that an algorithm must always terminate after a finite number of steps. It can’t keep running forever.

Definiteness means that each step of an algorithm must be precisely defined and that the actions to be carried out must be rigorously and unambiguously specified for each case. Otherwise, the computer wouldn’t know what to do. For example, when I was giving instructions to Demi the robot, I used words such as “Move forward a little bit.” In fact, words like that can’t actually work for a real computer because a computer can’t understand what the word “a little bit” actually means. The characteristic “definiteness” also reflects in the definition of the algorithm by the word “clear”.

Input means the quantities which are given to it initially before the algorithm begins. Output means the quantities which have a specified relation to the inputs. An algorithm has zero or more inputs and zero or more outputs.

Effectiveness means that all of the operations to be performed in the algorithm must be sufficiently basic that they can in principle be done exactly and in a finite length of time. If an algorithm is not effective, then it’s useless. So the instructions given by the algorithm must be something that is able to be done in a limited time interval with efficiency.

Algorithm Magic

To help us better understand algorithms, we played a magic called “intelligent paper”. The paper is more intelligent than anyone in our class. We asked two people to play “cross and tick”. One person did whatever the paper told him to do and the other person did whatever the people in our class told him to do. If you always listened to the paper, you would never lose because the paper is more intelligent than anyone in our class.

In fact, it’s the programmer who wrote the instructions on the paper and the person who won simply followed these instructions. The instructions are algorithms. We further discussed the concept of Artificial Intelligence which was about whether it’s the programmer who is intelligent or the paper.

Algorithm Magic—-Intelligent Paper

Computational Thinking and the LightBot Game

Computational thinking includes decomposition, abstraction, pattern recognition and algorithm. We practiced the computational thinking by playing the LightBot Game.

In the LightBot Game, we needed to give instructions to the little robot so that it can light up the bulb on each blue cube, and the number of steps is limited. By doing that, we needed to firstly decompose and abstract the task into several different movements. As the steps are limited, we needed to recognize a pattern so that the same movement can be simply repeated. At last, we were able to figure out the solution and expressed it as algorithms so that the little robot could follow.

 

ComputationalThinkingProductLogo.png
Computational Thinking

 

LightBot Game

Conclusion

After this week’s class, we know what algorithm and computational thinking are. We examined the characteristics of algorithms and we learned that from several interesting activities. We practiced our computational thinking by playing the LightBot Game as well.

Citation

[1] Gupta, Nidhi. “Algorithm and its characteristics.” Home, Biyani Institute of Science and Management, 26 Sep. 2016, bisma.in/algorithm-and-its-characteristics/. 19 Oct. 2018.

[2] “Computational Thinking.” Home, Computational Thinker, http://www.computationalthinkers.com/product/computationalthinking/. 19 Oct. 2018. 

[3] “Algorithm.” Wikipedia, en.wikipedia.org/wiki/Algorithm#/media/File:Euclid_flowchart.svg. 19 Oct. 2018.

Leave a comment