International Institute in Geneva
What is an algorithm in Computer Science? How does it work? How is it useful? What are the different algorithms?

So many questions, that we will be happy to answer

Algorithms: their meaning in computer science

In Computer Science, an algorithm is a list set of instructions, used to solve problems or perform tasks, based on the understanding of available alternatives. 

Algorithms are more than just programming, they are specifications for performing calculations, data processing, automated reasoning or decision making for example (non-exhaustive list). 
To this extent, it is necessary to understand what it means for an algorithm to be correct, and to accurately solve the problem at hand.

Here are 8 critical steps in the development of an efficient algorithm 

  • Definition of the problem 
  • Development of a model  
  • Specification of the algorithm  
  • Designing an algorithm  
  • Implementation of the algorythm  
  • Program testing  

You may ignore it, but you use algorithms everyday

Every time you bake or cook something, you follow a set of steps to put the ingredients together and produce a final product. If you were asked to write down instructions to make your recipe, you could create your own algorithm. You would only need to specify : 

  • Inputs: Ingredients and quantities 
  • Process: recipe or method 
  • Output: What the finished meal will be like 

In a computer program, statements also include the following actions: 

  • Input data: For example, collect a value from a sensor 
  • Process data: Add two values together or make a decision when a value reaches a certain amount 
  • Output Data: Display some results  


Why is it fundamental in Computer Science? 

Well, the answer is simple. Computers would not do anything without programs telling them what to do. Algorithms give computers step-by-step instructions to accomplish specific tasks and make decisions. 

In programming, there are many ways to solve a problem. However, the effectiveness of the available methods varies. Some methods are much better than others at giving accurate answers. 

Algorithms are used to find the best possible way to solve a problem, based on data storage, sorting and processing, and machine learning. In doing so, they improve the efficiency of a program.

Algorithms are used in all areas of computing. Because it is a fantastic way of automating computer decisions. 

Let's say you have to drive 200 km to your vacation spot. After checking what the shortest route is (data sorting), how to avoid traffic based on previous or current data (data storage), or how the weather forecast may impact your driving (data analysis), the algorithm will give you the best route and your estimated arrival time (data structure and algorithms are good friends in computer science, machine learning, decision making). 


Expressing algorithms 

How many algorithms are there in computer science?  That's a tricky question but of course we have an answer: there's a countless number of algorithms, even though some are indeed more important to know than others in programming. 

Most importantly, algorithms can be expressed in different languages, including natural languages, pseudocodes, flowcharts, drakon-charts, programming languages etc. 

In a world where data is queen, structure is king. 

In computer science, an algorithm is associated with information processing. Data can be read from an input source, written to an output device, and stored for further processing. The stored data is considered part of the internal state of the entity executing the algorithm. In practice, the state is stored in one or more data structures.

A data structure is a format for organizing, managing and storing data that allows access and modification. In other words, it is a collection of data values, relationships between them, functions or operations that can be applied to the data.

Feel ready to join International Institute in Geneva, get a Computer Science degree and bring things further ?