ViqusViqus
Navigate
Company
Blog
About Us
Contact
System Status
Enter Viqus Hub
Back to Glossary
Technical Concepts Beginner

Algorithm

Definition

A finite, well-defined sequence of instructions or rules that takes an input, performs a series of computational steps, and produces an output — the foundational building block of all computing and AI systems.

In Depth

An algorithm is a precisely specified, finite sequence of computational steps that transforms an input into an output. Algorithms are not unique to AI — sorting a list, encrypting a password, or routing a network packet all involve algorithms. What distinguishes AI algorithms is their purpose and, often, their adaptability: machine learning algorithms are designed to learn patterns from data and update their behavior based on experience, rather than following a fixed set of hand-coded rules.

In Machine Learning, the algorithm specifies the procedure for learning from data: how to initialize the model, how to compute predictions, how to measure error (the loss function), and how to update the model's parameters to reduce that error. Gradient descent is an algorithm. Backpropagation is an algorithm. K-means clustering is an algorithm. Each defines a precise computational process that, given data, produces a trained model — which then applies a different algorithm (inference) to make predictions.

The choice of algorithm is a critical design decision in any ML project. Different algorithms make different assumptions about the data: linear regression assumes a linear relationship; decision trees assume hierarchical, rule-based structure; neural networks make fewer assumptions but require more data and compute. Algorithm selection, combined with Feature Engineering and Hyperparameter Tuning, determines the quality and efficiency of the resulting model. No single algorithm is best for all problems — the 'No Free Lunch' theorem formalizes this.

Key Takeaway

An algorithm is the recipe — the precise, step-by-step procedure that transforms inputs into outputs. In AI, algorithms learn from data, making them adaptive rather than fixed — but they are still fundamentally deterministic computational procedures.

Real-World Applications

01 Sorting and search: classic algorithms like merge sort and binary search form the efficiency backbone of every data system.
02 Machine learning training: gradient descent, k-means, and backpropagation as the algorithmic engines that train AI models from data.
03 Recommendation systems: collaborative filtering algorithms that identify similar users or items to generate personalized suggestions.
04 Encryption: cryptographic algorithms (RSA, AES) that secure communications, payments, and data storage.
05 Routing and optimization: shortest-path algorithms (Dijkstra, A*) that power maps, logistics, and network routing.