Randomized - Indiana State University

sunflowerplateΤεχνίτη Νοημοσύνη και Ρομποτική

21 Νοε 2013 (πριν από 3 χρόνια και 6 μήνες)

46 εμφανίσεις

Randomized and

De
-
Randomized Algorithms

Jeff Kinne, Indiana State University




Slides online at
kinnejeff.com


The Plan…



Randomized Algorithms


examples





How to “de
-
randomize” a randomized algorithm


Research


Versus industry/internship…


o
Lower pay (probably)

o
Less applied


o
But


o
You choose what to work on (mostly)

o
More cutting
-
edge, forward
-
looking

o
Give presentations, meet people

o
Write a paper,
tell others about your results

Randomized Algorithms

Median Finding


Unsorted list of #’s


6, 10, 0, 2, 3, 77, 55, 32



Find median:
6



Sorting



n log(n)
running time



Randomized



quickselect
,
O(n)

running time


Shortest Path


Breadth
-
first search

Depth
-
first search

Dijkstra’s

algorithm

...

o
Running time


good

o
Memory space


bad
!



“Drunkard’s walk”

o
C
onnectivity on undirected graphs

o
Memory space


good!

o
Running time


not as good

o
“De
-
randomized”



Reingold

Is ___ Prime?


Is 2 a factor? Is 3? … Is
𝑝
1
/
2
?



Fermat test

o
Pick a at random

o
If
𝒂













n not prime.

o
Not always correct


Carmichael numbers



Miller
-
Rabin



always correct with high probability



Application


RSA cryptography
needs large primes

Is ___ Prime?


Miller
-
Rabin test

o
try a = 2, 3, …,
𝑂
(
log
2
(
𝑛
)
)

o
Generalized Riemann Hypothesis


always correct



AKS test

o
Always correct!



Can do better?














* Up to ___ digits


for # operations

10
9

2
30


RSA requires


about 300 or 600 digit primes

Is ___ Prime?

Time

Up

to ___ digits *

Notes

Trial Division

𝑂
(
𝑛
1
2
)

18

Best

Factoring

2
𝑂

(
log
1
/
3
𝑛
)

100


200

Fermat

𝑂

(
log
2
(
n
)
)

10,000

mistakes

Miller
-
Rabin


(if GRH)

𝑂

log
2
n

𝑂

(
log
4
(
𝑛
)
)

10,000

50

randomized

conditional

AKS

𝑂

(
log
6
(
𝑛
)
)

10

General
-
Purpose

Derandomization

Randomized Algorithm


Fermat test

o
n

prime

test correct

o
n composite, not Carmichael


correct for


½ of all a’s



Randomized
Alg

A

o
For any input n


𝐏𝐫
𝒂
𝑨

,
𝒂
  






Derandomize

o
Evaluate A(n, a) for all possible a

o
Running time: time(A)
×

#a

Pseudorandom Bits










Replace random a by “pseudorandom” a

a

n

Pseudorandom Bits











Try A(n, PRG(s)) for all seeds to PRG

o
Running time: (time(A) + time(PRG))
×



 


n

a

s

PRGs







Generators

Uses

Security

Speed

LCG
,

LSFR

scientific

simulations

statistical

tests

very fast

BBS
,
RSA

cryptography

any poly
-
time test

slower

NW
, SU

Derandomization

any

fixed
-
poly
-
time
test

slower

LCG

RSA

PRG
Derandomization



“Major Important” Result …

o
Plausible assumptions


PRG’s of exponential “stretch”

o


remove randomness with polynomial slowdown


(aka BPP = P)

o
E.g., time
𝑶





might become
𝑶


𝟖





What is best possible from this approach?

o
Perhaps… getting a quadratic slowdown… perhaps…

Questions/Goals


Actually implement “theoretical” PRGs, what is best
possible running time?



For particular problem (e.g.,
primality
)


best
possible
derandomization
?



New PRGs that are both very fast and secure, for
particular kinds of randomized algorithms?


Other Projects…


Distributed factoring,
Mersenne

prime search



Computational complexity

o
Many things…

o
P
vs

NP

o
Lower bounds for … matrix permanent

o




Brain trauma AI





The End


Thank you!



Slides online at
kinnejeff.com