SlideShare a Scribd company logo
Algorithms
Divide And Conquer -Surfing Lower
Bounds
2 -2
Lower bound
• Def : A lower bound of a problem is the least time
complexity required for any algorithm which can be used
to solve this problem.
☆ worst case lower bound
☆ average case lower bound
• The lower bound for a problem is not unique.
– e.g. Ω(1), Ω(n), Ω(n log n) are all lower bounds for
sorting.
– (Ω(1), Ω(n) are trivial)
2 -3
• At present, if the highest lower bound of a problem
is Ω(n log n) and the time complexity of the best
algorithm is O(n2
).
– We may try to find a higher lower bound.
– We may try to find a better algorithm.
– Both of the lower bound and the algorithm may be
improved.
• If the present lower bound is Ω(n log n) and there
is an algorithm with time complexity O(n log n),
then the algorithm is optimal..
2 -4
6 permutations for 3 data elements
a1
a2
a3
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1
The worst case lower bound of sorting
2 -5
Straight insertion sort:
• input data: (2, 3, 1)
(1)  a1
:a2
(2)  a2
:a3
, a2
↔a3
(3)  a1
:a2
, a1
↔a2
• input data: (2, 1, 3)
(1)a1
:a2
, a1
↔a2
(2)a2
:a3
2 -6
Decision tree for straight insertion sort
2 -7
Decision tree for bubble sort
2 -8
Lower bound of sorting
• To find the lower bound, we have to find the
smallest depth of a binary tree.
• n! distinct permutations
n! leaf nodes in the binary decision tree.
• balanced tree has the smallest depth:
log(n!) = Ω(n log n)
lower bound for sorting: Ω(n log n)
2 -9
Method 1:
log(n!) = log(n(n− 1)…1)
= log2 + log3 +…+ log n
> log xdx
n
1∫
= log e ln xdx
n
1∫
= log e[ ln ]x x x n
− 1
= log e(n ln n − n + 1)
= n log n − n log e + 1.44
≥ n log n − 1.44n
=Ω (n log n)
2 -10
Method 2:
• Stirling approximation:
– n! ≈
– log n! ≈ log ≈ n log n ≈ Ω(n log n)
2πn
n
e
n
( )
2
1
2
π + +log logn n
n
e
n n! Sn
1 1 0.922
2 2 1.919
3 6 5.825
4 24 23.447
5 120 118.02
6 720 707.39
10 3,628,800 3,598,600
20 2.433x1018
2.423x1018
100 9.333x10157
9.328x10157
2 -11
)A(
),i-(
A(i)
A(i)):A(
)A(
ni:
A(i)
A(i)
),...,A(n)),A(A(
1Output
End
11Restore
Delete
1
1Output
Begin
do2down toFor
s.'ofsequencesortedThe:Ouput
d.constructealreadyheapaofnodeaiseacherewh
21:Input
Heapsort7-2Algorithm
=
=
2 -12
Heapsort—An optimal sorting algorithm
• A heap : parent ≥ son
2 -13
• output the maximum and restore:
• Heapsort: construction
output
2 -14
Phase 1: construction
• input data: 4, 37, 26, 15, 48 • restore the subtree rooted at
A(2):
• restore the tree rooted at
A(1):
2 -15
Phase 2: output
2 -16
Implementation
• using a linear array
not a binary tree.
– The sons of A(h) are A(2h) and A(2h+1).
• time complexity: O(n log n)
2 -17
Time complexity
Phase 1: construction
d = log n: depth
# of comparisons is at most:
L
d
=
−
∑
0
1
2(d−L)2L
=2d
L
d
=
−
∑
0
1
2L
−4
L
d
=
−
∑
0
1
L2L-1
(
L
k
=
∑
0
L2L-1
= 2k
(k−1)+1)
=2d(2d
−1) −4(2d-1
(d −1 −1) + 1)
:
= cn −2log n−4, 2 ≤c ≤4
d
L
d-L
2 -18
Time complexity
Phase 2: output
2
i
n
=
−
∑
1
1
log i
= :
=2nlog n−4cn + 4, 2 ≤c ≤4
=O(n log n)
log i
i nodes
2 -19
Average case lower bound of sorting
• By binary decision tree
• The average time complexity of a sorting algorithm:
the external path length of the binary tree
n!
• The external path length is minimized if the tree is
balanced.
(all leaf nodes on level d or level d−1)
2 -20
unbalanced
external path length
= 4⋅3 + 1 = 13
balanced
external path length
= 2⋅3+3⋅2 = 12
Average case lower bound of sorting
2 -21
Compute the min external path length
1. Depth of balanced binary tree with c leaf nodes:
d = log c
Leaf nodes can appear only on level d or d−1.
2. x1
leaf nodes on level d−1
x2
leaf nodes on level d
x1
+ x2
= c
x1
+ = 2d-1
⇒ x1
= 2d
−c
d-1
x2
2
2 -22
3. External path length:
M= x1
(d − 1) + x2
d
= (2d
− 1)(d − 1) + 2(c − 2d-1
)d
= c(d − 1) + 2(c − 2d-1
), d − 1 = log c
= clog c + 2(c − 2logc
)
4. c = n!
M = n!log n! + 2(n! − 2logn!
)
M/n! = log n! + 2
= log n! + c, 0 ≤ c ≤ 1
= Ω(n log n)
Average case lower bound of sorting: Ω(n log n)
2 -23
Quicksort & Heapsort
• Quicksort is optimal in the average case.
(Θ(n log n) in average )
• (i)worst case time complexity of heapsort is
Θ(n log n)
(ii)average case lower bound: Ω(n log n)
– average case time complexity of heapsort is Θ(n log
n)
– Heapsort is optimal in the average case..
2 -24
Improving a lower bound through
oracles
• Problem P: merge two sorted sequences A and B with
lengths m and n.
(1) Binary decision tree:
There are ways !
leaf nodes in the binary tree.
⇒ The lower bound for merging:
log  ≤ m + n − 1 (conventional merging)
m n
n
+





m n
n
+





m n
n
+





2 -25
When m = n
log
m n
n
+




= log
( )!
( !)
2
2
m
m
= log((2m)!) −2log m!
Using Stirling approximation
n! ≈2πn
n
e
n
( )
log
m n
n
+




≈2m −
1
2
log m + O(1)
Optimal algorithm: 2m −1 comparisons
log
m n
n
+




< 2m −1
2 -26
(2) Oracle:
• The oracle tries its best to cause the algorithm
to work as hard as it might. (to give a very hard
data set)
• Sorted sequences:
– A: a1
< a2
< … < am
– B: b1
< b2
< … < bm
• The very hard case:
– a1
< b1
< a2
< b2
< … < am
< bm
2 -27
• We must compare:
a1
: b1
b1
: a2
a2
: b2
:
bm-1
: am-1
am
: bm
• Otherwise, we may get a wrong result for some input data.
e.g. If b1
and a2
are not compared, we can not distinguish
a1
< b1
< a2
< b2
< … < am
< bm
and
a1
< a2
< b1
< b2
< … < am
< bm
• Thus, at least 2m−1 comparisons are required.
• The conventional merging algorithm is optimal for m = n.
2 -28
Finding lower bound by problem
transformation
• Problem A reduces to problem B (A∝B)
– iff A can be solved by using any algorithm which
solves B.
– If A∝B, B is more difficult.
• Note: T(tr1
) + T(tr2
) < T(B)
T(A) ≤ T(tr1
) + T(tr2
) + T(B) ∼ O(T(B))
instance
of A
transformation
T(tr1)
instance of B
T(A) T(B) solver of B
answer
of A
transformation
T(tr2) answer of B
2 -29
The lower bound of the convex
hull problem
• sorting ∝ convex hull
A B
• an instance of A: (x1
, x2
,…, xn
)
↓transformation
an instance of B: {( x1
, x1
2
), ( x2
, x2
2
),
…, ( xn
, xn
2
)}
assume: x1
< x2
< …< xn
2 -30
• If the convex hull problem can be solved,
we can also solve the sorting problem.
– The lower bound of sorting: Ω(n log n)
• The lower bound of the convex hull
problem: Ω(n log n)
2 -31
The lower bound of the Euclidean minimal
spanning tree (MST) problem
• sorting ∝ Euclidean MST
A B
• an instance of A: (x1
, x2
,…, xn
)
↓transformation
an instance of B: {( x1
, 0), ( x2
, 0),…, ( xn
, 0)}
– Assume x1
< x2
< x3
<…< xn
– ⇔there is an edge between (xi
, 0) and (xi+1
, 0) in
the MST, where 1 ≤ i ≤ n−1
2 -32
• If the Euclidean MST problem can be
solved, we can also solve the sorting
problem.
– The lower bound of sorting: Ω(n log n)
• The lower bound of the Euclidean MST
problem: Ω(n log n)

More Related Content

What's hot

Meta-Learning with Memory-Augmented Neural Networks (MANN)
Meta-Learning with Memory-Augmented Neural Networks (MANN)Meta-Learning with Memory-Augmented Neural Networks (MANN)
Meta-Learning with Memory-Augmented Neural Networks (MANN)
Yeonsu Kim
 
Variational Autoencoder
Variational AutoencoderVariational Autoencoder
Variational Autoencoder
Mark Chang
 
Master theorem
Master theoremMaster theorem
Master theorem
fika sweety
 
Transformers in Vision: From Zero to Hero
Transformers in Vision: From Zero to HeroTransformers in Vision: From Zero to Hero
Transformers in Vision: From Zero to Hero
Bill Liu
 
Introduction to Named Entity Recognition
Introduction to Named Entity RecognitionIntroduction to Named Entity Recognition
Introduction to Named Entity Recognition
Tomer Lieber
 
word2vec, LDA, and introducing a new hybrid algorithm: lda2vec
word2vec, LDA, and introducing a new hybrid algorithm: lda2vecword2vec, LDA, and introducing a new hybrid algorithm: lda2vec
word2vec, LDA, and introducing a new hybrid algorithm: lda2vec
👋 Christopher Moody
 
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
Kirill Eremenko
 
Diffusion models beat gans on image synthesis
Diffusion models beat gans on image synthesisDiffusion models beat gans on image synthesis
Diffusion models beat gans on image synthesis
BeerenSahu
 
Mask-RCNN for Instance Segmentation
Mask-RCNN for Instance SegmentationMask-RCNN for Instance Segmentation
Mask-RCNN for Instance Segmentation
Dat Nguyen
 
Np hard
Np hardNp hard
Np hard
jesal_joshi
 
Optimization in Deep Learning
Optimization in Deep LearningOptimization in Deep Learning
Optimization in Deep Learning
Yan Xu
 
[DL Hacks]Semi-Supervised Classification with Graph Convolutional Networks
[DL Hacks]Semi-Supervised Classification with Graph Convolutional Networks[DL Hacks]Semi-Supervised Classification with Graph Convolutional Networks
[DL Hacks]Semi-Supervised Classification with Graph Convolutional Networks
Deep Learning JP
 
Prims & kruskal algorithms
Prims & kruskal algorithmsPrims & kruskal algorithms
Prims & kruskal algorithms
Ayesha Tahir
 
最近傍探索と直積量子化(Nearest neighbor search and Product Quantization)
最近傍探索と直積量子化(Nearest neighbor search and Product Quantization)最近傍探索と直積量子化(Nearest neighbor search and Product Quantization)
最近傍探索と直積量子化(Nearest neighbor search and Product Quantization)
Nguyen Tuan
 
The Singular Value Decomposition theroy + example
 The Singular Value Decomposition theroy + example  The Singular Value Decomposition theroy + example
The Singular Value Decomposition theroy + example
shivam choubey
 
SVD sath.ppt
SVD sath.pptSVD sath.ppt
SVD sath.ppt
SathishShetty13
 
Variational Autoencoder Tutorial
Variational Autoencoder Tutorial Variational Autoencoder Tutorial
Variational Autoencoder Tutorial
Hojin Yang
 
ViT (Vision Transformer) Review [CDM]
ViT (Vision Transformer) Review [CDM]ViT (Vision Transformer) Review [CDM]
ViT (Vision Transformer) Review [CDM]
Dongmin Choi
 
What is word2vec?
What is word2vec?What is word2vec?
What is word2vec?
Traian Rebedea
 
Recommandation forcompetitiveprogrammers
Recommandation forcompetitiveprogrammersRecommandation forcompetitiveprogrammers
Recommandation forcompetitiveprogrammers
skyaozora
 

What's hot (20)

Meta-Learning with Memory-Augmented Neural Networks (MANN)
Meta-Learning with Memory-Augmented Neural Networks (MANN)Meta-Learning with Memory-Augmented Neural Networks (MANN)
Meta-Learning with Memory-Augmented Neural Networks (MANN)
 
Variational Autoencoder
Variational AutoencoderVariational Autoencoder
Variational Autoencoder
 
Master theorem
Master theoremMaster theorem
Master theorem
 
Transformers in Vision: From Zero to Hero
Transformers in Vision: From Zero to HeroTransformers in Vision: From Zero to Hero
Transformers in Vision: From Zero to Hero
 
Introduction to Named Entity Recognition
Introduction to Named Entity RecognitionIntroduction to Named Entity Recognition
Introduction to Named Entity Recognition
 
word2vec, LDA, and introducing a new hybrid algorithm: lda2vec
word2vec, LDA, and introducing a new hybrid algorithm: lda2vecword2vec, LDA, and introducing a new hybrid algorithm: lda2vec
word2vec, LDA, and introducing a new hybrid algorithm: lda2vec
 
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
Deep Learning A-Z™: Recurrent Neural Networks (RNN) - The Vanishing Gradient ...
 
Diffusion models beat gans on image synthesis
Diffusion models beat gans on image synthesisDiffusion models beat gans on image synthesis
Diffusion models beat gans on image synthesis
 
Mask-RCNN for Instance Segmentation
Mask-RCNN for Instance SegmentationMask-RCNN for Instance Segmentation
Mask-RCNN for Instance Segmentation
 
Np hard
Np hardNp hard
Np hard
 
Optimization in Deep Learning
Optimization in Deep LearningOptimization in Deep Learning
Optimization in Deep Learning
 
[DL Hacks]Semi-Supervised Classification with Graph Convolutional Networks
[DL Hacks]Semi-Supervised Classification with Graph Convolutional Networks[DL Hacks]Semi-Supervised Classification with Graph Convolutional Networks
[DL Hacks]Semi-Supervised Classification with Graph Convolutional Networks
 
Prims & kruskal algorithms
Prims & kruskal algorithmsPrims & kruskal algorithms
Prims & kruskal algorithms
 
最近傍探索と直積量子化(Nearest neighbor search and Product Quantization)
最近傍探索と直積量子化(Nearest neighbor search and Product Quantization)最近傍探索と直積量子化(Nearest neighbor search and Product Quantization)
最近傍探索と直積量子化(Nearest neighbor search and Product Quantization)
 
The Singular Value Decomposition theroy + example
 The Singular Value Decomposition theroy + example  The Singular Value Decomposition theroy + example
The Singular Value Decomposition theroy + example
 
SVD sath.ppt
SVD sath.pptSVD sath.ppt
SVD sath.ppt
 
Variational Autoencoder Tutorial
Variational Autoencoder Tutorial Variational Autoencoder Tutorial
Variational Autoencoder Tutorial
 
ViT (Vision Transformer) Review [CDM]
ViT (Vision Transformer) Review [CDM]ViT (Vision Transformer) Review [CDM]
ViT (Vision Transformer) Review [CDM]
 
What is word2vec?
What is word2vec?What is word2vec?
What is word2vec?
 
Recommandation forcompetitiveprogrammers
Recommandation forcompetitiveprogrammersRecommandation forcompetitiveprogrammers
Recommandation forcompetitiveprogrammers
 

Viewers also liked

Research
ResearchResearch
Lower bound
Lower boundLower bound
Lower bound
Rajendran
 
Recommendations for the Shear Assessment of Reinforced Concrete Solid Slab Br...
Recommendations for the Shear Assessment of Reinforced Concrete Solid Slab Br...Recommendations for the Shear Assessment of Reinforced Concrete Solid Slab Br...
Recommendations for the Shear Assessment of Reinforced Concrete Solid Slab Br...
Eva Lantsoght
 
5 cramer-rao lower bound
5 cramer-rao lower bound5 cramer-rao lower bound
5 cramer-rao lower bound
Solo Hermelin
 
Counting Sort Lowerbound
Counting Sort LowerboundCounting Sort Lowerbound
Counting Sort Lowerbounddespicable me
 
A2 evaluation UPDATED
A2 evaluation UPDATEDA2 evaluation UPDATED
A2 evaluation UPDATED
Toni Hendry
 
Evaluation question 2
Evaluation question 2Evaluation question 2
Evaluation question 2
Danielle Viner
 
Evaluation 2
Evaluation 2Evaluation 2
Evaluation 2
Rebecca Withers
 
What have you learned from your audience feedback?
What have you learned from your audience feedback?What have you learned from your audience feedback?
What have you learned from your audience feedback?
kikiASmedia
 
What have you learned from your audience feedback?
What have you learned from your audience feedback?What have you learned from your audience feedback?
What have you learned from your audience feedback?
Jack Ward
 
Evaluation Task 3: What have you learned from your audience feedback?
Evaluation Task 3: What have you learned from your audience feedback?Evaluation Task 3: What have you learned from your audience feedback?
Evaluation Task 3: What have you learned from your audience feedback?
Evelyn Wandernoth
 
Evaluation 2 Improved
Evaluation 2 ImprovedEvaluation 2 Improved
Evaluation 2 Improved
elleahmedia
 
Evaluation q2 actual
Evaluation q2 actualEvaluation q2 actual
Evaluation q2 actual
TheTargetMaster
 
Evaluation question 3 – what have you learned from your audience feedback?
Evaluation question 3 – what have you learned from your audience feedback?Evaluation question 3 – what have you learned from your audience feedback?
Evaluation question 3 – what have you learned from your audience feedback?
David Odumosu
 
AS media evaluation_2015
AS media evaluation_2015AS media evaluation_2015
AS media evaluation_2015
Chris Earl
 
Question 2 evaluation
Question 2 evaluationQuestion 2 evaluation
Question 2 evaluation
sserenaab
 
How do your products use or challenge conventions and how do they represent s...
How do your products use or challenge conventions and how do they represent s...How do your products use or challenge conventions and how do they represent s...
How do your products use or challenge conventions and how do they represent s...Amadia Arif
 
A2 evaluation 2017
A2 evaluation 2017A2 evaluation 2017
A2 evaluation 2017
Chris Earl
 
Evaluation Task 3 (p2): What have you learned from your audience feedback?
Evaluation Task 3 (p2): What have you learned from your audience feedback? Evaluation Task 3 (p2): What have you learned from your audience feedback?
Evaluation Task 3 (p2): What have you learned from your audience feedback?
Evelyn Wandernoth
 

Viewers also liked (20)

Research
ResearchResearch
Research
 
Lower bound
Lower boundLower bound
Lower bound
 
Recommendations for the Shear Assessment of Reinforced Concrete Solid Slab Br...
Recommendations for the Shear Assessment of Reinforced Concrete Solid Slab Br...Recommendations for the Shear Assessment of Reinforced Concrete Solid Slab Br...
Recommendations for the Shear Assessment of Reinforced Concrete Solid Slab Br...
 
Chap 14
Chap 14Chap 14
Chap 14
 
5 cramer-rao lower bound
5 cramer-rao lower bound5 cramer-rao lower bound
5 cramer-rao lower bound
 
Counting Sort Lowerbound
Counting Sort LowerboundCounting Sort Lowerbound
Counting Sort Lowerbound
 
A2 evaluation UPDATED
A2 evaluation UPDATEDA2 evaluation UPDATED
A2 evaluation UPDATED
 
Evaluation question 2
Evaluation question 2Evaluation question 2
Evaluation question 2
 
Evaluation 2
Evaluation 2Evaluation 2
Evaluation 2
 
What have you learned from your audience feedback?
What have you learned from your audience feedback?What have you learned from your audience feedback?
What have you learned from your audience feedback?
 
What have you learned from your audience feedback?
What have you learned from your audience feedback?What have you learned from your audience feedback?
What have you learned from your audience feedback?
 
Evaluation Task 3: What have you learned from your audience feedback?
Evaluation Task 3: What have you learned from your audience feedback?Evaluation Task 3: What have you learned from your audience feedback?
Evaluation Task 3: What have you learned from your audience feedback?
 
Evaluation 2 Improved
Evaluation 2 ImprovedEvaluation 2 Improved
Evaluation 2 Improved
 
Evaluation q2 actual
Evaluation q2 actualEvaluation q2 actual
Evaluation q2 actual
 
Evaluation question 3 – what have you learned from your audience feedback?
Evaluation question 3 – what have you learned from your audience feedback?Evaluation question 3 – what have you learned from your audience feedback?
Evaluation question 3 – what have you learned from your audience feedback?
 
AS media evaluation_2015
AS media evaluation_2015AS media evaluation_2015
AS media evaluation_2015
 
Question 2 evaluation
Question 2 evaluationQuestion 2 evaluation
Question 2 evaluation
 
How do your products use or challenge conventions and how do they represent s...
How do your products use or challenge conventions and how do they represent s...How do your products use or challenge conventions and how do they represent s...
How do your products use or challenge conventions and how do they represent s...
 
A2 evaluation 2017
A2 evaluation 2017A2 evaluation 2017
A2 evaluation 2017
 
Evaluation Task 3 (p2): What have you learned from your audience feedback?
Evaluation Task 3 (p2): What have you learned from your audience feedback? Evaluation Task 3 (p2): What have you learned from your audience feedback?
Evaluation Task 3 (p2): What have you learned from your audience feedback?
 

Similar to Divide and conquer surfing lower bounds

5.2 divede and conquer 03
5.2 divede and conquer 035.2 divede and conquer 03
5.2 divede and conquer 03
Krish_ver2
 
5.2 divede and conquer 03
5.2 divede and conquer 035.2 divede and conquer 03
5.2 divede and conquer 03
Krish_ver2
 
1_Asymptotic_Notation_pptx.pptx
1_Asymptotic_Notation_pptx.pptx1_Asymptotic_Notation_pptx.pptx
1_Asymptotic_Notation_pptx.pptx
pallavidhade2
 
Recurrences
RecurrencesRecurrences
Recurrences
DEVTYPE
 
Introduction
IntroductionIntroduction
Introduction
pilavare
 
Algorithm Design and Analysis
Algorithm Design and AnalysisAlgorithm Design and Analysis
Algorithm Design and Analysis
Reetesh Gupta
 
AsymptoticAnalysis.ppt
AsymptoticAnalysis.pptAsymptoticAnalysis.ppt
AsymptoticAnalysis.ppt
SiddheshUpadhyay3
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
Soujanya V
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
Dr. C.V. Suresh Babu
 
Last+minute+revision(+Final)+(1) (1).pptx
Last+minute+revision(+Final)+(1) (1).pptxLast+minute+revision(+Final)+(1) (1).pptx
Last+minute+revision(+Final)+(1) (1).pptx
AryanMishra860130
 
L2
L2L2
Recurrence relationclass 5
Recurrence relationclass 5Recurrence relationclass 5
Recurrence relationclass 5Kumar
 
Unit 3
Unit 3Unit 3
Unit 3
guna287176
 
Dr hasany 2467_16649_1_lec-2-zabist
Dr hasany 2467_16649_1_lec-2-zabistDr hasany 2467_16649_1_lec-2-zabist
Dr hasany 2467_16649_1_lec-2-zabist
Gatewayggg Testeru
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
Chap-2 Preliminary Concepts and Linear Finite Elements.pptx
Chap-2 Preliminary Concepts and  Linear Finite Elements.pptxChap-2 Preliminary Concepts and  Linear Finite Elements.pptx
Chap-2 Preliminary Concepts and Linear Finite Elements.pptx
Samirsinh Parmar
 
Algorithms
AlgorithmsAlgorithms
Algorithms
Ankit Agarwal
 

Similar to Divide and conquer surfing lower bounds (20)

5.2 divede and conquer 03
5.2 divede and conquer 035.2 divede and conquer 03
5.2 divede and conquer 03
 
5.2 divede and conquer 03
5.2 divede and conquer 035.2 divede and conquer 03
5.2 divede and conquer 03
 
1_Asymptotic_Notation_pptx.pptx
1_Asymptotic_Notation_pptx.pptx1_Asymptotic_Notation_pptx.pptx
1_Asymptotic_Notation_pptx.pptx
 
Recurrences
RecurrencesRecurrences
Recurrences
 
Introduction
IntroductionIntroduction
Introduction
 
Algorithm Design and Analysis
Algorithm Design and AnalysisAlgorithm Design and Analysis
Algorithm Design and Analysis
 
AsymptoticAnalysis.ppt
AsymptoticAnalysis.pptAsymptoticAnalysis.ppt
AsymptoticAnalysis.ppt
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
 
Recurrences
RecurrencesRecurrences
Recurrences
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Last+minute+revision(+Final)+(1) (1).pptx
Last+minute+revision(+Final)+(1) (1).pptxLast+minute+revision(+Final)+(1) (1).pptx
Last+minute+revision(+Final)+(1) (1).pptx
 
L2
L2L2
L2
 
Recurrence relationclass 5
Recurrence relationclass 5Recurrence relationclass 5
Recurrence relationclass 5
 
Unit 3
Unit 3Unit 3
Unit 3
 
Unit 3
Unit 3Unit 3
Unit 3
 
Dr hasany 2467_16649_1_lec-2-zabist
Dr hasany 2467_16649_1_lec-2-zabistDr hasany 2467_16649_1_lec-2-zabist
Dr hasany 2467_16649_1_lec-2-zabist
 
Paper computer
Paper computerPaper computer
Paper computer
 
Paper computer
Paper computerPaper computer
Paper computer
 
Chap-2 Preliminary Concepts and Linear Finite Elements.pptx
Chap-2 Preliminary Concepts and  Linear Finite Elements.pptxChap-2 Preliminary Concepts and  Linear Finite Elements.pptx
Chap-2 Preliminary Concepts and Linear Finite Elements.pptx
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 

More from Rajendran

Element distinctness lower bounds
Element distinctness lower boundsElement distinctness lower bounds
Element distinctness lower bounds
Rajendran
 
Scheduling with Startup and Holding Costs
Scheduling with Startup and Holding CostsScheduling with Startup and Holding Costs
Scheduling with Startup and Holding Costs
Rajendran
 
Red black tree
Red black treeRed black tree
Red black tree
Rajendran
 
Hash table
Hash tableHash table
Hash table
Rajendran
 
Medians and order statistics
Medians and order statisticsMedians and order statistics
Medians and order statistics
Rajendran
 
Proof master theorem
Proof master theoremProof master theorem
Proof master theorem
Rajendran
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
Rajendran
 
Recurrence theorem
Recurrence theoremRecurrence theorem
Recurrence theorem
Rajendran
 
Master method
Master method Master method
Master method
Rajendran
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
Rajendran
 
Hash tables
Hash tablesHash tables
Hash tables
Rajendran
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
Rajendran
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
Rajendran
 
Longest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm AnalysisLongest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm Analysis
Rajendran
 
Dynamic programming in Algorithm Analysis
Dynamic programming in Algorithm AnalysisDynamic programming in Algorithm Analysis
Dynamic programming in Algorithm Analysis
Rajendran
 
Average case Analysis of Quicksort
Average case Analysis of QuicksortAverage case Analysis of Quicksort
Average case Analysis of Quicksort
Rajendran
 
Np completeness
Np completenessNp completeness
Np completeness
Rajendran
 
computer languages
computer languagescomputer languages
computer languages
Rajendran
 
proving non-computability
proving non-computabilityproving non-computability
proving non-computability
Rajendran
 
the halting_problem
the halting_problemthe halting_problem
the halting_problem
Rajendran
 

More from Rajendran (20)

Element distinctness lower bounds
Element distinctness lower boundsElement distinctness lower bounds
Element distinctness lower bounds
 
Scheduling with Startup and Holding Costs
Scheduling with Startup and Holding CostsScheduling with Startup and Holding Costs
Scheduling with Startup and Holding Costs
 
Red black tree
Red black treeRed black tree
Red black tree
 
Hash table
Hash tableHash table
Hash table
 
Medians and order statistics
Medians and order statisticsMedians and order statistics
Medians and order statistics
 
Proof master theorem
Proof master theoremProof master theorem
Proof master theorem
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
 
Recurrence theorem
Recurrence theoremRecurrence theorem
Recurrence theorem
 
Master method
Master method Master method
Master method
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
 
Hash tables
Hash tablesHash tables
Hash tables
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Longest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm AnalysisLongest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm Analysis
 
Dynamic programming in Algorithm Analysis
Dynamic programming in Algorithm AnalysisDynamic programming in Algorithm Analysis
Dynamic programming in Algorithm Analysis
 
Average case Analysis of Quicksort
Average case Analysis of QuicksortAverage case Analysis of Quicksort
Average case Analysis of Quicksort
 
Np completeness
Np completenessNp completeness
Np completeness
 
computer languages
computer languagescomputer languages
computer languages
 
proving non-computability
proving non-computabilityproving non-computability
proving non-computability
 
the halting_problem
the halting_problemthe halting_problem
the halting_problem
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 

Divide and conquer surfing lower bounds

  • 1. Algorithms Divide And Conquer -Surfing Lower Bounds
  • 2. 2 -2 Lower bound • Def : A lower bound of a problem is the least time complexity required for any algorithm which can be used to solve this problem. ☆ worst case lower bound ☆ average case lower bound • The lower bound for a problem is not unique. – e.g. Ω(1), Ω(n), Ω(n log n) are all lower bounds for sorting. – (Ω(1), Ω(n) are trivial)
  • 3. 2 -3 • At present, if the highest lower bound of a problem is Ω(n log n) and the time complexity of the best algorithm is O(n2 ). – We may try to find a higher lower bound. – We may try to find a better algorithm. – Both of the lower bound and the algorithm may be improved. • If the present lower bound is Ω(n log n) and there is an algorithm with time complexity O(n log n), then the algorithm is optimal..
  • 4. 2 -4 6 permutations for 3 data elements a1 a2 a3 1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1 The worst case lower bound of sorting
  • 5. 2 -5 Straight insertion sort: • input data: (2, 3, 1) (1)  a1 :a2 (2)  a2 :a3 , a2 ↔a3 (3)  a1 :a2 , a1 ↔a2 • input data: (2, 1, 3) (1)a1 :a2 , a1 ↔a2 (2)a2 :a3
  • 6. 2 -6 Decision tree for straight insertion sort
  • 7. 2 -7 Decision tree for bubble sort
  • 8. 2 -8 Lower bound of sorting • To find the lower bound, we have to find the smallest depth of a binary tree. • n! distinct permutations n! leaf nodes in the binary decision tree. • balanced tree has the smallest depth: log(n!) = Ω(n log n) lower bound for sorting: Ω(n log n)
  • 9. 2 -9 Method 1: log(n!) = log(n(n− 1)…1) = log2 + log3 +…+ log n > log xdx n 1∫ = log e ln xdx n 1∫ = log e[ ln ]x x x n − 1 = log e(n ln n − n + 1) = n log n − n log e + 1.44 ≥ n log n − 1.44n =Ω (n log n)
  • 10. 2 -10 Method 2: • Stirling approximation: – n! ≈ – log n! ≈ log ≈ n log n ≈ Ω(n log n) 2πn n e n ( ) 2 1 2 π + +log logn n n e n n! Sn 1 1 0.922 2 2 1.919 3 6 5.825 4 24 23.447 5 120 118.02 6 720 707.39 10 3,628,800 3,598,600 20 2.433x1018 2.423x1018 100 9.333x10157 9.328x10157
  • 12. 2 -12 Heapsort—An optimal sorting algorithm • A heap : parent ≥ son
  • 13. 2 -13 • output the maximum and restore: • Heapsort: construction output
  • 14. 2 -14 Phase 1: construction • input data: 4, 37, 26, 15, 48 • restore the subtree rooted at A(2): • restore the tree rooted at A(1):
  • 15. 2 -15 Phase 2: output
  • 16. 2 -16 Implementation • using a linear array not a binary tree. – The sons of A(h) are A(2h) and A(2h+1). • time complexity: O(n log n)
  • 17. 2 -17 Time complexity Phase 1: construction d = log n: depth # of comparisons is at most: L d = − ∑ 0 1 2(d−L)2L =2d L d = − ∑ 0 1 2L −4 L d = − ∑ 0 1 L2L-1 ( L k = ∑ 0 L2L-1 = 2k (k−1)+1) =2d(2d −1) −4(2d-1 (d −1 −1) + 1) : = cn −2log n−4, 2 ≤c ≤4 d L d-L
  • 18. 2 -18 Time complexity Phase 2: output 2 i n = − ∑ 1 1 log i = : =2nlog n−4cn + 4, 2 ≤c ≤4 =O(n log n) log i i nodes
  • 19. 2 -19 Average case lower bound of sorting • By binary decision tree • The average time complexity of a sorting algorithm: the external path length of the binary tree n! • The external path length is minimized if the tree is balanced. (all leaf nodes on level d or level d−1)
  • 20. 2 -20 unbalanced external path length = 4⋅3 + 1 = 13 balanced external path length = 2⋅3+3⋅2 = 12 Average case lower bound of sorting
  • 21. 2 -21 Compute the min external path length 1. Depth of balanced binary tree with c leaf nodes: d = log c Leaf nodes can appear only on level d or d−1. 2. x1 leaf nodes on level d−1 x2 leaf nodes on level d x1 + x2 = c x1 + = 2d-1 ⇒ x1 = 2d −c d-1 x2 2
  • 22. 2 -22 3. External path length: M= x1 (d − 1) + x2 d = (2d − 1)(d − 1) + 2(c − 2d-1 )d = c(d − 1) + 2(c − 2d-1 ), d − 1 = log c = clog c + 2(c − 2logc ) 4. c = n! M = n!log n! + 2(n! − 2logn! ) M/n! = log n! + 2 = log n! + c, 0 ≤ c ≤ 1 = Ω(n log n) Average case lower bound of sorting: Ω(n log n)
  • 23. 2 -23 Quicksort & Heapsort • Quicksort is optimal in the average case. (Θ(n log n) in average ) • (i)worst case time complexity of heapsort is Θ(n log n) (ii)average case lower bound: Ω(n log n) – average case time complexity of heapsort is Θ(n log n) – Heapsort is optimal in the average case..
  • 24. 2 -24 Improving a lower bound through oracles • Problem P: merge two sorted sequences A and B with lengths m and n. (1) Binary decision tree: There are ways ! leaf nodes in the binary tree. ⇒ The lower bound for merging: log  ≤ m + n − 1 (conventional merging) m n n +      m n n +      m n n +     
  • 25. 2 -25 When m = n log m n n +     = log ( )! ( !) 2 2 m m = log((2m)!) −2log m! Using Stirling approximation n! ≈2πn n e n ( ) log m n n +     ≈2m − 1 2 log m + O(1) Optimal algorithm: 2m −1 comparisons log m n n +     < 2m −1
  • 26. 2 -26 (2) Oracle: • The oracle tries its best to cause the algorithm to work as hard as it might. (to give a very hard data set) • Sorted sequences: – A: a1 < a2 < … < am – B: b1 < b2 < … < bm • The very hard case: – a1 < b1 < a2 < b2 < … < am < bm
  • 27. 2 -27 • We must compare: a1 : b1 b1 : a2 a2 : b2 : bm-1 : am-1 am : bm • Otherwise, we may get a wrong result for some input data. e.g. If b1 and a2 are not compared, we can not distinguish a1 < b1 < a2 < b2 < … < am < bm and a1 < a2 < b1 < b2 < … < am < bm • Thus, at least 2m−1 comparisons are required. • The conventional merging algorithm is optimal for m = n.
  • 28. 2 -28 Finding lower bound by problem transformation • Problem A reduces to problem B (A∝B) – iff A can be solved by using any algorithm which solves B. – If A∝B, B is more difficult. • Note: T(tr1 ) + T(tr2 ) < T(B) T(A) ≤ T(tr1 ) + T(tr2 ) + T(B) ∼ O(T(B)) instance of A transformation T(tr1) instance of B T(A) T(B) solver of B answer of A transformation T(tr2) answer of B
  • 29. 2 -29 The lower bound of the convex hull problem • sorting ∝ convex hull A B • an instance of A: (x1 , x2 ,…, xn ) ↓transformation an instance of B: {( x1 , x1 2 ), ( x2 , x2 2 ), …, ( xn , xn 2 )} assume: x1 < x2 < …< xn
  • 30. 2 -30 • If the convex hull problem can be solved, we can also solve the sorting problem. – The lower bound of sorting: Ω(n log n) • The lower bound of the convex hull problem: Ω(n log n)
  • 31. 2 -31 The lower bound of the Euclidean minimal spanning tree (MST) problem • sorting ∝ Euclidean MST A B • an instance of A: (x1 , x2 ,…, xn ) ↓transformation an instance of B: {( x1 , 0), ( x2 , 0),…, ( xn , 0)} – Assume x1 < x2 < x3 <…< xn – ⇔there is an edge between (xi , 0) and (xi+1 , 0) in the MST, where 1 ≤ i ≤ n−1
  • 32. 2 -32 • If the Euclidean MST problem can be solved, we can also solve the sorting problem. – The lower bound of sorting: Ω(n log n) • The lower bound of the Euclidean MST problem: Ω(n log n)