. CLASSES RP AND ZPP By: SARIKA PAMMI. CONTENTS: INTRODUCTION RP FACTS ABOUT RP MONTE CARLO...
-
Upload
julius-randall -
Category
Documents
-
view
227 -
download
1
Transcript of . CLASSES RP AND ZPP By: SARIKA PAMMI. CONTENTS: INTRODUCTION RP FACTS ABOUT RP MONTE CARLO...
.
CLASSES RP AND ZPP
By:
SARIKA PAMMI
CONTENTS:
INTRODUCTION
RP
FACTS ABOUT RP
MONTE CARLO ALGORITHM
CO-RP
ZPP
FACTS ABOUT ZPP
RELATION BETWEEN RP AND ZPP
RELATION BETWEEN P AND ZPP
RELATION BETWEEN RP AND NP
RP(Randomized Polynomial time)
A class of problems that will run in polynomial time on a probabilistic TM with the following properties:
If the correct answer is
• no, always return no
• yes, return yes with probability at least ½
Otherwise, returns no
Formally
The class of languages for which membership can be determined in polynomial time by a probabilistic TM with no false acceptances and less than half of the rejections are false rejections
Facts about RP:
If the algorithm returns a yes answer, then yes is the correct answer
If the algorithm returns a no answer, then it may or may not be correct
The ½ in the definition is arbitrary
Like running the algorithm addition repetitions will decrease the chance of the algorithm giving the wrong answer
Often referred to as a Monte-Carlo Algorithm (or Monte-Carlo Turing Machine)
Monte carlo algorithm:
A numerical Monte Carlo method used to find solutions to problems that cannot easily to solved using standard numerical methods
Often relies on random (or pseudo-random) numbers
Is stochastic or nondeterministic in some manner
Co RP:
A class of problems that will run in polynomial time on a probabilistic TM with the following properties: If the correct answer is
yes, always return yes
no, return no with probability at least ½
Otherwise, returns a yes
In other words:
If the algorithm returns a no answer, then no is the correct answer
If the algorithm returns a yes answer, then it may or may not be correct
ZPP:
Zero-error Probabilistic Polynomial
The class of languages for which a probabilistic TM halts in polynomial time with no false acceptances or rejections, but sometimes gives an “I don’t know” answer
In other words:
It always returns a guaranteed correct yes or no answer
It might return an “I don’t know” answer
Facts about zpp:
The running time is unbounded
But it is polynomial on average (for any input)
It is expected to halt in polynomial time
Similar to definition of P except:
ZPP allows the TM to have “randomness”
The expected running time is measured (instead of the worst-case)
Often referred to as a Las-Vegas algorithm (or Las-Vegas Turning Machine)
Relations between RP and ZPP:
ZPP = RP co-RP
Proof Part 1: RP co-RP is in ZPP
Let L be a language recognized by RP algorithm A and co-RP algorithm B
Let w be in L
Run w on A. If A returns yes, the answer must be yes. If A returns no, run w on B. If B returns no, then the answer must be no. Otherwise, repeat.
Only one of the algorithms can ever give a wrong answer. The chance of an algorithm giving the wrong answer is 50%.
The chance of having the kth repetition shrinks exponentially. Therefore, the expected running time is polynomial
Hence, RP intersect co-RP is contained in ZPP
Continue …
ZPP = RP co-RP
Proof Part 2: ZPP is contained in RP co-RP
Let C be an algorithm in ZPP
Construct the RP algorithm using C:
Run C for (at least) double its expected running time.
If it gives an answer, that must be the answer
If it doesn’t given an answer before the algorithm stops, then the answer is no
The chance that algorithm C produces an answer before it is stopped is ½ (and hence fitting the definition of an RP algorithm)
The co-RP algorithm is almost identical, but it gives a yes answer if C does produce an answer.
Therefore, we can conclude that ZPP is contained in RP co-RP
As we conclude :
As seen in the proof of ZPP = RP co-RP we can conclude that
ZPP RP
ZPP co-RP
Relations between P and ZPP:
P ZPP
Proof
Any deterministic, polynomial time bounded TM is also a probabilistic TM that ignores its special feature that allows it to make random choices
Relation between RP and NP:
Proof continued
Let w be in L
M1 has a 50% probability of accepting w.
There must be some sequence of bits on the random tape that leads to the acceptance of w
M2 will choose that sequence of bits and accepts when the choice is made. Thus, w is in the language of M2
If w is not in L, then there is no sequence of random bits that will make M1 accept. Therefore, M2 cannot choose a sequence of bits that leads to acceptance. Thus, w is not in the language
Diagram Showing Relationship of Problem Classes
NP
Co-NP
Co-RP
RP
ZPP
P
.
THANK YOU
REFERENCES:
http://en.wikipedia.org/wiki/RP_(complexity)
http://en.wikipedia.org/wiki/ZPP_(complexity)
https://www.cs.duke.edu/~reif/courses/complectures/books/T/Ch10.pdf
http://www.cs.kent.edu/~dragan/ThComp/RP-ZPP-cl.pdf