Definition. Randomized Polynomial Time
[RP]
Definition. Randomized Polynomial Time [RP]
(Randomized Polytime) if there is a probabilistic Turing machine that, on input , runs in time , and has a greater than or equal to 50% chance of reaching an accepting leaf.
- if the probabilistic Turing machine has a 0% chance of reaching an accepting leaf. (must reach reject state)
Algorithm’s Output Accept Reject Correct Output Accept / true positive / false negative Reject 0 / false positive 1 / true negative if there is a PTM that, on input , runs in time and has behavior:
- :
- :
if there exists a deterministic polytime TM V such that:
- : for at least half of all with ,
- : for all y with ,
Question. Why is RP useful?
Answer. Because we can build things that compute in RP, but we cannot easily simulate NP.
…useful picture…
If there was an NP-complete language in RP, then RP would equal NP.
if there is a TM that, on input , runs in time and has behavior:
- Definition. co-RP
-
if there is a PTM that, on input , runs in time , and has the following behavior:
- (strings in the language) have a 100% chance of being accepted
- have at least or equal to 50% chance of being rejected
Example. A Probabilistic Puzzle
Let be a vector of bits.
There are two possibilities:
- is all zeros
- exactly half of are zeros
Question. How many bits must you look at to tell?
Answer.
- Non-probabilistically: n/2 + 1
- Probabilistically: just one!