What is an algorithm?

Once merely used in healthcare, algorithms are now increasingly used for healthcare, so what are they?

Policy briefing

Algorithms underpin all computerised tasks. They have direct application across a range of healthcare settings - from text-mining algorithms that support reviews of medical literature through to image analysis algorithms that assist pathologists to identify atypical samples, such as spotting early signs of cancer 1,2. Once merely used in healthcare, algorithms are now increasingly used for healthcare.

Despite their central role in modern health systems, most people only have an intuitive idea of what an algorithm is - a formal definition remains elusive. Indeed, the exact nature of algorithms is a point of contention in computer science. This is not just semantics, the definition of this core concept has implications for how algorithms are developed, used, regulated and protected.


  • The purpose of algorithms is to solve and often automate a solution to a particular problem
  • One useful definition suggests five criteria that must be met to qualify something as an algorithm: definiteness, inputs, outputs, finiteness and effectiveness
  • Algorithms perform crucial functions in healthcare
  • Algorithms do not currently have a legal definition
  • The lack of clear definition in the law may leave the regulation of algorithms on shaky foundations, a situation the PHG Foundation is addressing in the project Regulating algorithms in healthcare

Algorithms as problem solvers

Regardless of the context in which they are used, algorithms are essentially problem solvers - their purpose is to solve and often automate a solution to a particular problem.

Introductory textbooks on algorithms tend to outline their subject broadly, defining an algorithm as 'a set of steps to accomplish a task' 3. These definitions capture everything from cake recipes to the complex lines of code in Google Maps that calculate the quickest route to a destination.

However, definitions as broad as this provide little actual idea of what an algorithm looks like. Other definitions suggest that five criteria should be met 4.

  1. Definiteness - algorithms require precise description: specifying each step and how this step leads to the desired solution minimises subjectivity
  2. Inputs - an algorithm generally takes some value or values as inputs
  3. Outputs- an algorithm generally produces some output value or values from an initial set of defined inputs and specifies how this output value is derived
  4. Finiteness - algorithms must have a finite series of steps and terminate upon completion of these steps. If a procedure has all the characteristics of an algorithm but is not finite, then it is a computational process, not an algorithm
  5. Effectiveness - algorithms must be effective i.e. theoretically capable of computation in a finite amount of time using basic tools

Algorithms should turn inputs into outputs via a replicable, finite series of steps.

Algorithms and the law

Algorithms do not have a legal definition. Major EU Regulations such as the Medical Devices Regulation and the In Vitro Diagnostics Medical Devices Regulation mention algorithms but do not define their terms, preferring 'software' instead. Moreover, in the realm of intellectual property, past case law has relied on suspect distinctions, providing patents for algorithms but not 'mathematical algorithms'. In short, the lack of clear definition in the law may leave the regulation of algorithms on shaky foundations - employing artificial distinctions is out of step with technical understanding of the concept. While there are definitions to be found in technical standards, the question remains whether the law itself should adopt a definition.

Algorithms and healthcare: outstanding questions

Does a technical definition of algorithms have a place in law?

Is the current regulatory framework sufficient?

PHG Foundation is investigating these issues in our project Regulating algorithms in healthcare.


  1. O'Mara-Eves A, Thomas J, McNaught J, et al. Using text mining for study identification in systematic reviews: a systematic review of current approaches. Systematic Reviews; 2015. 4(5): pp.1-22.
  2. Veta M, Pluim J, van Diest P, et al. Breast Cancer Histopathology Image Analysis: A Review. IEEE Transactions on Biomedical Engineering; 2014. 61(5): pp.1400-1411.
  3. Cormen T. Algorithms Unlocked. MIT Press; 2013.
  4. Knuth D. The Art of Computer Programming: Volume 1: Fundamental Algorithms. Addison Wesley; 1997.

Genomics and policy news

Sign up