10.07.2015 Views

An Introduction to Randomized algorithms - School of Technology ...

An Introduction to Randomized algorithms - School of Technology ...

An Introduction to Randomized algorithms - School of Technology ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Randomization provably helpsRandAlg(A, x, ɛ) :m = 20(log n)/ɛ 2 ; c = 0.for i = 1, . . . , m doChoose uniformly at random j ∈ {1, . . . , n}.if A[j] = x then increment c.endforReturn ans = nc/m.end

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!