Algorithm Created 2026-09-24 Updated 2026-10-13
Here "finite" refers to the description: a short algorithm can perform arbitrarily many steps on increasingly large inputs. Solving a computational problem additionally requires termination and the specified output on every permitted input. State assumptions explicitly: binary search requires a sorted array.
An algorithm is an idea that can have implementations in different programming languages. Its explanation should make three things visible: the permitted inputs, the rule for each step, and the meaning of the returned output. Algorithm correctness then separates finding the right answer from eventually finishing; time complexity asks how much work finishing requires.
A particularly useful design question is: what knowledge survives each step? In binary search, it is the location of every possible match inside the remaining candidate range. Writing that fact as a loop invariant turns an intuitive shortcut into a procedure whose discarded candidates can be justified. This often helps discover the algorithm, rather than merely check it afterward.
Competitive programming Created 2026-10-20 Updated 2026-10-24
Competitive programming asks participants to design and implement algorithms for specified computational problems, usually with constraints on time complexity and space complexity. A successful solution combines a correctness argument with an implementation that fits the available resources.
Complexity class 2026-09-24
A complexity class is a collection of computational problems sharing specified resource bounds and a computational model.
Computational complexity theory Created 2026-09-24 Updated 2026-11-05
Computational complexity theory studies the resources required to solve families of computational problems. A statement specifies an input encoding and a model of computation, then measures resources such as running time, computer memory or query complexity as the encoded input length grows. An algorithm's upper bound describes one method; a problem lower bound constrains every permitted algorithm in the stated model.
For decision problems, a complexity class collects problems with a shared resource guarantee. P uses deterministic polynomial time; NP permits polynomially bounded witnesses checked in polynomial time. The distinction separates finding an answer from verifying a supplied certificate.[ref]
The cost model is part of the mathematics. Bit complexity charges for arithmetic on operands of growing size, while a comparison model counts comparisons of keys. A polynomial-time algorithm also need not be practical at every scale: its exponent and constants still affect actual running time. These distinctions make complexity bounds useful for comparing both mathematical possibilities and concrete implementations.
Computational problem Created 2026-09-24 Updated 2026-11-05
A computational problem specifies what counts as a valid output for each permitted input. A binary relation can express this requirement: means that is a valid answer to . The computational problem is the specification; an algorithm is a proposed way to satisfy it.
For example, given an array and value , under the promise that occurs, a search problem can request any index with . Repeated values may give several valid outputs. The related decision problem only asks whether an occurrence exists and requires a yes-or-no answer. Stating the encoding, permitted instances and required answer prevents these tasks from being confused when comparing running time or verification costs.
Manindra Agrawal 2026-11-05
Manindra Agrawal coauthored Primality and Identity Testing via Chinese Remaindering by Manindra Agrawal and Somenath Biswas with Somenath Biswas in 2003. The paper connects primality testing to polynomial identity testing, using randomized algorithms for circuit-represented polynomials over finite fields, the rationals and, for one procedure, integers modulo an arbitrary candidate.[ref]
The computational problem is not simply evaluating an already expanded polynomial: a compact arithmetic circuit may encode exponentially many polynomial coefficients. A successful test must exploit that representation without materializing the expansion. This distinction connects an algebraic identity to an implementable randomized algorithm.
Parity lower bound for Boolean queries 2026-10-14
For three bits, the Boolean function outputs one when is odd, where denotes exclusive or. Unlike the three-bit majority decision tree, an exact decision tree computing parity must inspect all three bits on every input. If any coordinate is unread, two completions differing only at that coordinate follow the same observed graph path but have opposite parity. A single leaf cannot correctly label both.
The same argument works for bits: parity needs all queries on every input, whatever their order. Thus its decision-tree depth is , its expected query cost is for every input probability distribution, and each coordinate revealment is one. The algorithm remains required to be correct on the whole Boolean cube, even if the chosen probability distribution assigns some inputs zero probability; a promise restricting permitted inputs would be a different computational problem.
Polynomial-time reduction Created 2026-10-03 Updated 2026-11-05
A polynomial-time reduction uses a solver for one computational problem to solve another with polynomial overhead, while preserving the required answer. Efficiently transforming data alone is insufficient: the transformation must come with a correctness argument connecting the two tasks.
For a polynomial-time many-one reduction between decision problems , one function satisfiesA polynomial-time Turing reduction instead permits adaptively chosen queries to a solver for . Writing the queries and processing their answers count toward the reduction's resource bound. These are different reduction conventions and should be named explicitly.
If has a polynomial-time algorithm, either such reduction supplies one for : query lengths and the total number of queries are polynomially bounded, so replacing each solver call preserves a polynomial total running time. Conversely, a reduction from a hard helps establish a lower bound on .