In computing, an Atlantic City algorithm is a randomized algorithm that answers correctly at least 75% of the time. In some variant definitions, the correctness threshold may be any value greater than 50%. In either sense, Atlantic City algorithms are a subtype of Monte Carlo algorithms.
There exists a polynomial-time Atlantic City algorithm for any problem belonging to the complexity class BPP (bounded-error probabilistic polynomial time). Atlantic City algorithms run in polynomial time and are considered "probably correct" and "definitely fast."
Las Vegas algorithms, which never return an incorrect answer (but may run indefinitely), are considered a dual of Monte Carlo algorithms and, therefore, of Atlantic City algorithms.
Origin of the Term: The term "Atlantic City" was first introduced in 1982 by J. Finn in an unpublished manuscript titled Comparison of probabilistic tests for primality. The name follows a convention of naming randomized algorithm classes after gambling destinations. Much like Monte Carlo and Las Vegas, Atlantic City (New Jersey, USA) is widely associated with casinos and gambling culture. The naming reflects the probabilistic nature of the algorithm — one where correctness is highly probable but not guaranteed.
Key distinctions among the three classes:
- Las Vegas algorithm: Always correct; runtime may vary (randomized in time).
- Monte Carlo algorithm: May err; runtime is bounded (randomized in correctness).
- Atlantic City algorithm: A specific type of Monte Carlo algorithm with a correctness threshold typically set at 75% (or any value > 50%), associated with the PP (probabilistic polynomial) complexity class.