Agrawal–Biswas primality test Created 2026-09-24 Updated 2026-11-05
The Agrawal–Biswas primality test tests a formal polynomial identity in :For , the identity holds exactly when is a prime number. Testing a formal polynomial is stronger than evaluating it at residues.
The randomized algorithm first handles prime numbers at most thirteen, divisibility by them, and perfect powers. For remaining , choose a monic polynomial of polynomial degree , with independent uniform lower coefficients modulo . Compute the remainder of modulo using exponentiation by squaring. A nonzero remainder proves compositeness. The monic polynomial permits division even when the coefficient ring has zero divisors.
Every prime number passes. After preprocessing, a composite number is rejected with probability at least per trial, so independent trials give error at most . Keeping remainders below polynomial degree makes the computation polynomial time in the bit length of .[ref]
Amortized analysis Created 2026-10-14 Updated 2026-10-18
Amortized analysis bounds the total cost of every permitted sequence of operations from a specified initial state. An amortized bound means that some constants satisfy for every such sequence of length . The cost model and allowed operations are part of the claim; Big O notation alone does not specify them.
- A worst-case bound for one operation limits its cost in any reachable state. Summing these separate maxima can overestimate the cost of a whole sequence because expensive states may take many cheap operations to rebuild.
- An amortized analysis limits the total over every allowed sequence, including an unfavourably chosen one. Dividing that bound by the number of operations is a deterministic guarantee about the sequence.
- A probabilistic average-case analysis bounds an expected value under a stated probability distribution on inputs. For a randomized algorithm, an expected value can instead average over its random choices. Neither interpretation is required by a deterministic amortized analysis.
This distinction, and the credit and potential method viewpoints, are developed in R. Endre Tarjan's 1985 paper Amortized Computational Complexity, sections 1–2, pp. 306–308. The dynamic array doubling example below shows how an expensive operation can pay for itself through the cheap operations that precede it.
Arjen K. Lenstra 2026-11-05
Arjen K. Lenstra works in computational number theory and cryptography. With Hendrik W. Lenstra and László Lovász, he authored the 1982 paper introducing the LLL algorithm and applying lattice reduction to factoring polynomials with rational number coefficients in polynomial time.[ref]
Factoring Polynomials with Rational Coefficients by Arjen K. Lenstra and others. Introduction, section 1 and polynomial factorization construction
A rational factorization can be converted to an integer-coefficient problem, then studied through modular information and short lattice vectors. Reduction helps recover an exact factor from that indirect arithmetic data. The achievement concerns polynomial factorization; it does not provide a polynomial-time algorithm for general integer factorization. His EPFL interview describes his introduction to randomized algorithms and his approach to teaching mathematical computation.[ref]
https://actu.epfl.ch/news/arjen-lenstra-la-craie-le-tableau-noir-et-le-tourn/. 2019 institutional interview
Arjen Lenstra, photograph in EPFL 2019 interview
. Avi Wigderson 2026-11-05
Avi Wigderson studies computational complexity theory, including the role of randomized algorithms in efficient computation. His research connects pseudorandom generators, computational hardness and derandomization. His book Mathematics and Computation by Avi Wigderson explains how sufficiently strong circuit-hardness assumptions can supply generators that fool efficient computational tests.[ref]
Mathematics and Computation by Avi Wigderson. Chapter 7, especially §7.3.2, pseudorandom generators from hard problems
The mechanism turns a lower-bound assumption into an algorithmic resource. If a generator with a short seed preserves a randomized computation's acceptance probability closely enough, enumerating all seeds can replace sampling random bits. The seed must be short enough for that enumeration to meet the claimed time bound; simply fixing one arbitrary seed does not supply the guarantee. This makes the power of randomness a precise question about computation rather than a visual impression that an output “looks random”.
Portrait of Avi Wigderson
. Source. Boaz Barak 2026-11-05
Boaz Barak works on computational complexity theory, cryptography and the mathematical foundations of machine learning. His research homepage describes these interests and identifies his textbooks and lecture notes.[ref] His Introduction to Theoretical Computer Science by Boaz Barak develops computation through explicit models and resource bounds.
One example is pseudorandomness: a generated distribution can look random to efficient observers even though an unrestricted observer distinguishes it. Specifying the observer turns “looks random” into a mathematical guarantee, and connects a pseudorandom generator with the randomized algorithms it can safely simulate.[ref]
Introduction to Theoretical Computer Science by Boaz Barak. Modeling randomized computation, Pseudorandom generators
Portrait of Boaz Barak
. Portrait identified on the Harvard Lowell House profile. Source. Carla P. Gomes 2026-11-05
Carla P. Gomes studies algorithms for difficult search problems. With Bart Selman, she investigated algorithm portfolios: policies that combine candidate algorithms or randomized runs to exploit complementary runtime behavior. Their 2001 paper compared concurrent execution, interleaving and restart policies under specified problem distributions.[ref]
Algorithm portfolios by Carla P. Gomes and Bart Selman. Page43, byline and Abstract; sections4–5, portfolio comparisons
A portfolio's benefit depends on how its runs behave together. For an original model, let one randomized algorithm finish in one second with probability and in ten seconds otherwise. Its expected value of completion time is seconds. Run two copies on separate full-speed CPUs and stop both at the first acceptable answer. With independent random variables for their completion times, both are slow with probability , so mean wall time isIf their completion times are identical on every trial, that mean remains seconds. Different run labels do not establish independence.
The faster wall time also has a resource cost. In the stipulated independent model, both CPUs run until the first completion, consuming mean total work CPU-seconds. This exceeds the single-run mean even though the answer arrives sooner. Gomes and Selman's portfolio approach makes such choices explicit: a useful policy is assessed against its workload, stopping rule and resource budget, rather than presumed universally faster.
Classical computation 2026-11-05
Classical computation processes information described by classical states and transition rules, in contrast with computations that use coherent quantum states. A digital classical model commonly represents data by bits; a Boolean circuit or Turing machine supplies rules for transforming those representations. A randomized algorithm adds random choices, while each particular execution still follows one sequence of classical states.
For example, an AND gate maps two input bits to one output bit, with output one only for input
11. A probabilistic selection between two inputs describes uncertainty about which classical state was used; it is not a coherent quantum superposition of those inputs. Stating the model separates the abstract information-processing rule from its physical implementation: ordinary electronic devices ultimately obey quantum physics even when their exposed computational behavior is classical. Conditional expectations algorithm cost 2026-10-18
Directly scanning all edges to evaluate each child of each of choices takes elementary operations, in Big O notation. There is a faster implementation. When assigning vertex , let and count its already assigned graph neighbours labelled zero and one. Contributions from edges not incident to are unchanged, and contributions from edges to unassigned graph neighbours stay for either choice. ThereforeChoose zero if , otherwise one: put on the side with fewer already assigned graph neighbours. With adjacency lists, scanning each vertex's list once costs operations overall and uses storage including the graph. These bounds count operations on labels and counters that fit in machine words of bits. Multiplying the conditional expectation cut formula by two also permits exact integer comparisons without rounding.
If is the size of a maximum cut, then . The constructed cut of a graph thus has size at least , an approximation ratio of in the maximization convention. The five-versus-six example illustrates the gap between this guarantee and exact optimization.
For a general randomized algorithm, the averaging proof alone does not establish efficient derandomization. One needs a polynomial number of commitments, an efficient way to find a suitable child at each step, and manageable representations and evaluation costs for the relevant conditional expectations. Those evaluations can themselves be hard. Enumerating all completions verifies this small example, but would take exponentially many assignments as grows. The polynomial-time algorithm here comes from the local conditional expectation cut formula, not from that enumeration.
Deterministic algorithm 2026-11-05
A deterministic algorithm has one prescribed next step for each permitted input and current computational state. Thus the same input and initial state give the same execution trace and, if execution terminates, the same output. This is a statement about the abstract transition rules, not about identical elapsed time on different computers.
Binary search with a fixed midpoint rule is deterministic: every comparison determines which remaining interval is searched next. Quicksort with a fixed pivot-selection rule is also deterministic, even though different inputs can produce very different running times. Determinism therefore does not imply a constant or small time complexity.
A randomized algorithm additionally receives random choices. Fixing its entire random-choice sequence makes its subsequent execution deterministic, but averaging over those choices is essential to its randomized guarantees. A Nondeterministic Turing machine is a different mathematical model: its branches describe possible computation paths, rather than a probability distribution supplied by an implementation.
For a nonnegative counting quantity , an FPRAS is a randomized algorithm with the displayed guarantee, running in time polynomial in encoded input length, and . The usual constant-success definition is equivalent by independent repetition and a median. This counting notion differs from a deterministic fully polynomial-time approximation scheme for optimization.
Ilse Ipsen Created 2026-10-14 Updated 2026-11-05
Ilse Ipsen works in numerical linear algebra, randomized algorithms, the theory of matrices and scientific computing. Her research also connects numerical methods with nonlinear problems, parameter estimation and statistics. These topics concern both efficient computation and how approximation errors or perturbations affect the reliability of a calculated result.[ref]
Portrait of Ilse Ipsen
. Portrait identified on the NC State University profile. Interactive proof system 2026-11-05
An interactive proof system is a protocol in which a prover in an interactive proof exchanges messages with a verifier in an interactive proof to establish a public statement. The verifier is a randomized algorithm running in polynomial time; the prover need not have that resource bound. Completeness of an interactive proof and soundness of an interactive proof specify acceptance behavior on true and false statements.[ref]
For a decision problem represented by a set , write the acceptance bounds asThe first condition supplies an honest proving strategy; the second constrains every cheating strategy, including adaptive answers. The bounds need a useful separation between and .
Graph non-isomorphism gives a concrete protocol. Given two graphs on the same number of vertices, the verifier secretly chooses a uniform bit , randomly relabels using a permutation, and sends the result . The prover guesses which input graph was chosen; the verifier accepts exactly when the guess equals .[ref]
If the graphs are non-isomorphic, an unrestricted prover can identify the correct isomorphism class and always answer correctly. If they are isomorphic, the two ways of generating have identical probability distributions, so gives no information about and any guess succeeds with probability . The verifier's secret random choice creates the test. This soundness argument alone makes no claim that the protocol is a zero-knowledge proof.
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.
Michael O. Rabin 2026-11-05
Michael O. Rabin analyzed a randomized algorithm for primality testing in his 1980 paper. The Miller-Rabin primality test checks whether a candidate integer satisfies conditions obeyed by primes under modular exponentiation. A failed check certifies compositeness; passing a check gives a probable prime, not a proof of primality.[ref]
For each fixed odd composite candidate, at most one quarter of the admissible bases are strong liars. Independent uniformly chosen bases therefore reduce the probability of accepting that composite to at most after rounds. This probability is over the test's choices for a fixed input; it is not a posterior probability that an arbitrary accepted integer is prime.
Nicholas Harvey Created 2026-10-18 Updated 2026-11-05
Nicholas Harvey is a computer scientist whose research includes the theory of machine learning, randomized algorithms and convex optimization. His teaching work includes a draft text on randomized algorithms, with separate undergraduate and graduate volumes.[ref]
These subjects meet in the analysis of decisions made from limited data or random choices. A randomized algorithm specifies both a computational procedure and a distribution over its choices; its analysis can bound expected work or the chance of an incorrect result. Keeping those guarantees distinct is central to understanding what randomness contributes.
Identity source: www.cs.ubc.ca/~nickhar/W12/
Portrait of Nicholas Harvey
. Portrait identified on the cited institutional profile. No-regret learning 2026-11-05
In online learning, a learner chooses before observing the round's loss function . Its external cumulative regret against a fixed action set isNo-regret learning seeks a guarantee , often in expectation for a randomized algorithm, under stated feedback and adversary assumptions. The average excess loss then tends to zero. The comparator is the best single action in hindsight; it does not choose the best action separately on every round.
For example, against two prediction rules, an exponential-weights learner starts with equal weights and multiplies rule 's weight by after seeing all rule losses. Sampling in proportion to the weights gradually shifts probability toward better rules. For losses in , an appropriate learning rate gives an order- expected bound for this fixed two-rule setting. This compares performance even without independent observations from one fixed distribution; it does not guarantee small absolute loss when every rule predicts badly.
One-sided error Created 2026-09-24 Updated 2026-10-18
A randomized decision algorithm has one-sided error when one answer is always correct and only the other answer can be mistaken.
The guarantee concerns each fixed input, with probability taken over the choices of the randomized algorithm. Always state which answer is protected. In polynomial identity testing, call an input positive when its polynomial is identically zero, and let acceptance mean claiming an identity. Then the possibilities are:
| Actual polynomial | Accept: claim identity | Reject: claim nonidentity |
|---|---|---|
| Identically zero | Always correct; every trial accepts. | Impossible with exact polynomial evaluation. |
| Nonzero | Possible mistake if the chosen point is a zero. | Always correct; the point is a witness. |
Thus a zero polynomial evaluation can leave uncertainty, but a nonzero polynomial evaluation settles the question. An error bound for a fixed nonzero polynomial is not the conditional probability that a particular accepted input is an identity; that latter question would need a distribution on the inputs as well.
In computational complexity theory, a polynomial-time algorithm with this orientation and false acceptance probability at most establishes membership in co-RP. Reversing the question to ask whether the polynomial is nonzero gives the RP orientation: negative instances are always rejected. The random evaluation test for a polynomial identity explains the required field, total degree, sampling and evaluation assumptions.
Set . Independently sample an edge coloring exactly as in part (d), count its monochromatic copies of by examining all four-vertex subsets, and accept precisely when . Otherwise start over with a fresh edge coloring.
To prove an expected polynomial time bound, the existence argument alone is insufficient: we need a lower bound on the acceptance probability at this exact threshold. Since is a nonnegative integer with expectation , rejection implies . Markov's inequality therefore gives the integer-valued expectation threshold restart boundThe number of attempts has a geometric distribution, with expectation at most . Sampling the edge coloring costs random bits, and checking all four-vertex subsets costs operations, since only six edges must be tested per subset. HenceThis is a randomized algorithm that always returns an edge coloring meeting the original threshold and terminates with probability one. The stated operation count uses -bit counters; counting their bit complexity explicitly introduces at most a further logarithm factor and still gives polynomial time. For , return any edge coloring immediately.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 124 4 i Solution Created 2026-09-24 Updated 2026-09-25
A language belongs to RP when a polynomial-time randomized algorithm rejects every and accepts every with probability at least .
Amplify the algorithm on length- inputs with independent repetitions, accepting if any repetition accepts. Its error on each positive input is at most , while it still never accepts a negative input. Choose all random bits for all repetitions in advance. By the union bound, the probability that this one fixed choice fails on at least one of the at most positive strings is at mostThus some random string works simultaneously for every input of length . Hardwire that string into the polynomial-time computation and compile it into a Boolean circuit. The resulting polynomial-size circuit family decides , proving
Pseudorandom generator 2026-11-05
A pseudorandom generator is a deterministic, efficiently computable function with , whose output on a uniform seed is computationally indistinguishable from a uniform -bit string. Its security is relative to a specified class of tests.
For example, suppose a generator maps 128 seed bits to 256 output bits. Its range contains at most strings out of possibilities. Enumerating the range would distinguish it almost perfectly, but requires infeasible work at this size. A secure construction must resist efficient tests that avoid enumeration as well. Merely copying the seed twice fails immediately: a test compares the two halves. Useful generators enable randomized algorithms or cryptographic protocols to expand a limited supply of random seed material.[ref]
Introduction to Theoretical Computer Science by Boaz Barak. Modeling randomized computation, Pseudorandom generators





