Glossary · AI and computing
Published 25 Apr 2026 · Updated 11 Nov 2026 · 15 min read
Algorithm design is the work of turning a precisely stated problem into a step-by-step procedure proven correct and efficient enough for its intended inputs. It also means analyzing how the work grows. In AI systems, designers choose what the system optimizes and how it learns from data.
A problem describes what an acceptable answer looks like for every input. An algorithm supplies the steps to find that answer. Design means finding a procedure that is correct, efficient and clear enough to examine. The specification comes first, including which output is acceptable and which constraints apply. The definitions below distinguish these ideas across computing and artificial intelligence.
| Source | Date | Definition, in its own words | What it adds |
|---|---|---|---|
| NIST, Dictionary of Algorithms and Data Structures | DateEntry modified 9 November 2020 | Definition, in its own words“A computable set of steps to achieve a desired result.” | What it addsThe shortest standard definition, from a US standards body |
| IEC 60050, International Electrotechnical Vocabulary, 171-05-07 | Date29 March 2019 | Definition, in its own words“finite set of well-defined rules for the solution of a problem in a finite number of steps” | What it addsAdds that the rules and the steps are finite |
| Donald E. Knuth, The Art of Computer Programming, Volume 1 | DateFirst edition 1968, third edition 1997 | Definition, in its own words“a finite set of rules that gives a sequence of operations for solving a specific type of problem” | What it addsFive properties: finiteness, definiteness, input, output and effectiveness |
| Jeff Erickson, Algorithms | DateFirst edition, June 2019 | Definition, in its own words“An algorithm is an explicit, precise, unambiguous, mechanically-executable sequence of elementary instructions, usually intended to accomplish a specific purpose.” | What it addsA modern textbook stresses that a machine must be able to follow every step |
| MIT OpenCourseWare 6.006, Introduction to Algorithms | DateSpring 2020 | Definition, in its own wordsAn algorithm is a “Procedure mapping each input to a single output (deterministic)”, and it “solves a problem if it returns a correct output for every problem input”. | What it addsSeparates the problem from the procedure that solves it |
| OECD, definition of an AI system | DateUpdated 8 November 2023 | Definition, in its own words“a machine-based system that, for explicit or implicit objectives, infers, from the input it receives, how to generate outputs such as predictions, content, recommendations, or decisions” | What it addsIn AI, the objective is part of the design |
MIT's Spring 2020 introduction to algorithms treats a problem specification as a relation between inputs and correct outputs. A deterministic algorithm maps each input to one output, and it solves the problem when every such output satisfies that relation. Knuth's 1997 edition of The Art of Computer Programming, Volume 1, lists five properties: finiteness, definiteness, input, output and effectiveness. These require termination and precisely defined, executable steps. In section 1.1, he also emphasizes that usefulness needs "a reasonable number" of steps, not merely a finite count.
The practice predates electronic computers. Euclid's Elements included a greatest common divisor algorithm about 300 BC. The word comes from al-Khwarizmi, who wrote a book of arithmetic rules about 825, according to NIST's Dictionary of Algorithms and Data Structures. Modern algorithm design evaluates two separate qualities: correctness and efficiency. Textbooks call an algorithm efficient when its running time is polynomial in the size of the problem. That classification concerns growth, not a promise about seconds on a particular machine.
In machine learning, the designer chooses an objective function, often expressed as a loss function, together with the data and evaluation method. The optimization algorithm may use gradient descent to seek a low value, without guaranteeing the minimum. Model training runs an algorithm that produces a model. Inference applies that model to new inputs. These are separate design tasks: learning parameters and using them need not have the same computational cost.
A useful workflow separates the required result and its constraints from the procedure that produces it. Write down the assumptions before choosing an algorithm, then revisit them when measurements reveal a mismatch.
Define the inputs, acceptable outputs and constraints. State a verifiable condition for success and a cost model. Include latency, memory, request cost, fairness and privacy where they apply.
Select a paradigm and a data structure together. Divide and conquer suits problems that split into smaller instances, and dynamic programming suits problems whose subproblem answers can be stored and reused.
Use induction, a loop invariant or an exchange argument to justify every permitted case. Test implementation behavior and edge cases that a mathematical proof does not cover.
Use big-O notation to describe time and memory complexity. Separate worst case, average case and amortized cost. Polynomial running time marks efficiency in the textbook sense.
Check the lower bound before seeking a faster algorithm. Comparison sorting needs about n lg n comparisons. For NP-hard problems, distinguish exact answers from approximation guarantees.
For AI systems, separate the objective from reported metrics. Combine offline model validation with a live A/B test. Monitor for feedback loops and drift after deployment.
No comparison-based sorting algorithm can beat about n lg n comparisons in the worst case. The lower bound is 22 for 10 items and 18,488,885 for a million. For NP-hard problems such as the shortest tour, nobody knows a polynomial-time exact algorithm. An approximation algorithm offers a proven ratio, while heuristics do not. For example, greedy load balancing guarantees a result within twice the optimum. The guarantee belongs to that specific problem, not every use of the approach.
The same input can take nanoseconds or longer than the age of the universe to process, depending on the algorithm. As inputs grow, differences in growth rates widen. Faster hardware does not remove that gap.
At 10 items, every method finishes in about a microsecond or less. Even trying all 1,024 subsets appears instant at this scale.At 100 items, insertion sort needs 4,950 comparisons and merge sort at most 664. Enumerating every subset would take about 40 trillion years.At 1,000 items, insertion sort needs nearly half a million comparisons. Merge sort needs fewer than 10,000, about 50 times fewer.At one million items, insertion sort takes about eight minutes and merge sort 0.02 seconds. Binary search needs 20 comparisons on sorted data.
Page team calculations use textbook worst-case formulas and assume one billion comparisons a second. These are estimates, not measured runtimes.
Linear search grows with n. Binary search grows with lg n, but requires sorted input. Insertion sort grows with n squared, while merge sort grows with n lg n. At a million items, their counts are roughly 500 billion and 20 million comparisons. Trying every subset grows as 2^n, becoming impractical beyond a few dozen items. Search, sorting and enumeration solve different tasks. The figure compares growth patterns, not interchangeable algorithms.
Growth can outweigh processor speed. The CLRS textbook's second edition gives merge sort about 100 seconds on a computer 100 times slower. Insertion sort takes 2,000 seconds for the same million numbers. PCAST's December 2010 report describes a planning model that would have taken 82 years in 1988. In 2003, it could be solved in roughly one minute. The speedup factor of roughly 43 million combined factors of 43,000 from algorithms and 1,000 from processors. These algorithmic breakthroughs show why complexity matters alongside hardware.
Taking the largest available coin feels natural when making change. This algorithm commits to each local choice without revisiting it. That can save work, but a fast decision rule does not automatically minimize the final number of coins.
US coins are canonical. Greedy matches the optimum for every tested amount from 1 to 3,000 cents.At 6, picking 4 then two 1s uses three coins instead of two 3s. It fails at 749 amounts up to 3,000.At 140, the rule uses eight stamps instead of two 70s. It fails at 1,860 amounts up to 3,000 in this postage system.This greedy answer is optimal for the selected amount. One matching answer does not establish a guarantee for every amount.
The page team compared greedy with dynamic programming for every amount from 1 to 3,000 in each system.
Greedy change-making minimizes coins for the US set of 1, 5, 10 and 25 cents. With denominations 1, 3 and 4, its first failure occurs at 6 cents. Kleinberg and Tardos's postage example first fails at 30. At 140, it needs eight stamps instead of two. A system where the rule is optimal for every amount is called canonical. Pearson's 1994 test checks that property in time polynomial in the number of coin types, without trying amounts one by one.
Dynamic programming solves each amount exactly by reusing answers for smaller amounts. The coin choice becomes a comparison of complete alternatives, not just denominations. The same issue appears in the 0/1 knapsack problem. In Kleinberg and Tardos's 11 kg example, greedy selection by value per kilogram reaches $35, while the optimum is $40. A local-choice algorithm belongs where a proof supports it, as with minimum spanning trees. Otherwise, speed alone cannot establish optimality.
Choosing what to maximize changes what people see. In recommendation systems, an AI model follows the objective built into its algorithm. Ranking algorithms can prioritize clicks, viewing time or another signal. That choice has consequences beyond the reported score.
Ranking by clicks yields 93 clicks per 1,000 impressions, but just 127 watched minutes. Only 37% of clicks reach videos rated useful.Ranking by watch time yields 430 minutes and 70% usefulness. It includes a long lecture rated useful by only 35% of viewers.Excluding videos below 60% usefulness reduces watch time to 248 minutes. Usefulness reaches 78%, the highest share among these three lists.
This six-video catalogue and its numbers are made up to illustrate trade-offs, not measure a real recommendation system.
YouTube shifted from clicks toward time watched in March 2012 because clicks did not reliably indicate interest. Its September 2016 recommendation paper described clickbait that viewers did not finish. It also reported tuning the ranking objective through live A/B testing, since offline experiments did not always match live results. Facebook's January 2018 shift toward meaningful interactions illustrates a different trade-off. Facebook's 31 January 2018 results said changes made in late 2017, such as showing fewer viral videos, cut time spent by roughly 50 million hours a day.
Goodhart's 1975 observation is often quoted as "when a measure becomes a target, it ceases to be a good measure", wording usually credited to Marilyn Strathern (1997). DeepMind calls it specification gaming when a system meets an objective literally but misses its intent. Sculley and colleagues (2015) warn that a model can shape its own future training data. Google's Rules of Machine Learning call a launch easy only when no metric gets worse, so teams pair metric selection with guardrail metrics and live tests.
The table distinguishes strategies by their guarantees, costs and failure modes. Brute force checks every candidate. Divide and conquer splits work into smaller instances. Backtracking and branch and bound explore alternatives. A randomized algorithm uses chance, while learned approaches fit machine learning models to observations.
| Paradigm | Idea | When it fits | What it guarantees | Typical cost | Classic example | Main risk |
|---|---|---|---|---|---|---|
| Brute force | IdeaTry every candidate | When it fitsTiny inputs, or a reference answer for testing | What it guaranteesExact, if every candidate is checked | Typical costOften exponential: 2^n subsets of n items | Classic exampleChecking all subsets | Main riskBlows up as n grows |
| Divide and conquer | IdeaSplit into smaller instances, solve them recursively, combine | When it fitsProblems that split cleanly | What it guaranteesExact | Typical costMerge sort: Θ(n log n) | Classic exampleMerge sort | Main riskThe combine step or recursion overhead |
| Greedy | IdeaTake the best local choice at each step | When it fitsProblems with a proof that local choices add up | What it guaranteesOptimal only where a proof exists | Typical costUsually a sort plus one pass | Classic exampleMinimum spanning trees, US coins | Main riskSilent wrong answers on other inputs |
| Dynamic programming | IdeaCache the answers to subproblems | When it fitsOverlapping subproblems | What it guaranteesExact optimum | Typical costStates times work per state: Θ(nW) for knapsack | Classic example0/1 knapsack, change-making | Main riskToo many states for memory or time |
| Backtracking, branch and bound | IdeaTry choices and abandon those that cannot win | When it fitsSearch spaces with good bounds | What it guaranteesExact when the search finishes | Typical costExponential in the worst case | Classic examplePuzzles, scheduling | Main riskWeak bounds explore everything |
| Randomized | IdeaMake random choices | When it fitsInputs an adversary might choose | What it guaranteesExpected time or probability bounds | Typical costQuicksort: typically O(n log n), Θ(n²) in the worst case | Classic exampleQuicksort, randomized hashing | Main riskBad luck or a weak random source |
| Approximation | IdeaRun in polynomial time with a proven ratio to the optimum | When it fitsNP-hard optimization problems | What it guaranteesA stated performance guarantee | Typical costPolynomial | Classic exampleGreedy load balancing, a 2-approximation | Main riskThe ratio may be loose, and some ratios are impossible unless P = NP |
| Heuristics | IdeaUsually work, with no guarantee | When it fitsSpeed matters more than a proof | What it guaranteesNone | Typical costFast by design | Classic exampleTraveling salesman heuristics a few percent from optimal | Main riskNo warning when they fail |
| Learned, machine learning based | IdeaFit a model to data and use it as, or to search for, the algorithm | When it fitsPlenty of representative data | What it guaranteesMeasured, not proven | Typical costTraining plus inference | Classic exampleLearned indexes, AlphaDev | Main riskDistribution shift, metric gaming, no worst-case bound for a learned model |
Read guarantees before comparing speed. An exact algorithm must finish its search, and its complexity may make that impractical. Optimization algorithms can instead provide a stated approximation ratio or a measured result without a proof of optimality. Heuristic creation requires another distinction: a heuristic guiding exact search is not necessarily an algorithm without guarantees. A* can use an estimate that never overestimates to guide exact search. Learned methods depend on the distribution of the observations they fit.
The field grew from written arithmetic procedures into formal computation, complexity theory and learned methods. These milestones track different contributions rather than a single line of progress. Each changed what designers could describe, analyze or implement.
Euclid's Elements contained an algorithm for finding the greatest common divisor of two natural numbers. It appeared in Book 7, Propositions 1 and 2.
Al-Khwarizmi wrote a book of arithmetic rules. His name later gave the word algorithm its form, as NIST's Dictionary of Algorithms and Data Structures explained.
Ada Lovelace published notes on Babbage's Analytical Engine. Note G included steps for computing Bernoulli numbers, presenting a procedure for the proposed machine.
Alan Turing's paper On Computable Numbers, received on 28 May 1936, defined a model of mechanical computation that later work used to reason about what machines can compute.
Edsger Dijkstra published his shortest-path method in the journal Numerische Mathematik. It settles the closest unvisited node first, a greedy strategy that works when no edge has a negative length.
Stephen Cook presented his NP-completeness paper at STOC, held from 3 to 5 May 1971. Richard Karp followed with 21 problems in 1972.
Rumelhart, Hinton and Williams published Learning representations by back-propagating errors in Nature on 9 October 1986. The method passes error signals backward through a network to adjust its weights during training.
AlphaDev's machine-discovered sorting routines appeared in Nature on 7 June 2023. The routines had already entered the LLVM libc++ library on 8 April 2022.
Proofs and benchmarks establish different kinds of confidence. Neither removes every constraint on a deployed algorithm. Some limits concern what can be computed economically. Others concern changed conditions, hostile behavior or the gap between a score and a useful result.
Unless P equals NP, no algorithm solves these problems exactly in polynomial time. Cook's 1971 and Karp's 1972 results explain why designers consider approximations or heuristics.
Wolpert and Macready's April 1997 result rules out universal superiority across all problems. An algorithm's gains over one class are offset elsewhere, so performance claims need assumptions about the task.
The December 2020 WILDS benchmark describes accuracy losses when training and test distributions differ. NIST warned in January 2023 that data can become detached from their intended context.
Every objective is a proxy for what people need. Pushed hard, a system finds ways to score well that miss the goal, so the gap needs watching after launch.
Crosby and Wallach's August 2003 study showed chosen input degrading trees and hash tables into lists, dropping up to 71% of server traffic. Randomized hash functions address collision attacks.
Patterson and colleagues estimated in April 2021 that training GPT-3 used 1,287 MWh of electricity. These were their estimates for another organization's model, not measurements by this page.
We design and implement algorithms and machine learning models for recommendation, forecasting, search and optimization. Evaluation and monitoring start with the use case, not only after launch. PixelPlex, a software engineering company founded in 2007, builds AI and machine learning systems alongside its blockchain work.
Our 2022 CheckNFT.iO case study shows distinct algorithms serving different tasks. One model compares token names to catch manipulated symbols or replaced letters. Image similarity search builds embeddings with convolutional neural networks, then finds the closest image with a nearest neighbor algorithm. Wash trading detection connects interacting groups and looks for unusual patterns.
Discuss the choices behind your next algorithm
Share the problem, constraints and evaluation goals. We can discuss an algorithm or model design that fits those requirements.
Discuss your projectGet updates about blockchain, technologies and our company
We will process the personal data you provide in accordance with our Privacy policy. You can unsubscribe or change your preferences at any time by clicking the link in any email.Services
Blockchain
Blockchain consultingStrategy, architecture, feasibility
Crypto wallet developmentSelf-custody, MPC, cards on top
Cryptocurrency exchange developmentTrading venues, liquidity and protocols
Tokenization servicesRWA, funds, collateral
Crypto payments developmentAccept, settle and pay out in crypto
Smart contracts developmentDesign, build, audit
Blockchain integration dApp development DeFi development NFTs Tokens Web3 development All blockchain services All servicesNetworks
Canton developmentDaml apps, wallets, settlement, validators
Official Partner
Ethereum developmentSmart contracts, L2s and dApps
Solana developmentHigh-throughput programs and dApps
TON developmentMini apps, wallets, Telegram ecosystem
Official Partner
Hedera developmentHashgraph apps and token services
Exclusive Partner
Hyperledger developmentPermissioned networks for enterprises
Certified Partner
Cardano Algorand Stellar Avalanche Bitcoin Polygon All networks All servicesAI & ML
AI agents developmentConnect tools and automate multi-step workflows
RAG developmentFind answers across your company’s documents and systems
AI copilot developmentAdd useful assistance to your product or internal tools
LLM developmentCustom and fine-tuned models for your domain
Private AI deploymentRun models in your own environment
AI consultingUse cases, feasibility and a roadmap
Generative AI development Machine learning development Computer vision Chatbot development ChatGPT integration Deep learning development All AI services All servicesData & analytics
Data engineeringPipelines that keep your data reliable
Data platform developmentOne source of truth for analytics
Analytics & dashboards developmentBI your teams actually use
Predictive analyticsForecasts built on your own history
Data strategyWhere data can pay off first
Data visualizationDashboards and visual stories from your data
Data science development Development of data marts All data services All servicesSoftware
Product discoveryValidate scope and cost before you build
MVP developmentA launch-ready first release
Web application developmentPlatforms, portals and internal tools
Mobile app developmentiOS, Android and cross-platform
SaaS developmentMulti-tenant products that scale
Software integrationConnect the systems you already run
Infrastructure & cloud cost UI/UX design IT consulting QA & software testing R&D Serverless development All software services All servicesSecurity & compliance
Smart contract auditsFind vulnerabilities before launch
Transaction monitoring developmentIntercepta inside your systems and processes
Security assessmentsTest apps, infrastructure and processes
Data security servicesProtect sensitive data across its lifecycle
Cloud security servicesSecure cloud workloads and configurations
DAML smart contract auditReview DAML contracts before they go live
All security services All servicesSolutions
Products, APIs and platforms
New
Products and engineering to build and operate on Canton.
In production 55M API requests served in 8 months
Crypto APIBlockchain data for your applications.
Power in numbers 6 TB Data storage. 500K Tokens indexed
RWA platformA foundation for your asset tokenization platform.
Time to launch 2–4 weeks Branding & setup. 90% more cost-efficient
DocFlowBlockchain-based document management.
Use case & value 100% Secure workflows. Zero third-party risks.
OTC Hawk Arbitrage Bot Book a solution consultWork
450+ projects. 250+ clients. 3 unicorns in portfolio
The first non-custodial wallet built natively for Canton
TON ecosystemA series of improvements for The Open Network
Mining platformEnvironmentally friendly web platform for Bitcoin pool mining
Mantra DAOCommunity-governed DeFi: 60+ staking pools, $23M TVL
Canton TON Web3 & DeFi Digital Assets & Tokenization AI & Data Intelligence IoT & Edge Computing Consulting See all projectsIndustries
Trusted by startups, small businesses, and enterprises
Banking, payments, lending, insurance, capital markets
Real estate software developmentInvestment, property operations, tokenization
Retail & commerce software developmentCommerce, loyalty and fulfillment
Supply chain software developmentTraceability and connected operations
Healthcare software developmentPatient services, data and connected systems
Banking software developmentCore banking, digital channels, payments
Fitness Education Oil & Gas Insurance Construction Travel All industriesCompany
From R&D to launch, we bring any of your ideas to life
Engineering partner. Product builder. Since 2007.
Technical experience 19+ years All competencies on board. Scalable team.
AchievementsIndustry recognition & awards.
Delivering real value 4.9 Clutch ratings. 150+ awards
Contact usDiscuss your project.
Quick response 30 min Average reply time. Offices in 6 countries
BlogDive into the latest software trends.
Fresh insights 500+ Articles in blockchain, AI, big data, AR/VR
Team Careers Social responsibility Glossary