randomized and de-randomized algorithms

18
Randomized and De-Randomized Algorithms Jeff Kinne, Indiana State University Slides online at kinnejeff.com

Upload: vail

Post on 15-Feb-2016

97 views

Category:

Documents


1 download

DESCRIPTION

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… Lower pay (probably) Less applied But - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Randomized and  De-Randomized Algorithms

Randomized and De-Randomized

Algorithms

Jeff Kinne, Indiana State University

Slides online at kinnejeff.com

Page 2: Randomized and  De-Randomized Algorithms

The Plan…• Randomized Algorithms – examples

• How to “de-randomize” a randomized algorithm

Page 3: Randomized and  De-Randomized Algorithms

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

Page 4: Randomized and  De-Randomized Algorithms

Randomized Algorithms

Page 5: Randomized and  De-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

Page 6: Randomized and  De-Randomized Algorithms

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

Page 7: Randomized and  De-Randomized Algorithms

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

Page 8: Randomized and  De-Randomized Algorithms

Is ___ Prime?• Miller-Rabin test

o try a = 2, 3, …, o Generalized Riemann Hypothesis always correct

• AKS testo Always correct!

• Can do better?

Page 9: Randomized and  De-Randomized Algorithms

• * Up to ___ digits – for # operations • RSA requires – about 300 or 600 digit primes

Is ___ Prime?Time Up to ___

digits *Notes

Trial Division 18Best Factoring

100 – 200

Fermat 10,000 mistakesMiller-Rabin (if GRH)

10,00050

randomizedconditional

AKS 10

Page 10: Randomized and  De-Randomized Algorithms

General-PurposeDerandomization

Page 11: Randomized and  De-Randomized Algorithms

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

Page 12: Randomized and  De-Randomized Algorithms

Pseudorandom Bits

Replace random a by “pseudorandom” a

a

n

Page 13: Randomized and  De-Randomized Algorithms

Pseudorandom Bits

• Try A(n, PRG(s)) for all seeds to PRGo Running time: (time(A) + time(PRG))

n

a

s

Page 14: Randomized and  De-Randomized Algorithms

PRGsGenerators

Uses Security Speed

LCG, LSFR scientificsimulations

statistical tests very fast

BBS, RSA cryptography any poly-time test slowerNW, SU Derandomizatio

nany fixed-poly-time test

slower

LCGRSA

Page 15: Randomized and  De-Randomized Algorithms

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…

Page 16: Randomized and  De-Randomized Algorithms

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?

Page 17: Randomized and  De-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

• …

Page 18: Randomized and  De-Randomized Algorithms

The End• Thank you!

• Slides online at kinnejeff.com