Sunday, May 21, 2017

Definition of the concept "Algorithm"


Hello everybody! For this project in informatics we decided to divide the class in four groups: A1, A2, B1 and B2. We are the group B2. Our task was to talk about the algorithms after we watched two videos explaining what they are. We will leave you the links below if you want to check them out. 
Algorithms are a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer, but in real life we use algorithms, for example the way we put our school materials in our backpacks: first folders, then pensil case, if there aren't folders, the pencil first and then close the backpack.
The turing machine uses an algorithm to organize the 0s and 1s and put them in the correct order that is given by the software
The code on the tape of the turing machine, which is made 1s and 0s, are instructions, and these instructions are the base of computation.
IMPORTANT:
Definition of algorithm:
In mathematics, logic, computer science and related disciplines, an algorithm is a prescribed set of well-defined, ordered, and finite rules or instructions that allows one to carry out an activity through successive steps that do not create doubts to whoever is to do such activity. Given an initial state and an input, following the successive steps, a final state is reached and a solution is obtained.
This mindmap could help you understanding the concept




Example of algorithm

Animated visualization of the quicksort algorithm. The horizontal lines are pivot values.
Quicksort (sometimes called partition-exchange sort) is an efficient classification algorithm, which serves as a systematic method for placing the elements of an array in order. Developed by Tony Hoare in 1959 and published in 1961, it is still an algorithm commonly used for classification. When implemented well, it can be around two or three times faster than its main competitors, merge sort and heapsort.


The steps are:

  1. Pick an element, called a pivot, from the array.
  2. Partitioning: reorder the array so that all elements with values less than the pivot come before the pivot, while all elements with values greater than the pivot come after it (equal values can go either way). After this partitioning, the pivot is in its final position. This is called the partition operation.
  3. Recursively apply the above steps to the sub-array of elements with smaller values and separately to the sub-array of elements with greater values.
Quicksort:
We hope you understod how algorithms work!
Till next time
Francesca, Giuliana, Alex and Migue

No comments:

Post a Comment