Randomized computation
This presentation is the property of its rightful owner.
Sponsored Links
1 / 57

Randomized Computation PowerPoint PPT Presentation


  • 66 Views
  • Uploaded on
  • Presentation posted in: General

Randomized Computation. Roni Parshani 025529199 Orly Margalit 037616638 Eran Mantzur 028015329 Avi Mintz 017629262. RP – Random Polynomial Time. Denotation: L is Language M is probabilistic polynomial time turning machine Definition:

Download Presentation

Randomized Computation

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Randomized computation

Randomized Computation

Roni Parshani 025529199

Orly Margalit037616638

Eran Mantzur 028015329

Avi Mintz017629262


Rp random polynomial time

RP Random Polynomial Time

Denotation:

  • L is Language

  • M is probabilistic polynomial time turning machine

    Definition:

    L RPif M such that

    • x L Prob[ M(x) = 1 ]

    • x L Prob[ M(x) = 0 ] = 1


Rp random polynomial time1

RP Random Polynomial Time

The disadvantage of RP (coRP) is when the Input doesnt belong to language (does belong to the language) the machine needs to return a correct answer at all times.

Definition:

  • x L L(x) = 1

  • x L L(x) = 0


Rp np

RP NP

  • Proof:

    • Given: L RP

    • Aim : L NP

      LRP

      xL M such that more than 50% of y give M(x,y) = 1 y : M(x,y) = 1

      xL y M(x,y) = 0

    • LNP


Corp complementary random polynomial time

coRP - ComplementaryRandom Polynomial Time

Definition:

L coRPif M such that

  • x L Prob[ M(x) = 1 ] = 1

  • x L Prob[ M(x) = 0 ]

    An alternative way to define coRP is

    coRP = { : L RP }


Corp co np

coRP co-NP

  • Proof:

    • Give: L coRP

    • Aim : L co-NP

      LcoRP RP NP Lco-NP


Randomized computation

RP1

P(.) is a polynomial

Definition:

L RP1 if M, p(.) such that

  • x L Prob[ M(x,r) = 1 ]

  • x L Prob[ M(x,r) = 0 ] = 1


Randomized computation

RP2

P(.) is a polynomial

Definition:

L RP2 if M, p(.) such that

  • x L Prob[ M(x,r) = 1 ] 1 2-p(|x|)

  • x L Prob[ M(x,r) = 0 ] = 1


Rp1 rp2 rp

RP1 = RP2 = RP

  • Aim: RP1 = RP2

    RP2 RP1

    we can always select a big enough x such that

    < 1 2-p(|x|)


Rp1 rp2 rp1

RP1 = RP2 = RP

RP1 RP2

L RP1 M, p(.) such that

xL Prob[ M(x,r) = 1 ]

we run M(x,r) t(|x|) times:

  • If in any of the runs M(x,r) = 1 output is 1

  • If in all of the runs M(x,r) = 0 output is 0


Rp1 rp2

RP1 RP2

Select t(|x|)

Therefore if xL output is 0

If xL the probability of outputting 0 is only if M(x,r) = 0 all t(|x|) times

  • ( Prob[M(x,r) = 0] )t(|x|) (1-)t(|x|)

  • [1-] 2-p(|x|)


Rp1 rp21

RP1 RP2

So the probability of outputting 1 is larger than 1- 2- p(|x|)

  • L RP2

    Conclusion:

    • RP1 RP RP2 RP1

      Therefore RP1 = RP = RP2


Bpp bounded probability polynomial time

BPP Bounded Probability Polynomial Time

Definition:

L BPP if M such that

  • x L Prob[ M(x) = 1 ]

  • x L Prob[ M(x) = 1 ] <

    In other words:

  • x : Prob[ M(x) = L(x) ]


Cobpp bpp

coBPP = BPP

coBPP = { : L BPP }

= { : M : Prob[ M(x) = L(x) ] }

= { : : Prob[ (x) = (x) ] }

= BPP

= 1 M(.)

(M(.) exists iff (.) exists)


Randomized computation

BPP1

Previously we defined stricter and weaker definition for RP, in a similar way we will define for BPP.

Denotation:

  • p(.) positive polynomial

  • f polynomial time computable function

    Definition:

    L BPP1 if M, p(.), f such that

    • x L Prob[ M(x) = 1 ] f(|x|) +

    • x L Prob[ M(x) = 1 ] < f(|x|) -


B pp bpp1

BPP = BPP1

Proof:

Aim: BPP BPP1

f(|x|) = andp(|x|) = 6

This gives the original definition of BPP.


B pp bpp11

BPP = BPP1

Proof:

Aim: BPP1 BPP

L BPP1 M such that

xL Prob [ M(x) = 1] f(|x|) +

xL Prob [ M(x) = 1] < f(|x|)


Bpp1 bpp

BPP1 BPP

we want to know with Prob >

if 0 p f(|x|) 1/p(|x|)

or iff(|x|) + 1/p(|x|) p 1

Define: M runs M(x) n times, and each M(x) returns

If > f(|x|)M returns YES, else NO


Bpp1 bpp1

BPP1 BPP

Calculation of n

We run n independent Bernoulli variables with p and

Prob < 2 =


Bpp1 bpp2

BPP1 BPP

Choose : and

Result: M decides L(M) with Prob >


Randomized computation

BPP2

Denotation:

  • p(.) positive polynomial

    Definition:

    L BPP2 if M, p(.) such that

  • x : Prob[ M(x) = L(x) ] 1-2-p(|x|)


Bpp bpp 2

BPP BPP2

Proof:

Aim: BPP BPP2

p(|x|) =

This gives the original definition of BPP.


Bpp bpp2

BPP BPP2

Proof:

Aim: BPP BPP2

L BPP M : x Prob[ M(x) = L(x) ]

Define: M runs M(x) n times, and each M(x) returns

If > M returns YES, else NO

We know : Exp[M(x)] > xL

Exp[M(x)] < x L


Bpp bpp21

BPP BPP2

Chernoffs Equation :

Let {X1 , X2 , , Xn} be a set of independent Bernoulli variables with the same expectations p,and : 0< p(p-1)

Then

Prob


Bpp bpp22

BPP BPP2

From Chernoffs equation :

Prob[|M(x) Exp[M(x)]| ]

But if |M(x) Exp[M(x)]|

then M returns a correct answer


Bpp bpp23

BPP BPP2

Prob[M(x)= L(x) ]

polynomial P(x) we choose n such that

Prob[M(x) = L(x) ]

L BPP2


Rp bpp

RP BPP

Proof:

L RP if M such that

  • x L Prob[ M(x) = 1 ]

  • x L Prob[ M(x) = 0 ] = 1

    We previously proved BPP = BPP1

    If we place in BPP1 formula with

    f(.) and p(.)4

    this gives the original definition of RP.


P bpp

P BPP

Proof:

L P M such that M(x) = L(x)

  • x : Prob[ M(x) = L(x) ] =1

  • L BPP


P space

PSPACE

Definition:

L PSPACEif M such that M(x) = L(x)

and p such that M uses p(|x|) space.

(No time restriction)


Pp probability polynomial time

PP Probability Polynomial Time

Definition:

L PP if M such that

  • x L Prob[ M(x) = 1 ] >

  • x L Prob[ M(x) = 1 ]

    In other words

  • x : Prob[ M(x) = L(x) ] >


Pp pspace

PP PSPACE

Definition: (reminder)

L PP if M such that

  • x : Prob[ M(x) = L(x) ]

    Proof:

    L PP M, p(.) such that

    x: Prob[ M(x,r) = L(x) ] >

    and M is polynomial time.

  • If we run M on r, M is correct more than 50% of the time.


  • Pp pspace1

    PP PSPACE

    Aim: L PSPACE

    • Run M on every single r.

    • Count the number of received 1 and 0.

    • The correct answer is the greater result.


    Pp pspace2

    PP PSPACE

    • By the definition of PP, every L PPthis algorithm will always be correct.

    • M(x,r) is polynomial in space

    • New algorithm is polynomial in space

    • L PSPACE


    Randomized computation

    Claim: PP = PP1

    If we have a machine that satisfies PP it also satisfies PP1

    (Since PP is stricter then PP1 and demands grater then 1/2 and PP demands only, equal or grater to ) so clearly


    Randomized computation

    Let M be a language in PP1

    Motivation

    The trick is to build a machine that will shift the answer of M towards the NO direction with a very small probability that is smaller than the smallest probability difference that M could have. So if M is biased towards YES our shift will not harm the direction of the shift. But if there is no bias(or bias towards NO) our shift will give us a bias towards the no answer.


    Randomized computation

    Proof:

    Let M be defined as:


    Randomized computation

    M chooses one of two moves.

    • With probability return NO

    • With probability invoke M


    Randomized computation

    If :


    Randomized computation

    If :


    Randomized computation

    Suppose that is decided by a non deterministic

    machine M with a running time that is bounded by the polynomial p(x).

    The following machine M then will decide L according to the following definition:


    Randomized computation

    M uses its random coin tosses as a witness to M with only one toss that it does not pass to M. This toss is used to choose its move. One of the two possible moves gets it to the ordinary computation of M with the same input(and the witness is the random input).


    Randomized computation

    The other choice gets it to a computation that always accepts.

    Consider string x.

    If M doesn't have an accepting computation then the probability that M will answer 1 is exactly 1/2.

    On the other hand, if M has at least one accepting computation the probability that M will answer correctly is greater then 1/2.


    Randomized computation

    So we get that:

    Meaning and by the

    previous claim (PP = PP1) we get that .


    Zpp zero error probability

    ZPP Zero Error Probability

    We define a probabilistic turning machine which is allowed to reply I Dont Know which will be symbolized by .

    Definition:

    L ZPP if M such that

    • x : Prob[ M(x) = ]

    • x : Prob[ M(x) = L(x) or M(x) = ] = 1


    Randomized computation

    Take . Let M be a ZPP machine.

    We will build a machine M that decides L according to the definition of RP.


    Randomized computation

    If

    then by returning 0 when

    we will always answer correctly because in this case


    Randomized computation

    If

    the probability of getting the right answer with M is greater then 1/2 since M returns a definite answer with probability greater then 1/2 and Ms definite answers are always correct.


    Randomized computation

    In the same way it can be seen that by defining M(x) as:

    we get that


    Randomized computation

    If

    then we will get a YES answer from

    and hence from M with probability greater then 1/2.

    If

    then we will get a NO answer from

    and hence from M with probability greater

    then 1/2.


    Rspace randomized space complexity

    RSPACE Randomized Space Complexity

    Definition:

    RSPACE (s)=L RPsuch that MRPuses at most s(|x|) space and exp( s(|x|) ) time.

    BadRSPACE (s) = RSPACE (s) without time restriction.


    Randomized computation

    Claim: badRSPACE = NSPACE

    badRSPACE NSPACE

    Let L badRSPACE.

    If x L

    that means there is at least one witness and the non deterministic machine of NSPACE will choose it.


    Randomized computation

    If x L

    that means there are no witnesses at all therefore the non deterministic machine of NSPACE also will not find a solution.


    Randomized computation

    NSPACE badRSPACE

    L NSPACE. M is the Non - deterministic Turing machine which decides L in space S(|x|).

    If x L

    there exists r of length exp(S(|x|), so that M(x,r) = 1,

    where r is the non-deterministic guess used by M. Therefore the probability of selecting r so that

    M(x,r) = 1 is at least


    Randomized computation

    So if we repeatedly invoke M(x,.) on random rs we can expect that after tries we will see an accepting computation.

    So what we want our machine M to do is run M on x and a newly randomly selected r (of length exp(S(|x|))) for about

    times and accept iff M accepts in one of these tries.


    Randomized computation

    Problem:

    In order to count to

    we need a counter that uses space of exp(S(|x|)),

    and we only have S(|x|).


    Randomized computation

    Solution:

    We will use a randomized counter that will use only S(|x|) space.

    We flip k = coins.

    if all are heads then stop else go on. The expected num of tries .

    But the real counter only needs to count to k and therefore only needs space of

    .


  • Login