Sunday, May 21, 2017

Definition of the concept Algorithm

f

Hello! Welcome to our post. Last lessons in the NTYCX classes we were working with a new topic, algorithms. We have done different activities to understand this concept. First our teacher, showed us videos and explained them. We also played a game, which consisted on discovering a number between 1 and 15 which a classmate picked using an algorithm. The one, who had to guess the number should ask if the number was higher or lower than X number (for example if I ask if your number is lower than 8 and you say no, then I know that the secret number will be between 8 and 15, I continue asking that way and finally find out what number you picked. You could also choose a maximal number of guesses, like 4). This way we tested if the algorithm worked.
We will later explain this better with all the information we have recopilated.

This is a video we liked about algorithms!



Algorithm concept that resembles V Neumann

V Neumann invented a sorting algorithm called Merge Sort Algorithm,
That is faster than the Bubble Sort. It follows this instruction cycle:

How Merge Sort Works

To understand "Merge sort", we took an unsorted group of numbers like the following
Unsorted Array
Merge sort first divides the whole sequence into equal halves unless the atomic values are achieved. We see here that the sequence of is divided into two arrays of 4.
Merge Sort Division
This doesn’t change the sequence of appearance of items in the original. Now we divide these two arrays into halves.
Merge Sort Division
We further divide these arrays and we achieve the atomic value which can’t be more divided.
Merge Sort Division
Now, we combine them in exactly the same way as they were broken down. We first compare the element for each list and then combine them into another list in a sorted way. We see that 14 and 33 are in sorted positions. We compare 27 and 10 and in the target list of 2 values we put 10 first, followed by 27. We change the order of 19 and 35 whereas 42 and 44 stay so.
Merge Sort Combine
In the next phase of the combining, we compare lists of two data values, and merge them into a list of 4 data values placing all in a sorted order.
Merge Sort Combine
After the final merging, the list should look like this −
Merge Sort
Now you know how it works!




Make your own mind maps with Mindomo
This is a Mind Map where we explain the concept "algoritm".

We hope you liked our post an stay tuned for more!

No comments:

Post a Comment