Introduction to Algorithms

MountainGoat
Little Kidogo
Published in
3 min readJul 2, 2018
Photo by Clem Onojeghuo on Unsplash

What are algorithms?

An algorithm is a well-specified procedure of doing computation on a set of input (an instance) to get an output (result) or more academically.

An algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output. An algorithm is thus a sequence of computational steps that transform the input into the output. Introduction to Algorithms (Third Edition)

Uses of algorithms

Like all other forms of technology, algorithms are used to solve problems that constitute well defined computational steps.

Think about this if you can find a way of solving a problem through a process of computations you can apply an algorithm to solve that problem.

Usually, the statement of the problem specifies in general terms the desired input/output relationship. The algorithm describes a specific computational procedure for achieving that input/output relationship.

Take this as a suggestion to try and be very clear and concise about the problems you are trying to solve before applying any kind of algorithm

What kinds of problems are solved by algorithms?

  1. Identifying all the 100,000 genes in human DNA, determining the sequences of the 3 billion chemical base pairs that make up human DNA
  2. Management and manipulation of large data sets, especially in today’s internet.
  3. Public-key cryptography and digital signatures which are based on numerical algorithms and number theory, these are used in password storage and securing of information.
  4. Enterprises often need to allocate scarce resources in the most beneficial this resources could be anything from employees to investment funds.

We usually measure the efficiency of an algorithm by the speed at which it produces a result, i.e., how long an algorithm takes to produce its result.

However other factors can be chosen as measures of efficiency such as whether better algorithms exist, accuracy, controllable error rates, it’s a truly open world in regards to this.

Efficiency

Different algorithms devised to solve the same problem often differ dramatically in their efficiency. These differences can be much more significant than differences due to hardware and software.

Total system performance depends on choosing efficient algorithms as much as on choosing fast hardware. Just as rapid advances are being made in other computer technologies, they are being made in algorithms as well.

Correctness

Algorithms are said to be correct if for every input instance the algorithm halts with the correct output. Incorrect algorithms may halt with unexpected or wrong results or maybe not even halt at all.

Specification

The only real requirement for algorithm specification it that there more must be a precise description of the computational steps to be followed.

Algorithms play a key role is Computer Science and they play a key role in modern technological innovation

Why study Design and analysis of algorithms

  1. It enables one to become a better programmer by providing tools for analysis and design of processes.
  2. Sharpens your mathematical and analytical skills both come in very handy in a wide variety of careers
  3. Introduces you to a new way of thinking, thinking algorithmically about problems.
  4. Enhances your literacy in computer science and as a bonus, this will make you better at going through algorithmic interviews.

What kind of Algorithms do you use in your day to day work?

Let us know which kind in the comments!

back to code 😝

--

--

MountainGoat
Little Kidogo

Yoga Teacher, I like Adding Bugs To Code and Getting flicked off Motorcycles. Fork Me: http://github.com/zacck