Math 2.0

Computer science Definition

RP

Builds on Probabilistic Turing machineComplexity classFormal language

Definition

A language L⊆{0,1}∗L \subseteq \set{0,1}^* is in RP if there are a polynomial pp and a probabilistic Turing machine MM such that:

  1. on every input xx and for every outcome of its coin flips, MM halts within p(∣x∣)p(\abs{x}) steps and outputs 00 or 11;
  2. for every x∈Lx \in L, Pr⁡[M(x)=1]≥1/2\Pr[M(x) = 1] \ge 1/2;
  3. for every x∉Lx \notin L, Pr⁡[M(x)=1]=0\Pr[M(x) = 1] = 0.

The class co-RP is the class of complements of languages in RP.

Remarks

Example: let LL be the set of triples (A,B,C)(A, B, C) of n×nn \times n matrices over 𝔽2\F_2 with AB≠CAB \ne C. The machine picks a uniform r∈𝔽2nr \in \F_2^n and accepts if A(Br)≠CrA(Br) \ne Cr. If AB=CAB = C, it never accepts; if AB≠CAB \ne C, the matrix D=AB−CD = AB - C has a nonzero row, so Dr≠0Dr \ne 0 for at least half of the vectors rr. So LL is in RP.

Non-example: a machine that accepts some x∉Lx \notin L with probability 1/1001/100 fails clause 3, even if its error is small. Such two-sided error is allowed in BPP but not in RP.

The constant 1/21/2 in clause 2 can be replaced by any constant in (0,1)(0, 1), or by 1−2−q(n)1 - 2^{-q(n)} for a polynomial qq, by independent repetition. Clauses 2 and 3 show that an accepting run exists exactly for x∈Lx \in L, so an accepting sequence of coin flips is a certificate of membership and RP⊆NP\mathrm{RP} \subseteq \mathrm{NP}.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Complexity class concept
  2. Formal language concept
  3. Probabilistic Turing machine concept
  4. RP definition

Further reading

  1. Web https://en.wikipedia.org/wiki/RP_(complexity)
About this page
TagAW47M07M78
URIm2://AW47M07M78
Kinddefinition
WritingW0 stub
MSC68Q15, 68Q10, 68W20
DefinesRP
UsesProbabilistic Turing machine, Complexity class, Formal language
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.