Essay Doctorate 173 words

Algorithm Is a Computable Set of Steps

Last reviewed: December 5, 2012 ~1 min read
Abstract

What is an algorithm? An algorithm is a computable set of steps arranged thus in order to achieve a certain end. There are various algorithms used in bioinformatics and not all are necessarily deterministic. Some are in fact known as randomized algorithms that incorporate randomness. Classification of algorithms in Bioinformatics Classification by purpose Each algorithm has a goal. The Quick Sort algorithm for instance sorts data in ascending or descending order, but algorithms in bioinformatics are grouped by their particular purpose.

Algorithm is a computable set of steps arranged thus in order to achieve a certain end. There are various algorithms used in bioinformatics and not all are necessarily deterministic. Some are in fact known as randomized algorithms that incorporate randomness.

Classification of algorithms in Bioinformatics

Classification by purpose

Each algorithm has a goal. The Quick Sort algorithm for instance sorts data in ascending or descending order, but algorithms in bioinformatics are grouped by their particular purpose.

Classification by implementation

An algorithm has different fundamental principles:

Recursive or iterative

This is common for programming that is used in bioinformatics and is iterative or repetitive until it has found its match. It goes in a loop. Usually used for functional programming, it uses repetitive constructs and is best used for problems such as the towers of Hanoi problem which is imbued with recursive implementation and therefore has these iterative equivalents. An example is the following retrieved from Horton (2004):

Table 3: Pseudo code for "naive" pattern matching algorithm.

character[] pattern, text;

integer i, j;

for (i=0;i

for (j=0; j< length pattern; j++){

if (text[i+j] != pattern[j]) next i;}

record_match (i);}

2. Logical or procedural

These are used in the logical component of bioinformatics, where an algorithm may be seen as controlled logical deduction. The logic component formulates the logical premises that are used in the computation and algorithms are used as heuristics to string from one premise to another and to deduce conclusions as wells to work out the solutions. The control components are fixed in pure logic programming languages, and algorithms supply the logic component.

3. Serial or parallel

This is the instance where computers execute commands consecutively rather than altogether at one time. The latter case is called parallel algorithms which use computer architectures to process several instructions at once. Parallel algorithms divide the problem into several sub-units and send them to several different processors at one time. Iterative algorithms are generally parallelizable.

4. Deterministic or non-deterministic

Deterministic algorithms solve the problem in a pre-defined way. Non-deterministic algorithms however make guesses using heuristics for the best ways to solve the problem. They do this for each step of the use of the algorithm.

5. Classification by design paradigm

A design paradigm is a domain that exists in research or a class of problems that requires a special kind of algorithm. These are the following:

6. Divide and conquer

The divide and conquer algorithm reiteratively reduces the problem of the algorithm to increasingly smaller steps / to one or more smaller instances of that same problem in order to conquer it and until the problem is small enough that it can be mastered. These situations are usually recursive. The situation of merge sorting is one such instance of divide and conquers. The data is divided into segments and sorting done on each part of the data. The data can then be conquered by merging them. This is when sorting of the entire data is done and conquered in a different way.

The binary search algorithm is another example of the divide and conquer version. This is called the decrease and conquer algorithm, where a smaller identical subproblem is solved and the solution then transported to the larger problem in order to solve that.

7. Dynamic programming

In this case, graphs are used the shortest path to the goal is traced from all adjacent vertices and this tells us the shortest path in the weighted graph.

The optimal solution is often constructed by applying optimal solutions to subproblems. In this case, dynamic programming is beneficial since it avoids recomputing problems and programs that have already been computed

This approach is almost identical to the divide and conquer approach excepting that there sub-problems are independent form one another and form larger problems where in the dynamic programming method, an overlap of sub-problems is characteristic of this method.

Dynamic programming and memoization go together. Simple and direct recursion differs from this algorithmic approach in its caching or memorization of recursive calls. This does not help when sub-problems are involved and in that case you need dynamic programming. Dynamic programming uses memorization or maintains a table of sub-problems and in this way it reduces the exponential complexity of many algorithmic problems to polynomial complexity.

A technical example of dynamic programming is the following retrieved from the Stockholm Bioinformatics Center, SBC: it uses the classical Needleman-Wunsch-Sellers algorithm to demonstrate how a dynamic-programming algorithm can work.

k is the length of the gap, copen the gap-open penalty constant, and clength the gap-length penalty constant:

W (k) = copen + clength * k

The formula describing the Needleman-Wunsch-Sellers method is recursive, and for the position (i, j) is as follows, where'd is value of element (i, j) in the matrix and subst is the substitution matrix:

Di, j = max {

Di - 1, j - 1 + subst (Ai, Bj)

Di - 1, j - k + W (k) (where k = 1, ..., j - 1)

Di - k, j - 1 + W (k) (where k = 1, ..., I - 1)

After one has applied this to the matrix, one finds the optimal alignment by tracing backwards from the diagonal element backwards to the previous highest value, and so on.

8. The greedy method

This algorithm is similar to the dynamic programming one but different in that it is not necessary that the solutions to the sub-problems be known at each stage. A guess or a 'greedy' choice can be made instead of what seems to be the best solution at the moment.

Kruskal is an instance of one of the most popular algorithmic greedy models where one uses this model to find the minimal spanning tree

9. Linear programming

The problem is defined in a set of linear inequalities and attempt is then made to minimize or maximize the input. This can solve many problems, one of the most famous being the maximum flow for directed graphs and one of the most popular algorithms for using this is the simplex algorithm.

Integer programming is a complex variant of linear programming where the solution space is reserved for integers.

10. Reduction also called transform and conquer

One solves bioinformatics problems by reducing it to its roots and converting it into another problem. One popular example is trying to find the median in an unsorted list. You first sort out the list, then search for the middle number. The main goals with this method are reducing the problem to its simplest steps. By doing so, you transform it and can better find the algorithmic solution.

You’re 83% through this paper. Sign up to read the full paper.

Sign Up Now — Instant Access Already a member? Log in
130,000+ paper examples AI writing assistant Citation generator Cancel anytime
Cite This Paper
PaperDue. (2012). Algorithm Is a Computable Set of Steps. PaperDue. https://www.paperdue.com/essay/algorithm-is-a-computable-set-of-steps-83513

Always verify citation format against your institution’s current style guide requirements.