Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Merge sort
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Analysis==== Firstly, each processor sorts the assigned <math>n/p</math> elements locally using a sorting algorithm with complexity <math>\mathcal{O}\left( n/p \; \log ( n/p) \right)</math>. After that, the splitter elements have to be calculated in time <math>\mathcal{O}\left(p \,\log(n/p) \log (n) \right)</math>. Finally, each group of <math>p</math> splits have to be merged in parallel by each processor with a running time of <math>\mathcal{O}(\log(p)\; n/p )</math> using a sequential [[Merge algorithm|p-way merge algorithm]]. Thus, the overall running time is given by <math>\mathcal{O}\left( \frac n p \log\left(\frac n p\right) + p \log \left( \frac n p\right) \log (n) + \frac n p \log (p) \right)</math>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)