Presentation is loading. Please wait.

Presentation is loading. Please wait.

. CLASSES RP AND ZPP By: SARIKA PAMMI. CONTENTS:  INTRODUCTION  RP  FACTS ABOUT RP  MONTE CARLO ALGORITHM  CO-RP  ZPP  FACTS ABOUT ZPP  RELATION.

Similar presentations


Presentation on theme: ". CLASSES RP AND ZPP By: SARIKA PAMMI. CONTENTS:  INTRODUCTION  RP  FACTS ABOUT RP  MONTE CARLO ALGORITHM  CO-RP  ZPP  FACTS ABOUT ZPP  RELATION."— Presentation transcript:

1 . CLASSES RP AND ZPP By: SARIKA PAMMI

2 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

3 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

4 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)

5 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

6 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

7 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

8 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)

9 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

10 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

11 As we conclude :  As seen in the proof of ZPP = RP  co-RP we can conclude that  ZPP  RP  ZPP  co-RP

12 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

13 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

14 Diagram Showing Relationship of Problem Classes NP Co-NP Co-RP RP ZPP P

15 . THANK YOU

16 REFERENCES:  http://en.wikipedia.org/wiki/RP_(complexity) 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 https://www.cs.duke.edu/~reif/courses/complectures/books/T/Ch10.pdf  http://www.cs.kent.edu/~dragan/ThComp/RP-ZPP-cl.pdf


Download ppt ". CLASSES RP AND ZPP By: SARIKA PAMMI. CONTENTS:  INTRODUCTION  RP  FACTS ABOUT RP  MONTE CARLO ALGORITHM  CO-RP  ZPP  FACTS ABOUT ZPP  RELATION."

Similar presentations


Ads by Google