Definition. Probabilistic Turing machine
[prob-turing-machine]
Definition. Probabilistic Turing machine [prob-turing-machine]
A computation model that begins with a tree. When you reach a branch, you flip a coin!
We can define complexity classes based on the probability of reaching accept/reject leaves.
Definition 1. Randomized Polynomial Time
[RP]
Definition 1. 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!
Definition 2. Bounded-error Probabilistic Polynomial Time
[BPP]
Definition 2. Bounded-error Probabilistic Polynomial Time [BPP]
(Bounded-error Probabilistic Polytime) if there is a probabilistic Turing machine that, on input , runs in time and has behavior:
- if the probability of accepting is greater than
- if the probability of rejecting is greater than
- ( is arbitrary: we just need )
| Correct Output / Algorithm’s Output | Accept | Reject |
| Accept | / true positive | / false negative |
| Reject | / false positive | / true negative |
…helpful diagram…
Definition 3. Amplification
[amplification]
Definition 3. Amplification [amplification]
Modifying the definition of a little bit: if there is a PTM that, on input , runs in time and has behavior:
Example. Claim:
- Proof.
-
Let . There exists PTM such that , .
Let be the Turing machine on input
- Run on input
- Run on input
ifeither accepted, then acceptelsereject