What is an algorithm? | TechTarget (2024)

What is an algorithm? | TechTarget (1)

By

  • Alexander S. Gillis,Technical Writer and Editor

An algorithm is a procedure used for solving a problem or performing a computation. Algorithms act as an exact list of instructions that conduct specified actions step by step in either hardware- or software-based routines.

Algorithms are widely used throughout all areas of IT. In mathematics, computer programming and computer science, an algorithm usually refers to a small procedure that solves a recurrent problem. Algorithms are also used as specifications for performing data processing and play a major role in automated systems.

An algorithm could be used for sorting sets of numbers or for more complicated tasks, such as recommending user content on social media. Algorithms typically start with initial input and instructions that describe a specific computation. When the computation is executed, the process produces an output.

How do algorithms work?

Algorithms work by following a set of instructions or rules to complete a task or solve a problem. They can be expressed as natural languages, programming languages, pseudocode, flowcharts and control tables. Natural language expressions are rare, as they are more ambiguous. Programming languages are normally used for expressing algorithms executed by a computer.

This article is part of

What is machine learning? Guide, definition and examples

  • Which also includes:
  • The different types of machine learning explained
  • How to build a machine learning model in 7 steps
  • CNN vs. RNN: How are they different?

Algorithms use an initial input along with a set of instructions. The input is the initial data needed to make decisions and can be represented in the form of numbers or words. The input data gets put through a set of instructions, or computations, which can include arithmetic and decision-making processes. The output is the last step in an algorithm and is normally expressed as more data.

For example, a search algorithm takes a search query as input and runs it through a set of instructions for searching through a database for relevant items to the query. Automation software acts as another example of algorithms, as automation follows a set of rules to complete tasks. Many algorithms make up automation software, and they all work to automate a given process.

What are different types of algorithms?

There are several types of algorithms, all designed to accomplish different tasks:

  • Search engine algorithm. This algorithm takes search strings of keywords and operators as input, searches its associated database for relevant webpages and returns results.
  • Encryption algorithm. This computing algorithm transforms data according to specified actions to protect it. A symmetric key algorithm, such as the Data Encryption Standard, for example, uses the same key to encrypt and decrypt data. If the algorithm is sufficiently sophisticated, no one lacking the key can decrypt the data.
  • Greedy algorithm. This algorithm solves optimization problems by finding the locally optimal solution, hoping it is the optimal solution at the global level. However, it does not guarantee the most optimal solution.
  • Recursive algorithm. This algorithm calls itself repeatedly until it solves a problem. Recursive algorithms call themselves with a smaller value every time a recursive function is invoked.
  • Backtracking algorithm. This algorithm finds a solution to a given problem in incremental approaches and solves it one piece at a time.
  • Divide-and-conquer algorithm. This common algorithm is divided into two parts. One part divides a problem into smaller subproblems. The second part solves these problems and then combines them to produce a solution.
  • Dynamic programming algorithm. This algorithm solves problems by dividing them into subproblems. The results are then stored to be applied to future corresponding problems.
  • Brute-force algorithm. This algorithm iterates all possible solutions to a problem blindly, searching for one or more solutions to a function.
  • Sorting algorithm. Sorting algorithms are used to rearrange data structures based on a comparison operator, which is used to decide a new order for data.
  • Hashing algorithm. This algorithm takes data and converts it into a uniform message with a hashing.
  • Randomized algorithm. This algorithm reduces running times and time-based complexities. It uses random elements as part of its logic.
What is an algorithm? | TechTarget (2)

What are examples of algorithms?

Machine learning is a good example of an algorithm, as it uses multiple algorithms to predict outcomes without being explicitly programmed to do so.

Machine learning uses supervised learning or unsupervised learning. In supervised learning, data scientists supply complex algorithms with labeled training data and define the variables they want the algorithm to assess for correlations. Both the input and the output of the algorithm are specified.Unsupervised machine learning involves algorithms that train on unlabeled data and sift through it to look for patterns that can be used to group data points into subsets. Most types of deep learning, including neural networks, are unsupervised algorithms.

Machine learning used in artificial intelligence also relies on algorithms. However, machine learning-based systems may have inherent biases in the data that feeds the machine learning algorithm. This could result in systems that are untrustworthy and potentially harmful.

Although algorithms are used extensively in computer science, AI and machine learning scenarios, they're also employed frequently in everyday life.

The following are some examples of algorithms used in real life:

  • Following a recipe. Recipes provide a series of steps to achieve a particular objective, such as preparing blueberry muffins or making spaghetti sauce from scratch. Recipes aim to produce consistent results and help individuals -- regardless of their background -- create a specific dish by following detailed instructions. In this way, recipes mirror computer science algorithms, which outline steps for generating reproducible outcomes.
  • Tying shoelaces. Tying shoelaces is another example of following an algorithm. For example, there are a finite number of steps that lead to a properly tied traditional shoelace knot, which is often referred to as the "bunny rabbit" or "loop, swoop and pull" knot.
  • Facial recognition. Facial recognition is widely used in iPhone logins as well as Snapchat and Instagram filters. It works by projecting facial traits from a photo or video onto a biometrics map using an algorithm. The program then looks for a match between this map and a database of faces to confirm the user's identification. If facial recognition is used for Snapchat or Instagram filters, there is no need for searching the database because the algorithm simply builds a map of the face and applies the filter to it.
  • Traffic signals. Traffic signals use smart algorithms to manage traffic flow. These algorithms group different algorithms or movements, such as going straight or turning right, into phases, which helps ensure safety and efficiency. For example, when a motorist approaches a red light, the traffic signal is cycling through these phases. By evaluating the volume of traffic, an algorithm decides when it's safe for the vehicle to move forward.
  • Sorting documents and papers. This is a great example of how algorithms can be used for various tasks and purposes, such as sorting files alphabetically, by word count, by date, or by any other specifications. When someone arranges their personal or professional documents according to a set of instructions, they are applying algorithmic thinking to simplify the organization process by using small tasks.
  • Searching for a book in the library. Finding a library book is like following an algorithm or a step-by-step plan. For example, there are different ways to do it, such as using the library's computer system or looking for labels on the shelves that show the book's genre, subject or author. No matter which method one chooses, if it can be explained and done by others, then it can be classified as an algorithm.

Discover how AI algorithms work and provide a competitive edge for businesses. Explore the main types and learn the importance of evaluating both the benefits and risks associated with these algorithms.

This was last updated in July 2024

Continue Reading About What is an algorithm?

  • Top 10 AI and machine learning trends
  • Why algorithmic auditing can't fully cope with AI bias in hiring
  • 12 key benefits of AI for business
  • What is AI governance and why do you need it?
  • Top 9 types of machine learning algorithms, with cheat sheet

Related Terms

What is NoSQL (Not Only SQL database)?
NoSQL is an approach to database management that can accommodate a wide variety of data models, including key-value, document, ...Seecompletedefinition
What is Robotics?
Robotics is a branch of engineering that involves the conception, design, manufacture and operation of robots.Seecompletedefinition
What is the Turing Test?
A Turing Test is a method of inquiry in artificial intelligence (AI) for determining whether or not a computer is capable of ...Seecompletedefinition
What is an algorithm? | TechTarget (2024)
Top Articles
What Is The Best Way To Invest Money | Dr Breathe Easy Finance
CPP And Retirement Planning: How Much Will I Get?
The Definitive Great Buildings Guide - Forge Of Empires Tips
What Happened To Father Anthony Mary Ewtn
Cvs Devoted Catalog
Erskine Plus Portal
Shariraye Update
Cool Math Games Bucketball
Cvs Learnet Modules
Alaska: Lockruf der Wildnis
Burn Ban Map Oklahoma
iOS 18 Hadir, Tapi Mana Fitur AI Apple?
Lesson 8 Skills Practice Solve Two-Step Inequalities Answer Key
979-200-6466
Swedestats
Bank Of America Financial Center Irvington Photos
Keurig Refillable Pods Walmart
Cocaine Bear Showtimes Near Regal Opry Mills
Zack Fairhurst Snapchat
Walgreens Alma School And Dynamite
Www Craigslist Madison Wi
Ac-15 Gungeon
How Taraswrld Leaks Exposed the Dark Side of TikTok Fame
Dtm Urban Dictionary
SOGo Groupware - Rechenzentrum Universität Osnabrück
Feathers
Best Town Hall 11
Bfsfcu Truecar
Valley Craigslist
Happy Shuttle Cancun Review
Courtney Roberson Rob Dyrdek
Ripsi Terzian Instagram
Autotrader Bmw X5
Fandango Pocatello
2016 Honda Accord Belt Diagram
Hotels Near New Life Plastic Surgery
Muziq Najm
Cbs Fantasy Mlb
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
Nancy Pazelt Obituary
T&Cs | Hollywood Bowl
PruittHealth hiring Certified Nursing Assistant - Third Shift in Augusta, GA | LinkedIn
How Big Is 776 000 Acres On A Map
Swoop Amazon S3
Jammiah Broomfield Ig
Ajpw Sugar Glider Worth
Spn 3464 Engine Throttle Actuator 1 Control Command
Free Carnival-themed Google Slides & PowerPoint templates
Duffield Regional Jail Mugshots 2023
Affidea ExpressCare - Affidea Ireland
Latest Posts
Article information

Author: Saturnina Altenwerth DVM

Last Updated:

Views: 6304

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Saturnina Altenwerth DVM

Birthday: 1992-08-21

Address: Apt. 237 662 Haag Mills, East Verenaport, MO 57071-5493

Phone: +331850833384

Job: District Real-Estate Architect

Hobby: Skateboarding, Taxidermy, Air sports, Painting, Knife making, Letterboxing, Inline skating

Introduction: My name is Saturnina Altenwerth DVM, I am a witty, perfect, combative, beautiful, determined, fancy, determined person who loves writing and wants to share my knowledge and understanding with you.