Sommaire de cette fiche
The word algorithm was coined in the Middle Ages to designate the techniques of written calculation related to the system of positional numeration, in other words calculation on digits, introduced in Europe by the Arabs.
(783-850) is a great mathematician and astronomer who gave him his nickname. The word algorithm comes from the phonetic transcription of
in Algaurizin and from the Greek word
number (which also gave
What is an algorithm?
Explanation with the pancake recipe
A recipe, for example, is an algorithm: a sequence of simple operations that allows you to go from ingredients to a prepared dish.
We often represent the algorithm in a schematic way, by breaking down the steps and linking them with arrows, as below:
To make pancakes, just follow the instructions in order. The recipes are algorithms for humans and are therefore written in a language that humans can understand. Since humans are assumed to be reasonably intelligent, there are many things that do not need to be specified in the recipe, such as removing the shells from the eggs or not using raccoon milk. Moreover, the algorithm of the pancake recipe is very simple because there is only onepossible choice at each step. To address this notion of choice, we will consider another algorithm: the one that determines whether or not we can make pancakes, based on what is in the fridge and cupboards.
Conditions in the algorithms
Before starting to make pancakes, we usually check that we have everything we need. It’s something easy for a human, but suppose you’re lucky enough to have a robot to help you in the kitchen. To make sure he has enough ingredients, here is one of the algorithms he could use, knowing that he will need eggs, milk, flour, sugar and butter. In this scheme, the robot will check one by one all the conditions necessary for the good progress of the preparation of the pancakes. The questions he must ask himself are displayed in diamonds and the instructions in rectangles. At each step, depending on the answers, the instructions may change:
Generally speaking, an algorithm, like the ones you create with SCRATCH or ALGOBOX, is used to process what we call“inputs” (in our case, the ingredients and the kitchen equipment) to give a result (the pancakes). The instructions described in the algorithm should be very simple and not confusing. To obtain the same result, there are an infinite number of possible algorithms.
A good algorithm is a recipe that is easy to follow, does not waste time unnecessarily and does not cause errors.
A good algorithm must also have a beginning and above all … an end!
Every computer scientist in the world has been confronted one day with the absolute horror of an infinite loop.
Cette publication est également disponible en : Français (French) Español (Spanish) العربية (Arabic)
Download and print this document in PDF for free
You have the possibility to download then print this document for free «algorithm and programming: definitions.» in PDF format.
Other documents in the category Scratch
- Exercises with Scratch with missions to program.
- Algorithm and programming: definitions.
- Scratch : 9th grade math worksheets with answers in PDF
- Scratch : 8th grade math worksheets with answers to download in PDF
- Scratch : 7th grade math worksheets with answers to download in PDF
- The brick breaker made with Scratch
- Scratch: worksheets, activities and online programs and algorithms
Other forms similar to algorithm and programming: definitions..
- 80Scratch is an easy-to-use software and the initiation is fun to make students discover algorithms, video games, dynamic figures and many other things. The algorithm and programming part in middle school math has just been inserted in the new cycle 4 programs (fifth, fourth and third) following the middle school…
Les dernières fiches mises à jour.
Voici les dernières ressources similaires à algorithm and programming: definitions. mis à jour sur Mathovore (des cours, exercices, des contrôles et autres), rédigées par notre équipe d'enseignants.
On Mathovore, there is 13 623 781 math lessons and exercises downloaded in PDF.