The Algorithm is Unique Science
By viewgreen, 5th Feb 2015 | Follow this author
| RSS Feed
Posted in WikinutReviewsTechnologySoftware
In mathematics and computer science, an algorithm is a step-by-step for calculation. The algorithm used for calculation, data processing, and automated reasoning. The algorithm is an effective method expressed as a finite sequence of instructions that have been defined to compute a function.
- Introduction
- Understanding the Algorithm
- The Algorithm Computation
- Various of Computation Algorithms
- Conclusions
- Data Credits*
Introduction
Starting from an initial condition and the initial input (possibly empty), these instructions describe a computation which, when executed, processed through a limited number of order conditions are defined, which in turn produce "output" and stop at the end of the condition. The transition from one condition to the next condition should not deterministic; some algorithms, known as randomization algorithm, by using the random "input".
The algorithm is a sequence of logical steps in solving problems systematically arranged. The problem can be anything, with a note to every problem there is a requirement that the initial conditions must be met before running the algorithm. The concept of an algorithm is often equated with a prescription. Recipes usually have a list of ingredients or spices that will be used, the order of execution, and how the results of the processing sequence. If the material used is not listed (not available), then the prescription will not be workable. Likewise, if the order process is not uniform, then the expected results will not be obtained.
The algorithm can be presented in two forms, namely in the form of writing / language and in the form of images. Presentation of the algorithm in the form of writing should use language that can be understood by humans in presenting the steps of the algorithm. Presentation of the algorithm in the form of writing can also be done using "pseudocode".
"pseudocode" is derived from "Pseud"o word meaning "similar to or resembling" and the "Code" which means "source code". An example of the programming language used to express the "pseudocode" is BASIC, Pascal, C / C++, and others. Meanwhile, the presentation of the algorithm in the form of images is often called a flow chart.
Following a video of "Introduction to Algorithms" by Professor Steven Skiena Dept. of Computer Science, Stony Brook University:
Understanding the Algorithm
Algorithm is an effective method that is formed into a circuit without limits or none of the instruction that has been interpreted properly. Definition of a formal algorithm is a collection that is correct in determining some of the sequence of operations. In general point of view, software or an application is an algorithm if the software or the application is not used anymore. The basic concept of this algorithm Programming Language is used to infer and define a notation of a decidability. The notation is that the center will explain how a formal system that originated from some small number of axioms and rules. At the time of an algorithm logic can not be predicted and can not be calculated. because it can never be calculated, the calculation amount of uncertainty that is informed that a job is being executed, and there arose no exact definition of the algorithm.
Understanding the algorithm is a logical and systematic arrangement to solve a problem or to achieve a particular goal. In the computer world, the algorithm is very instrumental in the development of software. In the everyday world, perhaps without being aware algorithm has entered our lives.
Algorithm itself is not a word of the original word of English, but it is derived from the word "Algorism" which means "the process of calculating the Arabic numerals". Mathematics Experts believe that the word "Algorism" comes from the name of the author of the famous Arabian, Abu Ja'far Muhammad ibn Musa al-Khwarizmi (770-840 AD), the west recite Al-Khwarizmi as Algorism. Understanding the algorithm is logic, methods, and stages (order) systematically used to solve a problem. The algorithm can also be interpreted as a sequence of steps in a systematic and logical. In the process, the algorithm is widely used in the computer field.
Specifically, the definition of the algorithm is a special method that is right and consists of a series of steps that are mathematically structured and written, that will be done to solve a problem with the help of computers. So based on this definition, the algorithm can be said to be a step in the resolution of a problem which produces a solution in the form of a computer program. However important to note that the algorithm is not dependent by a particular programming language, meaning that an algorithm must be able to be realized by any computer programming language.
The Algorithm Computation
The different of Algorithm with Logarithm Mathematics is the logarithm operation which is the inverse of the exponent or reappointment. See here the examples of Logarithm.
Different algorithms can be applied to a problem with the same conditions. The level of complexity of an algorithm is a measure of how much the algorithm computation required solving the problem. Generally, the algorithm can solve a problem in a short time has a low level of complexity, while the algorithm that takes a long time to solve a problem requires a high level of complexity.
Following simple of Algorithm.
- Start
- Read the data of Base and Height.
- Area = Base * height * 0.5
- Show Area
- Stop
See more video of the "Modeling (Algorithm) / Logarithms" by Professor Steven Skienabelow:
The above is very simple algorithm, there are only five steps. In this algorithm may not find looping or election. All of the steps are performed only once.
Glance algorithm above is true, but if we look closely then this algorithm contains a fundamental error, namely: there is no restriction on the value of the data to the base and height. What if the value of the data base or higher is the number 0 or a negative number? Obviously the results out are not as expected. In cases like this we need to add a step to ensure the value of the base and high qualified, for example by checking the incoming input. If the input value of the base and the height is less than 0, then the program will not run. So that, above algorithm could be changed into following example of the result of the calculation algorithm repair area of the triangle:
- Start
- Read the data of base and height
- Check the data of base and height, if the value of the data of base and the height is Greater than 0 then proceed to step 4 if not then stop
- Size/Area = Base * height * 0.5
- Show Area
- Stop
From the data above that it can be concluded to the basic algorithm. First, the Algorithm must be true. Second, the algorithm must stop and after the stop, the algorithm gives the correct result.
Various of Computation Algorithms
Here are various algorithms that have so far applied or used to construct computational language
- Definition of Bubble Sort Method Bubble sort (bubble method) is a method or algorithm sorting by way of exchange of data with a place next to them if the data before it is greater than the data continuously thereafter until it can be ascertained in a particular iteration no longer changes, or have been in correct order. If there is no significant change in the data is already sorted. Called bubble sort for each key or the data will slowly bulging or comparing the data to the proper position.
- Definition Method of Sort Selection Selection Sort differ with Bubble sort. Selection Sort basically choose the data to be sorted into two parts, namely this part of the already sorted and parts that have not been in the sort.
- Definition Method of Insertion Sort Insertion sort is a sorting algorithm by inserting / insert if it finds a smaller value, so that it completed the sorting algorithm Gradually From left to right or in contrast. With the terms of elements to be sorted later sorted out in the elements that have been previously sequenced by direct way to insert between the corresponding elements. In a simple insertion sort can be explained by the numbers below:
- Understanding Merge Sort Usually merge sort algorithm is used to compile the list by dividing the list into two smaller parts. Then both the new list is compiled and sorted separately respectively. Then sort the results of each part are combined and sorted again to generate a sequence that has been sorted. The point is still combining two already sorted array is an array of arrays A and B then create a third array is an array of C that is useful to accommodate the values of the elements of the array A and the array B. Here's an example program:
This method is easy to understand and programmed, but when Compared with other methods that we have learned, this method is the most inefficient method Because it has a lot exchanges that require large memory allocation to execute this method.
The first step of data sought the smallest of the first data to the latest data. Then the smallest of data exchanged with the first data. Thus, the first data now has the smallest value compared to other data. The second step, we are looking for the smallest of data from the data until the last second. The smallest data we obtain the data exchanged with the second and so on until all the elements in a state Sorted. This method is more effective than the method of the bubble because it does not require a lot of exchanges and memory allocation.
Preliminary data: 21 32 4 6 2 7 1
----------------------------------------
Step 1: | 21 | 32 | 4 | 6 | 2 | 7 | 1 |
Step 2: | 21 | 32 | 4 | 6 | 2 | 7 | 1 |
Step 3: | 4 | 21 | 32 | 6 | 2 | 7 | 1 |
Step 4: | 4 | 6 | 21 | 32 | 2 | 7 | 1 |
Step 5: | 2 | 4 | 6 | 21 | 32 | 7 | 1 |
Step 6: | 2 | 4 | 6 | 7 | 21 | 32 | 1 |
Step 7: | 1 | 2 | 4 | 6 | 7 | 21 | 32 |
----------------------------------------
Results: 1 2 4 6 7 21 32
Note:
In the above arrangement of elements which can be explained that the Data in the
columns 1 and 2 from the step 1 - 7 are the sorted data (elements), the
data in columns 7 and 2 are the data inserted because the value is smaller,
And then the data in the columns 4 - 7 are not the sorting data.
So if it is described to be like a row of steps above. Whether it is in ascending or descending order of steps still as above, so then, inserted it slowly.
Many people analogy with people who sort the cards, because the cards are usually sorted like this, that is slowly inserted the appropriate value.
Insertion Sort Example program:
- public class InsertionSort {
public static void main (String a ) {
int i;
int array = {12,9,4,99,120,1,3,10};
System.out.println ("Insertion Sort \ n \ n");
System.out.println ("Values Before the sort: \ n");
for (i = 0; i <array.length; i ++)
System.out.print (array + "");
System.out.println ();
insertion_srt (array, array.length);
System.out.print ("Values after the sort: \ n");
for (i = 0; i <array.length; i ++)
System.out.print (array + "");
System.out.println ();
System.out.println ("PAUSE");
}
public static void insertion_srt (int array , int n) {
for (int i = 1; i <n; i ++) {
int j = i;
int B = array ;
while ((j> 0) && (array > B)) {
array = array ;
j-;
}
array = B;
}
}
}
- class MergeApp
{
public static void main (String args)
{
int = {23,47,81,95} ARRAYA;
int array B = {7,14,39,55,62,74};
int array C = new int ;
merge (Array A, 4, array B, 6, array C);
print (Array C, 10);
}
public static void merge (int ARRAY A, size A int, int array B, size B int, int array C)
{
idxA int = 0, idxB = 0, IDXC = 0;
// The first loop to compare the value of the element and
// allocate the small value to array C.
while (idxA <sizeA && idxB <sizeB)
if (ARRAY A <arrayB )
arrayC = ARRAY A ;
else
array C = array B ;
while (idxA <sizeA) // if array B already
array C = ARRAY A ; // allocated all
while (idxB <sizeB) // if ARRAY A already
array C = array B ; // allocated all
}
public static void print (int array C, int size)
{
for (int i = 0; i <size; i ++)
System.out.print (array C + "");
System.out.println ("");
}
}
Merge Sort. Previously described, if the core of merge sort method is to divide the array into 2 parts, sorting each part, and then call the method merge () to combine the two parts into one array that already shorted. Here is a listing program that uses two methods that merge sort and merge through a recursive approach.
- // import java.io. *;
class DArray
{
private double isiArray;
private int nElemen;
public DArray (int max)
{
Fill Array = new double ;
nElemen = 0;
}
public void insert (double n)
{
Fill Array = n;
nElemen ++;
}
public void show ()
{
for (int i = 0; i <nElemen; i ++)
System.out.println (fillArray + "");
System.out.println ("");
}
public void mergesort ()
{
double array = new double ;
mergesort (array, 0, nElemen-1);
}
private void mergesort (double array, int lowerBound, int upperbound)
{
if (lowerBound == upperbound)
return;
else
{
int mid = (lowerBound + upperbound) / 2;
mergesort (array, lowerBound, mid);
mergesort (arrays, mid + 1, upperbound);
merge (array, lowerBound, mid + 1, upperbound);
}
}
private void merge (double array, int lowPtr, highPtr int, int upperbound)
{
int j = 0;
int lowerBound = lowPtr;
int mid = highPtr-1;
int n = upperbound-lowerBound + 1;
while (lowPtr <= mid highPtr && <= upperbound)
if (fillArray <fillArray )
array = fillArray ;
else
array = fillArray ;
while (lowPtr <= mid)
array = fillArray ;
while (highPtr <= upperbound)
array = fillArray ;
for (j = 0; j <n; j ++)
fillArray = array ;
}
}
class MergeSortApp
{
public static void main (String args)
{
int MaxSize = 100;
DArray arr;
arr = new DArray (MaxSize);
arr.insert (64);
arr.insert (21);
arr.insert (33);
arr.insert (70);
arr.insert (12);
arr.insert (85);
arr.insert (44);
arr.insert (3);
arr.insert (99);
arr.insert (0);
arr.insert (108);
arr.insert (36);
arr.display ();
arr.mergeSort ();
arr.display ();
}
}
Below is a partial steps of the algorithm after analysis:
- Sign in to low (0-3)
do sort low (0-3)
Sign in to low (0-1)
do sort low (0-1)
Sign in to (0-0)
return (0-0)
do sort of high (0-1)
Sign in to (1-1)
return (1-1)
do merge in (0-1) // fillArray = 21 64 33 70
do sorting on high (0-3)
entered into (2-3)
do sort low (2-3)
entered into (2-2)
return (2-2)
do sort of high (2-3)
entered into (3-3)
do merge (2-3)
return (2-3) // fillArray = 21 64 33 70
do merge (0-3)
return (0-3) // fillArray = 21 33 64 70
For the second recursive call merge sort almost the same concept. Of course, I apologize for, if the procedures writing are mistakes.
Conclusions
An Algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem. The word derives from the name of the mathematician, Mohammed ibn-Musa al-Khwarizmi, who was part of the royal court in Baghdad and who lived from about 780 to 850. Al-Khwarizmi's work is the likely source for the word Algebra as well.
A computer program can be viewed as an elaborate algorithm. In mathematics and computer science, an algorithm usually means a small procedure that solves a recurrent problem. Inventor's own algorithm that is recorded in the early history of a man named Abu Abdullah Muhammad ibn Musa al-Khwarizmi. Al-Khwarizmi was a mathematician from Uzbekistan who lived in the years 770-840 AD. In western literature it is known as Algorizm. The algorithm is working computer system has a brain ware, hardware, and software. Without one of the three systems, the computer will not be useful. We will focus on computer software. Software built upon the composition of the program (please read about the program understanding) and syntax (the way of writing/making of the program). To compile a program or syntax, the need for systematic measures and logical to be able to resolve the problem or goal in the process of making software. Thus, algorithms play an important role in the preparation of the program or syntax.
What is a computer algorithm exactly? To make a computer do anything, you have to write a computer program. To write a computer program, you have to tell the computer, step by step, exactly what you want it to do. The computer then "executes" the program, following each step mechanically, to accomplish the end goal.
When you are telling the computer what to do, you also get to choose how it's going to do it. That's where computer algorithms come in. The algorithm is the basic technique used to get the job done. Let's follow an example to help get an understanding of the algorithm concept.
Let's say that you have a friend arriving at the airport, and your friend needs to get from the airport to your house. Here are four different algorithms that you might give your friend for getting to your home:
- The taxi algorithm:
- Go to the taxi stand.
- Get in a taxi.
- Give the driver my address.
- The call-me algorithm:
- When your plane arrives, call my cell phone.
- Meet me outside baggage claim.
- The rent-a-car algorithm:
- Take the shuttle to the rental car place.
- Rent a car.
- Follow the directions to get to my house.
- The bus algorithm:
- Outside baggage claim, catch bus number 70.
- Transfer to bus 14 on Main Street.
- Get off on Elm street.
- Walk two blocks north to my house.
For more information, you just go and find here! and here!.
- Implementation Most algorithms intended to be implemented as a computer program. However, the algorithm is also implemented with other objectives, such as in biological neural networks (for example, the human brain implementing arithmetic or an insect who see food), in the electrical circuit, or in a mechanical device.
Data Credits*
This article written based on some references data and information from various sources are below:
- Muḥammad ibn Mūsā al-Khwārizmī Bibliography
- Stony Brook Univ.
- Wikipedia
- Famousscientists
- Computer_HowStuffWorks
- Rendigilasbatas
- Firmanhidayat987
- Varia
- Rahman371
- Pengertianahli
These pictures above are taking from:
- Muḥammad ibn Mūsā al-Khwārizmī
- The Fractal_color (abstract)
- Fractal colors_the Allianz Arena_Stadium
The videos are taking from:
Become a WIKINUT - it's free to JOIN Here!!!
WRITE, SHARE & EARN!!!
Comments
viewgreen
5th Feb 2015 (#)
Dear John, I thank you very much for the moderate and approve to published this page. Have great days to you. :)
Reply to this comment
Utah Jay
5th Feb 2015 (#)
A very good article Viewgreen. You must be a genius to understand all this.
Reply to this comment
viewgreen
6th Feb 2015 (#)
Thank you for stopping by to read this page sir. Absolutely, I'm not a genius like others even this is a part of my field of study because I'm still learning of this right now. I appreciate it sir. Thank you.
Reply to this comment
Carol Roach
6th Feb 2015 (#)
yes I agree you must be a genius to understand this because I certainly don't
Reply to this comment
viewgreen
6th Feb 2015 (#)
As I said above that I'm not like the others. At least I'm trying to share this for all of us herein, and that's a piece of about Computing and Math. Thank you madam for a great comment here.
Reply to this comment
Gclick
12th Feb 2015 (#)
Well done and great job my friend. Congrat! on the star page. thanks.
Reply to this comment
Colekdikit
13th Feb 2015 (#)
educative one, good job my friend. thanks
Reply to this comment
M G Singh
23rd Feb 2015 (#)
Great share
Reply to this comment