What is algorithm?

advertisement
EHow Algorithms Rule The World
Masinde Mtesigwa Masinde (1204481)
11/4/2012
Contents
What is algorithm? ........................................................................................................ 1
Types of Algorithms ...................................................................................................... 1
Recurrences.............................................................................................................. 1
Backtracking algorithms ............................................................................................ 2
Divide and conquer algorithms .................................................................................. 2
Dynamic programming .............................................................................................. 2
Greedy algorithms ..................................................................................................... 2
Sorting Networks ....................................................................................................... 3
Randomized algorithms............................................................................................. 3
The importance of algorithms........................................................................................ 3
Mobile computing devices ......................................................................................... 4
In Life Sciences ......................................................................................................... 4
In Internet .................................................................................................................. 4
Electronic commerce ................................................................................................. 4
References ................................................................................................................... 5
What is algorithm?
Algorithms can be any computational or scientific procedures which target to solve a
certain problem(s); the procedures are well defined and are in series from one step up
to the last step. Algorithms can be defined also as some computational steps aimed to
reach or solve a certain problem. [1, 5.]
Everything around human being is made of technology for example the transport
system, education, health system, the communication system, and even food
production. All these are the result of algorithm development. [2, 11.]
Taking an example, in a German city of Mainz a man named Johann Gutenberg, in the
year 1448 discovered the way of printing books by using two movable metallic pieces.
The whole process of discovery was through algorithm. [2, 11.]
In the 9th century certain man who lived in Baghdad Iraq, laid out the basic methods of
mathematics which was of adding, multiplying and dividing numbers not only that but
also solving mathematics problems using 𝜋. This man who came with the idea of
algorithm was called Al Khwarizmi. [2, 11.]
Types of Algorithms
Scientists or Researchers have come to a conclusion that there are no types of
algorithms, rather there are classes of algorithms. These classes include: simple
recursive, greedy, divide and conquer, dynamic programming, brute force, bound and
more to come.
Recurrences
Recursive solves the basic cases directly, using a simple sub problem. Recurrence can
be defined as an equation or inequality which describes the function in terms of its
value based on smaller inputs. When using recurrence, it is always a matter of
neglecting technical details. For example, the substitution method for solving
recurrence entails two steps which are guessing the form of the solution and the use of
induction to find constants as well as showing how the solution works. [2, 62.]
1
Backtracking algorithms
The backtracking algorithm is based on a depth-first recursive search whereby the
algorithm tests if the solution has been found, and if found, the algorithm returns it.
Backtracking can be also defined as a process which repeatedly explores paths until
the solution is found. This whole process tends to be easier to some problems than
others. [5]
Divide and conquer algorithms
Divide and conquer type of algorithms are divided into many sub parts, these include,
multiplications, recurrence relations, merge sorts, medians, the fast Fourier transforms
and matrix multiplications. The algorithm can be called divide and conquer if it contains
two or more recursive calls. This strategy always solves a problem by breaking it into
sub problems where they become into smaller instances of the same type of problem.
Recursively the problems are broken into pieces combining their answers apparently.
[2, 55.]
Dynamic programming
Dynamic programming algorithms are wide algorithms which have some branches.
These branches include the shortest paths in dags, longest increasing subsequences,
the Knapsack, Chain matrix multiplication, Independent matrix multiplication and
Independent sets in trees. A dynamic algorithm tends to remember past results thus
using the obtained results to find new results. In general dynamic programming
algorithms are used for optimization problems, such as optimal substructure and
overlapping substructure. [2, 169.]
Greedy algorithms
Greedy algorithms are divided into several classes which include minimum spanning
trees, set cover, horn formulas and Huffman encoding. A greedy algorithm works by
building a solution piece by piece and always choosing the next piece that offers the
most obvious and faster benefit.
2
Fig. 1 An example of a minimum spanning tree [3]
Sorting Networks
Sorting networks are comparison networks which tend to sort out their inputs. The
outputs of the comparison networks are in sequence which is monotonically increasing
for every input. A comparison network is made of or is composed with wires and
comparators. The comparator is a trivial component that sorts two numbers. For
example once it takes number y and x, the output will be the minimum of x or y to the
top of the output and the maximum of x or y at the bottom.[1,707.]
Randomized algorithms
The randomized algorithms are always easy. The output of randomized algorithms is
correct with high probability. The result does not depend on the randomness of the
input; it only depends on the random choices made by the algorithm itself. The most
important thing in this algorithm is to be familiar with probability.
The importance of algorithms
The development of technology leads to more advanced algorithm development. For
example in the security issues the algorithm standard is very high compared to other
technological systems, equipments or software and this is due to high level of hacking.
The banking system where credit cards are used for shopping show that the higher the
developed security system the lower the hacking of the system. All these are
connected to algorithm development.
3
Mobile computing devices
Apart from the banking system, there is also the case of data management for example
the increase of mobile computing devices in governments and enterprises. It has lead
to the development of the system which limits the accessible data from unauthorized
users. In such systems only the authorized users must be in a designated location in
order to have the rights and privileges to access the data. [4,339]
In Life Sciences
The human Genome Project has the aim of identifying all 2,000,000 genes in human
DNA, determining the sequences of the 3 billion chemical base pairs that make up
human DNA. This data will be stored in databases, thereafter tools for data analysis
are developed. Every step requires an algorithm to reach the intended result. The use
of algorithms will not only save time but also money, because more information will be
obtained through the use of algorithms. [1,7.]
In Internet
The use of the internet enables all people around the world to reach and use large
amount of data. This has happened only due to the use of clever algorithms which are
employed to manage and manipulate this large amount of information. For example the
search engines such as Google, yahoo, Bing and others are using various algorithms
to access different data sources. [1,6.]
Electronic commerce
The electronic commerce enables people/customers to buy goods and services and to
negotiate and exchange electronically. For example eBay, Amazon, Sports Direct
Zalando and many more shops have the systems which have an ability to keep credit
card information. All this is possible through the employment of algorithm. Once the
algorithm is put into use efficiently it results into a well useful system. [1,7.]
4
References
1. Cormen T.H., Leiserson C.E., Rivest R.L., Stein C. Introduction to Algorithms.
2nd Ed. Massachusetts, The Massachusetts Institute of Technology; 2004.
2. Dasgupta S., Papadimitriou C.H., Vaziran U.V. Algorithms. San Diego. Berkeley
University, 2006.
3. Computer programming [online] Algorithm Graphs. USA; November 2011
URL:
http://compprog.wordpress.com/2007/11/09/minimal-spanning-trees-
prims-algorithm/. Accessed 2 November 2012
4. Kirkpatrick M. S., Damian M. L., Bertino E. Prox-RBAC: A Proximity-based
Spatially Aware RBAC. ACM SIGSPATIAL GIS. Chicago, IL USA. ISBN 978-14503-1031-4/11/11. 2011.
5. Roberts E. Algorithms [online]. USA. Stanford University
URL:
http://www-cs-faculty.stanford.edu/~eroberts/courses/cs106/chapter/0/7-
backtracking-algorithms.pdf. Accessed 3 November 2012.
.
5
Download