SlideShare a Scribd company logo
1 of 52
1
A Small Debate of Power of
Randomness
Abner Huang
2009-10-16
2
Power of Randomness
M. O. Rabin
The citation for the Turing Award,
awarded in 1976 jointly to Rabin and
Dana Scott for a paper written in 1959,
[1] states that the award was granted:
For their joint paper "Finite Automata
and Their Decision Problem," which
introduced the idea of nondeterministic
machines, which has proved to be an
enormously valuable concept. Their
(Scott & Rabin) classic paper has been
a continuous source of inspiration for
subsequent work in this field
3
Power of Randomness
• Quick Sort: O(n lg n)
– Worst case : O(n^2)
• Randomized Quick Sort
– Expected : O(n lg n)
• C. A. R. Hoare + M. Blum
– Quick Sort + Median : Worst-case O(n lg n)
• Is randomness really helpful?
4
P = BPP?
5
The Story Was Originated at
……..
6
Closest pair of points problem
7
Closest pair of points problem
• Classical Result is O(n lg n) by divide-and-
conquer.
• Rabin proposed an expected linear time Las
Vegas randomized algorithm.
– Rabin, M. O., Traub, J. .F. (ed.) Probabilistic algorithms In Algorithms
and Complexity, New Directions and Recent Trends, Academic Press,
1976, 21-39
8
Nearest Neighbor Problem
hash
9
An Example
Let’s sample s
points from
the data set.
And compute
the minimum
distance d
among those
s points.
10
An Example (cont.)
Using the
distance d, we
will partition
the plane into
cells.
Thus each cell
has few points
11
An Example (cont.)
• If we are lucky, the adjacent cells of each
cell will contain few points. Hence we can
check it one by one.
12
However, Rabin’s proof is
complicated!
13
A Simpler Version
• Ref.: Khuller, S. & Matias, Y.
A simple randomized sieve
algorithm for the closest-pair
problem, Information and
Computation, 1995, 118, 34-
37
14
1. Pick a point uniformly at
random.
2. Compute the min. distance d
to all others.
15
3. Partition the plane into cells by
interval d/3.
16
3. Find out the elements whose neighborhood contain more
than itself.
4. If no such element, then we get the termination distance d.
Otherwise we recursive call this procedure on these selected
elements.
5. Use the termination distance d to build a mesh.
17
Suitable interval d is critical.
Key idea of Khuller’s algorithm: Approximate It.
18
Four Facts
19
Proof
Lemma
20
21
Deterministic Algorithm
• Ref.: Fortune, S. & Hopcroft, J. E.
A note on Rabin’s nearest-
neighbor algorithm Information
Processing Letters, 1979, 8, 20-23
• How powerful the
randomness in Rabin’s
algorithm is?
– It breaks the lower
bound!!! John E. Hopcroft
Turing Award in 1986
22
Key idea: re-hash S if
there is one bucket
which has more than
sqrt(n) elements.
23
An Example
Order of
input
sequence
24
An element might
appear in recursive
calls at both two
lines, e.g.,
Note that : the input sequence is
not sorted
B1 B2 B3
25
An Example of Worse Case
Order of
input
sequence
26
• This case occurs when points fall into the
same bucket but are processed by
different levels of line 5-9, where a level is
defined by one iteration of the loop (line 5-
9).
• For a call, since there at most sqrt(n)
levels, there are at most sqrt(n) points in a
bucket at line 19.
27
Its (ideal) recursive partition
Each partition have no more than
sqrt(n) elements.
If all sub-problems are disjoint, then it is easy to
show that this algorithm is in O(n lg (lg n))
28
PROOF
• In a level, after calling FINDINT to
process a non-empty bucket B with b
elements, we will increase (b-1) non-
empty sets after the call.
Let’s also
define it
a level.
29
• If we apply this idea to recursive calls at a
level and all levels, then we have
where k is the number of calls, and bi is
the size of input elements of the i-th call.
• The total cost involved those recursive
calls is bounded by
where d is a big constant.
30
• Since the slop of x log(log x) is strictly
increasing, we have the following property
for r s>2.≧
• It means to get the upper bound, more
large bi are better.
31
32
33
Discuss
• Rabin’s assumption:
– Random number is available.
– Square-Root is constant time operation.
34
Discuss
• Rabin’s assumption:
– Random number is available.
– Square-Root is constant time operation.
– Hashing function, i.e., floor is a constant
time operation.
• It is important! In Rabin’s original paper, it
only achieves O(n lg n) without hashing
method.
• In Hopcroft’s paper, it costs O(n lglg n)
deterministically.
35
Q: Is Unit-Cost Floor Function
Reasonable?
• Recall The Sorting Algorithm.
–Well known lower bound: O(n lg n)
–What does it mean?
36
Q: Is Unit-Cost Floor Function
Reasonable?
• Recall The Sorting Algorithm.
–Well known lower bound: O(n lg n)
–What does it mean?
–We can sort n numbers by c*n lg n
computation steps?
37
Q: Is Unit-Cost Floor Function
Reasonable?
• Recall The Sorting Algorithm.
– Well known lower bound: O(n lg n)
– What does it mean?
– We can sort n numbers by c*n lg n
computation steps?
– Is it reasonable, if the numbers are in the
interval from 2^{n} to 2^{2^{2^{n}}}?
38
Q: Is Unit-Cost Floor Function
Reasonable?
• Recall The Sorting Algorithm.
– Well known lower bound: O(n lg n)
– What does it mean?
– We can sort n numbers by c*n lg n
comparisons.
39
Even x+y, x-y,
xy, x/y are not
in constant
time.
40
Unit-Cost Assumptions
Moore's Law
41
Q: Is Unit-Cost Floor Function
Reasonable in Theory?
• Rabin's randomized algorithm for closest
pairs [1976].
• Schönhage 1979: If we could compute
x+y, x-y, xy, x/y, x
for any real x,y in a single step, then we
could solve NP- and even PSPACE-
complete problems in polynomial time
42
Furthermore
• A few years later, Bertoni et al. [bms-scram-
85] generalized the same approach to the
#P-complete problem #SAT: How
many satisfying assignments does this
Boolean formula have?
• Peter van Emde Boas has a great
discussion of "the unreasonable power of
integer
multiplication" in his survey of models of
computation [e-mms-90].
43
44
We now have a
deterministic O (n lg lg n)
algorithm and an
expected O(n) algorithm.
45
We now have a
deterministic O (n lg n) algorithm
and an
expected O(n) algorithm.
Happy Ending?
46
Curse of Dimensionality!!!
47
A Simple Calculus
• Given: 1 million points in 100-
dimension space.
– Clever algorithm
– 2100
~1030
– 1030
x ( 106
lg 106
)
– Brute-force method
– 106
x 106
48
High Dimensional
Geometry
How to beat the brute-force method?
Indyk, Piotr.; Motwani, Rajeev. (1998). ", Approximate Nearest
Neighbors: Towards Removing the Curse of Dimensionality.".
Proceedings of 30th Symposium on Theory of Computing.
49
It is another story.
50
THANKS FOR YOUR
ATTENTION
51
Ref.
• Rabin, M. O., Traub, J. .F. (ed.) Probabilistic algorithms
In Algorithms and Complexity, New Directions and
Recent Trends, Academic Press, 1976, 21-39
• Khuller, S. & Matias, Y. A simple randomized sieve
algorithm for the closest-pair problem, Information and
Computation, 1995, 118, 34-37
• Fortune, S. & Hopcroft, J. E. A note on Rabin’s nearest-
neighbor algorithm Information Processing Letters, 1979,
8, 20-23
52
Ref.
• Schönhage, A. On the power of random access
machines Automata, Languages and Programming:
Sixth Colloquium, Graz, Austria, July 16–20, 1979, 1979,
71, 520-529
• Bertoni, A.; Mauri, G. & Sabadini, N. Ausiello, G. &
Lucertini, M. (ed.) Simulations Among Classes of
Random Access Machines and Equivalence Among
Numbers Succinctly Represented Analysis and Design
of Algorithms for Combinatorial Problems, North-Holland,
1985, 109, 65 - 89
• van Emde Boas, P. van Leeuwen, J. (ed.) Machine
models and simulation Handbook of Theoretical
Computer Science, Elsevier, 1990, A, 1-66

More Related Content

What's hot

Big o notation
Big o notationBig o notation
Big o notation
keb97
 
Cs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategiesCs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategies
Yasir Khan
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
Ankit Katiyar
 

What's hot (20)

Kmp
KmpKmp
Kmp
 
A technique to construct linear trend free fractional factorial design using...
A technique to construct  linear trend free fractional factorial design using...A technique to construct  linear trend free fractional factorial design using...
A technique to construct linear trend free fractional factorial design using...
 
Knuth morris pratt string matching algo
Knuth morris pratt string matching algoKnuth morris pratt string matching algo
Knuth morris pratt string matching algo
 
String matching algorithms
String matching algorithmsString matching algorithms
String matching algorithms
 
Box-fitting algorithm presentation
Box-fitting algorithm presentationBox-fitting algorithm presentation
Box-fitting algorithm presentation
 
Big o notation
Big o notationBig o notation
Big o notation
 
Sampling and Markov Chain Monte Carlo Techniques
Sampling and Markov Chain Monte Carlo TechniquesSampling and Markov Chain Monte Carlo Techniques
Sampling and Markov Chain Monte Carlo Techniques
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
String Matching (Naive,Rabin-Karp,KMP)
String Matching (Naive,Rabin-Karp,KMP)String Matching (Naive,Rabin-Karp,KMP)
String Matching (Naive,Rabin-Karp,KMP)
 
Algorithm Analyzing
Algorithm AnalyzingAlgorithm Analyzing
Algorithm Analyzing
 
Big o notation
Big o notationBig o notation
Big o notation
 
String Matching Algorithms-The Naive Algorithm
String Matching Algorithms-The Naive AlgorithmString Matching Algorithms-The Naive Algorithm
String Matching Algorithms-The Naive Algorithm
 
Rabin karp string matcher
Rabin karp string matcherRabin karp string matcher
Rabin karp string matcher
 
Big o
Big oBig o
Big o
 
poster
posterposter
poster
 
Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...
Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...
Cryptanalysis with a Quantum Computer - An Exposition on Shor's Factoring Alg...
 
Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...
 
Chapter 17
Chapter 17Chapter 17
Chapter 17
 
Cs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategiesCs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategies
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 

Similar to A small debate of power of randomness

dorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurb
dorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurbdorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurb
dorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurb
zoobiarana76
 
The Automated-Reasoning Revolution: from Theory to Practice and Back
The Automated-Reasoning Revolution: from Theory to Practice and BackThe Automated-Reasoning Revolution: from Theory to Practice and Back
The Automated-Reasoning Revolution: from Theory to Practice and Back
Moshe Vardi
 

Similar to A small debate of power of randomness (20)

Lecture24
Lecture24Lecture24
Lecture24
 
Unit 5
Unit 5Unit 5
Unit 5
 
Unit 5
Unit 5Unit 5
Unit 5
 
The quantum computing and its application's
The quantum computing and its application'sThe quantum computing and its application's
The quantum computing and its application's
 
dorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurb
dorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurbdorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurb
dorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurb
 
Markov Chain Monte Carlo explained
Markov Chain Monte Carlo explainedMarkov Chain Monte Carlo explained
Markov Chain Monte Carlo explained
 
Undecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation AlgorithmsUndecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation Algorithms
 
Change Point Analysis
Change Point AnalysisChange Point Analysis
Change Point Analysis
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
 
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
 
The Automated-Reasoning Revolution: from Theory to Practice and Back
The Automated-Reasoning Revolution: from Theory to Practice and BackThe Automated-Reasoning Revolution: from Theory to Practice and Back
The Automated-Reasoning Revolution: from Theory to Practice and Back
 
CNN for modeling sentence
CNN for modeling sentenceCNN for modeling sentence
CNN for modeling sentence
 
ilp-nlp-slides.pdf
ilp-nlp-slides.pdfilp-nlp-slides.pdf
ilp-nlp-slides.pdf
 
10.1.1.96.9176
10.1.1.96.917610.1.1.96.9176
10.1.1.96.9176
 
Problemas de Smale
Problemas de SmaleProblemas de Smale
Problemas de Smale
 
The n Queen Problem
The n Queen ProblemThe n Queen Problem
The n Queen Problem
 
Algorithms Exam Help
Algorithms Exam HelpAlgorithms Exam Help
Algorithms Exam Help
 
Data Analysis and Algorithms Lecture 1: Introduction
 Data Analysis and Algorithms Lecture 1: Introduction Data Analysis and Algorithms Lecture 1: Introduction
Data Analysis and Algorithms Lecture 1: Introduction
 
Greedy Algorithms with examples' b-18298
Greedy Algorithms with examples'  b-18298Greedy Algorithms with examples'  b-18298
Greedy Algorithms with examples' b-18298
 
Unit7
Unit7Unit7
Unit7
 

More from Abner Chih Yi Huang

More from Abner Chih Yi Huang (11)

諾貝爾經濟學獎得主的獲利公式
諾貝爾經濟學獎得主的獲利公式諾貝爾經濟學獎得主的獲利公式
諾貝爾經濟學獎得主的獲利公式
 
Clip Tree Applications
Clip Tree ApplicationsClip Tree Applications
Clip Tree Applications
 
Introduction to Szemerédi regularity lemma
Introduction to Szemerédi regularity lemmaIntroduction to Szemerédi regularity lemma
Introduction to Szemerédi regularity lemma
 
Introduction to Algorithmic aspect of Market Equlibra
Introduction to Algorithmic aspect of Market EqulibraIntroduction to Algorithmic aspect of Market Equlibra
Introduction to Algorithmic aspect of Market Equlibra
 
An introduction to Google test framework
An introduction to Google test frameworkAn introduction to Google test framework
An introduction to Google test framework
 
SaaS: Science as a Service
SaaS: Science as a Service SaaS: Science as a Service
SaaS: Science as a Service
 
More on randomization semi-definite programming and derandomization
More on randomization semi-definite programming and derandomizationMore on randomization semi-definite programming and derandomization
More on randomization semi-definite programming and derandomization
 
Alignment spaced seed
Alignment spaced seedAlignment spaced seed
Alignment spaced seed
 
Dominating set of fixed size in degenerated graph
Dominating set of fixed size in degenerated graphDominating set of fixed size in degenerated graph
Dominating set of fixed size in degenerated graph
 
Introduction to algorithmic aspect of auction theory
Introduction to algorithmic aspect of auction theoryIntroduction to algorithmic aspect of auction theory
Introduction to algorithmic aspect of auction theory
 
Refactoring Chapter11
Refactoring Chapter11Refactoring Chapter11
Refactoring Chapter11
 

Recently uploaded

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 

A small debate of power of randomness

  • 1. 1 A Small Debate of Power of Randomness Abner Huang 2009-10-16
  • 2. 2 Power of Randomness M. O. Rabin The citation for the Turing Award, awarded in 1976 jointly to Rabin and Dana Scott for a paper written in 1959, [1] states that the award was granted: For their joint paper "Finite Automata and Their Decision Problem," which introduced the idea of nondeterministic machines, which has proved to be an enormously valuable concept. Their (Scott & Rabin) classic paper has been a continuous source of inspiration for subsequent work in this field
  • 3. 3 Power of Randomness • Quick Sort: O(n lg n) – Worst case : O(n^2) • Randomized Quick Sort – Expected : O(n lg n) • C. A. R. Hoare + M. Blum – Quick Sort + Median : Worst-case O(n lg n) • Is randomness really helpful?
  • 5. 5 The Story Was Originated at ……..
  • 6. 6 Closest pair of points problem
  • 7. 7 Closest pair of points problem • Classical Result is O(n lg n) by divide-and- conquer. • Rabin proposed an expected linear time Las Vegas randomized algorithm. – Rabin, M. O., Traub, J. .F. (ed.) Probabilistic algorithms In Algorithms and Complexity, New Directions and Recent Trends, Academic Press, 1976, 21-39
  • 9. 9 An Example Let’s sample s points from the data set. And compute the minimum distance d among those s points.
  • 10. 10 An Example (cont.) Using the distance d, we will partition the plane into cells. Thus each cell has few points
  • 11. 11 An Example (cont.) • If we are lucky, the adjacent cells of each cell will contain few points. Hence we can check it one by one.
  • 12. 12 However, Rabin’s proof is complicated!
  • 13. 13 A Simpler Version • Ref.: Khuller, S. & Matias, Y. A simple randomized sieve algorithm for the closest-pair problem, Information and Computation, 1995, 118, 34- 37
  • 14. 14 1. Pick a point uniformly at random. 2. Compute the min. distance d to all others.
  • 15. 15 3. Partition the plane into cells by interval d/3.
  • 16. 16 3. Find out the elements whose neighborhood contain more than itself. 4. If no such element, then we get the termination distance d. Otherwise we recursive call this procedure on these selected elements. 5. Use the termination distance d to build a mesh.
  • 17. 17 Suitable interval d is critical. Key idea of Khuller’s algorithm: Approximate It.
  • 20. 20
  • 21. 21 Deterministic Algorithm • Ref.: Fortune, S. & Hopcroft, J. E. A note on Rabin’s nearest- neighbor algorithm Information Processing Letters, 1979, 8, 20-23 • How powerful the randomness in Rabin’s algorithm is? – It breaks the lower bound!!! John E. Hopcroft Turing Award in 1986
  • 22. 22 Key idea: re-hash S if there is one bucket which has more than sqrt(n) elements.
  • 24. 24 An element might appear in recursive calls at both two lines, e.g., Note that : the input sequence is not sorted B1 B2 B3
  • 25. 25 An Example of Worse Case Order of input sequence
  • 26. 26 • This case occurs when points fall into the same bucket but are processed by different levels of line 5-9, where a level is defined by one iteration of the loop (line 5- 9). • For a call, since there at most sqrt(n) levels, there are at most sqrt(n) points in a bucket at line 19.
  • 27. 27 Its (ideal) recursive partition Each partition have no more than sqrt(n) elements. If all sub-problems are disjoint, then it is easy to show that this algorithm is in O(n lg (lg n))
  • 28. 28 PROOF • In a level, after calling FINDINT to process a non-empty bucket B with b elements, we will increase (b-1) non- empty sets after the call. Let’s also define it a level.
  • 29. 29 • If we apply this idea to recursive calls at a level and all levels, then we have where k is the number of calls, and bi is the size of input elements of the i-th call. • The total cost involved those recursive calls is bounded by where d is a big constant.
  • 30. 30 • Since the slop of x log(log x) is strictly increasing, we have the following property for r s>2.≧ • It means to get the upper bound, more large bi are better.
  • 31. 31
  • 32. 32
  • 33. 33 Discuss • Rabin’s assumption: – Random number is available. – Square-Root is constant time operation.
  • 34. 34 Discuss • Rabin’s assumption: – Random number is available. – Square-Root is constant time operation. – Hashing function, i.e., floor is a constant time operation. • It is important! In Rabin’s original paper, it only achieves O(n lg n) without hashing method. • In Hopcroft’s paper, it costs O(n lglg n) deterministically.
  • 35. 35 Q: Is Unit-Cost Floor Function Reasonable? • Recall The Sorting Algorithm. –Well known lower bound: O(n lg n) –What does it mean?
  • 36. 36 Q: Is Unit-Cost Floor Function Reasonable? • Recall The Sorting Algorithm. –Well known lower bound: O(n lg n) –What does it mean? –We can sort n numbers by c*n lg n computation steps?
  • 37. 37 Q: Is Unit-Cost Floor Function Reasonable? • Recall The Sorting Algorithm. – Well known lower bound: O(n lg n) – What does it mean? – We can sort n numbers by c*n lg n computation steps? – Is it reasonable, if the numbers are in the interval from 2^{n} to 2^{2^{2^{n}}}?
  • 38. 38 Q: Is Unit-Cost Floor Function Reasonable? • Recall The Sorting Algorithm. – Well known lower bound: O(n lg n) – What does it mean? – We can sort n numbers by c*n lg n comparisons.
  • 39. 39 Even x+y, x-y, xy, x/y are not in constant time.
  • 41. 41 Q: Is Unit-Cost Floor Function Reasonable in Theory? • Rabin's randomized algorithm for closest pairs [1976]. • Schönhage 1979: If we could compute x+y, x-y, xy, x/y, x for any real x,y in a single step, then we could solve NP- and even PSPACE- complete problems in polynomial time
  • 42. 42 Furthermore • A few years later, Bertoni et al. [bms-scram- 85] generalized the same approach to the #P-complete problem #SAT: How many satisfying assignments does this Boolean formula have? • Peter van Emde Boas has a great discussion of "the unreasonable power of integer multiplication" in his survey of models of computation [e-mms-90].
  • 43. 43
  • 44. 44 We now have a deterministic O (n lg lg n) algorithm and an expected O(n) algorithm.
  • 45. 45 We now have a deterministic O (n lg n) algorithm and an expected O(n) algorithm. Happy Ending?
  • 47. 47 A Simple Calculus • Given: 1 million points in 100- dimension space. – Clever algorithm – 2100 ~1030 – 1030 x ( 106 lg 106 ) – Brute-force method – 106 x 106
  • 48. 48 High Dimensional Geometry How to beat the brute-force method? Indyk, Piotr.; Motwani, Rajeev. (1998). ", Approximate Nearest Neighbors: Towards Removing the Curse of Dimensionality.". Proceedings of 30th Symposium on Theory of Computing.
  • 51. 51 Ref. • Rabin, M. O., Traub, J. .F. (ed.) Probabilistic algorithms In Algorithms and Complexity, New Directions and Recent Trends, Academic Press, 1976, 21-39 • Khuller, S. & Matias, Y. A simple randomized sieve algorithm for the closest-pair problem, Information and Computation, 1995, 118, 34-37 • Fortune, S. & Hopcroft, J. E. A note on Rabin’s nearest- neighbor algorithm Information Processing Letters, 1979, 8, 20-23
  • 52. 52 Ref. • Schönhage, A. On the power of random access machines Automata, Languages and Programming: Sixth Colloquium, Graz, Austria, July 16–20, 1979, 1979, 71, 520-529 • Bertoni, A.; Mauri, G. & Sabadini, N. Ausiello, G. & Lucertini, M. (ed.) Simulations Among Classes of Random Access Machines and Equivalence Among Numbers Succinctly Represented Analysis and Design of Algorithms for Combinatorial Problems, North-Holland, 1985, 109, 65 - 89 • van Emde Boas, P. van Leeuwen, J. (ed.) Machine models and simulation Handbook of Theoretical Computer Science, Elsevier, 1990, A, 1-66

Editor's Notes

  1. M. I. Shamos and D. Hoey. "Closest-point problems." In Proc. 16th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pp. 151—162, 1975
  2. T(n)=sqrt(n)*T(sqrt(n))+O(n) Note that, the term disjoint means the following case does not occur. {This case occurs when points fall into the same bucket but are processed by different rounds of line 5-9} Note that the each sub-problem does not exceed sqrt(n), so it is not like quicksort which has the worst case, T(n)=T(1)+T(n-1)+O(n). In contrast, T(n)=sqrt(n)*T(sqrt(n))+O(n) is worst case indeed.
  3. The total cost involved those recursive calls, in the other words, the overhead cost respect to disjoint cases. That’s, if we have a overlap case, then we give it a big overhead d*x*(lg lg x)
  4. Thus, it seems fine to assume floor function costs constant units in practical.