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

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...Premier Publishers
 
Knuth morris pratt string matching algo
Knuth morris pratt string matching algoKnuth morris pratt string matching algo
Knuth morris pratt string matching algosabiya sabiya
 
Box-fitting algorithm presentation
Box-fitting algorithm presentationBox-fitting algorithm presentation
Box-fitting algorithm presentationRidlo Wibowo
 
Big o notation
Big o notationBig o notation
Big o notationkeb97
 
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 TechniquesTomasz Kusmierczyk
 
String Matching (Naive,Rabin-Karp,KMP)
String Matching (Naive,Rabin-Karp,KMP)String Matching (Naive,Rabin-Karp,KMP)
String Matching (Naive,Rabin-Karp,KMP)Aditya pratap Singh
 
Algorithm Analyzing
Algorithm AnalyzingAlgorithm Analyzing
Algorithm AnalyzingHaluan Irsad
 
String Matching Algorithms-The Naive Algorithm
String Matching Algorithms-The Naive AlgorithmString Matching Algorithms-The Naive Algorithm
String Matching Algorithms-The Naive AlgorithmAdeel Rasheed
 
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...Daniel Hutama
 
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...Navin Kumar
 
Cs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategiesCs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategiesYasir Khan
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexityAnkit 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

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'sRachitdas2
 
dorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurb
dorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurbdorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurb
dorit-day1-1.pptedefefgfgjjjjjf2iufhhbfiurbzoobiarana76
 
Markov Chain Monte Carlo explained
Markov Chain Monte Carlo explainedMarkov Chain Monte Carlo explained
Markov Chain Monte Carlo explaineddariodigiuni
 
Undecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation AlgorithmsUndecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation AlgorithmsMuthu Vinayagam
 
Change Point Analysis
Change Point AnalysisChange Point Analysis
Change Point AnalysisMark Conway
 
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 POWERmuthukrishnavinayaga
 
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 BackMoshe Vardi
 
The n Queen Problem
The n Queen ProblemThe n Queen Problem
The n Queen ProblemSukrit Gupta
 
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: IntroductionTayyabSattar5
 

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

諾貝爾經濟學獎得主的獲利公式
諾貝爾經濟學獎得主的獲利公式諾貝爾經濟學獎得主的獲利公式
諾貝爾經濟學獎得主的獲利公式Abner Chih Yi Huang
 
Introduction to Szemerédi regularity lemma
Introduction to Szemerédi regularity lemmaIntroduction to Szemerédi regularity lemma
Introduction to Szemerédi regularity lemmaAbner Chih Yi Huang
 
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 EqulibraAbner Chih Yi Huang
 
An introduction to Google test framework
An introduction to Google test frameworkAn introduction to Google test framework
An introduction to Google test frameworkAbner Chih Yi Huang
 
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 derandomizationAbner Chih Yi Huang
 
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 graphAbner Chih Yi Huang
 
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 theoryAbner 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

How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 

Recently uploaded (20)

How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 

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.