randomized and de-randomized algorithms jeff kinne, indiana state university slides online at...
Post on 01-Jan-2016
214 Views
Preview:
TRANSCRIPT
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-lookingo Give presentations, meet peopleo 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 searchDijkstra’s algorithm...o Running time – goodo Memory space – bad!
• “Drunkard’s walk”o Connectivity on undirected graphso Memory space – good!o Running time – not as goodo “De-randomized” – Reingold
Is ___ Prime?• Is 2 a factor? Is 3? … Is ?
• Fermat test o Pick a at randomo 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, …, o Generalized Riemann Hypothesis always correct
• AKS testo Always correct!
• Can do better?
• * Up to ___ digits – for # operations • RSA requires – about 300 or 600 digit
primes
Is ___ Prime?Time Up to ___
digits *Notes
Trial Division 18
Best Factoring
100 – 200
Fermat 10,000 mistakes
Miller-Rabin (if GRH)
10,00050
randomizedconditional
AKS 10
General-PurposeDerandomization
Randomized Algorithm• Fermat test
o n prime test correcto n composite, not Carmichael correct for ½ of all a’s
• Randomized Alg Ao For any input n
• Derandomizeo Evaluate A(n, a) for all possible ao 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 PRGo Running time: (time(A) + time(PRG))
n
a
s
PRGsGenerators
Uses Security Speed
LCG, LSFR scientificsimulations
statistical tests very fast
BBS, RSA cryptography any poly-time test slower
NW, SU Derandomization
any fixed-poly-time test
slower
LCGRSA
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 complexityo Many things…o P vs NPo Lower bounds for … matrix permanento …
• Brain trauma AI
• …
top related