SlidePub
Home
Categories
Login
Register
Home
General
Lecture 5.ppt howllw lsdfahdflasdfaslfhosddduusl
Lecture 5.ppt howllw lsdfahdflasdfaslfhosddduusl
shahzebahamd109
10 views
11 slides
Mar 02, 2025
Slide
1
of 11
Previous
Next
1
2
3
4
5
6
7
8
9
10
11
About This Presentation
allow this types slides
Size:
1.07 MB
Language:
en
Added:
Mar 02, 2025
Slides:
11 pages
Slide Content
Slide 1
The divide and conquer is a strategy
employed to solve a large number of
computational problems:
the problem into a small
number of pieces
solve each piece by
applying divide and conquer to it
recursively
the pieces together into
a global solution.
Slide 2
Divide and conquer strategy is
applicable in a huge number of
computational problems.
The first example of divide and
conquer algorithm we will discuss is
a simple and efficient sorting
procedure called
Slide 3
We are given a sequence of n
numbers A,which we will assume
are stored in an array A[1..n].
The objective is to output a
permutation of this sequence
sorted in increasing order.
This is normally done by permuting
the elements within the array A.
Slide 4
Here is how the merge sort algorithm
works:
: split A down the middle into
two subsequences, each of size
roughly n/2
: sort each subsequence by
calling merge sort recursively on
each.
Slide 5
: split A down the middle into
two subsequences, each of size
roughly n/2
: sort each subsequence by
calling merge sort recursively on
each.
: merge the two sorted
subsequences into a single sorted
list.
Slide 6
The dividing process ends when we
have split the subsequences down
to a single item.
A sequence of length one is trivially
sorted.
The key operation is the combine
stage which merges together two
sorted lists into a single sorted list.
Slide 7
A sequence of length one is trivially
sorted.
The key operation is the combine
stage which merges together two
sorted lists into a single sorted list.
Fortunately, the combining process
is quite easy to implement.
Slide 8
Divide and Conquer Strategy
Slide 9
The divide phase: split the list top-
down into smaller pieces
ノ 15|214| 11613|0|
Slide 10
Merge Sort
Merge sort
The divide phase: split the list top-
down into smaller pieces
ME 回 EK
x
5 4
NY >
5 4
Slide 11
Merge Sort
Merge sort
The divide phase: split the list top-
down into smaller pieces
7[5/2[4[1[6]3[0]
Tags
Categories
General
Download
Download Slideshow
Get the original presentation file
Quick Actions
Embed
Share
Save
Print
Full
Report
Statistics
Views
10
Slides
11
Age
273 days
Related Slideshows
22
Pray For The Peace Of Jerusalem and You Will Prosper
RodolfoMoralesMarcuc
30 views
26
Don_t_Waste_Your_Life_God.....powerpoint
chalobrido8
32 views
31
VILLASUR_FACTORS_TO_CONSIDER_IN_PLATING_SALAD_10-13.pdf
JaiJai148317
30 views
14
Fertility awareness methods for women in the society
Isaiah47
29 views
35
Chapter 5 Arithmetic Functions Computer Organisation and Architecture
RitikSharma297999
26 views
5
syakira bhasa inggris (1) (1).pptx.......
ourcommunity56
28 views
View More in This Category
Embed Slideshow
Dimensions
Width (px)
Height (px)
Start Page
Which slide to start from (1-11)
Options
Auto-play slides
Show controls
Embed Code
Copy Code
Share Slideshow
Share on Social Media
Share on Facebook
Share on Twitter
Share on LinkedIn
Share via Email
Or copy link
Copy
Report Content
Reason for reporting
*
Select a reason...
Inappropriate content
Copyright violation
Spam or misleading
Offensive or hateful
Privacy violation
Other
Slide number
Leave blank if it applies to the entire slideshow
Additional details
*
Help us understand the problem better