What would the expected number of swaps in a merge sort be? [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
If I were given a list of random numbers say x1, x2, .........., xn and these numbers are sorted according to the merge sort algorithm. What would be the number of expected swaps/exchanges which would take place?
probability discrete-mathematics algorithms permutations sorting
closed as off-topic by Jendrik Stelzner, Xander Henderson, max_zorn, user91500, amWhy Aug 25 at 11:32
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." â Jendrik Stelzner, Xander Henderson, max_zorn, user91500, amWhy
add a comment |Â
up vote
2
down vote
favorite
If I were given a list of random numbers say x1, x2, .........., xn and these numbers are sorted according to the merge sort algorithm. What would be the number of expected swaps/exchanges which would take place?
probability discrete-mathematics algorithms permutations sorting
closed as off-topic by Jendrik Stelzner, Xander Henderson, max_zorn, user91500, amWhy Aug 25 at 11:32
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." â Jendrik Stelzner, Xander Henderson, max_zorn, user91500, amWhy
@Newb Wouldn't that only give an answer up to multiplication by a constant? I think OP wants an exact answer in terms of $n$ ...
â Zubin Mukerjee
Apr 18 '15 at 21:27
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
If I were given a list of random numbers say x1, x2, .........., xn and these numbers are sorted according to the merge sort algorithm. What would be the number of expected swaps/exchanges which would take place?
probability discrete-mathematics algorithms permutations sorting
If I were given a list of random numbers say x1, x2, .........., xn and these numbers are sorted according to the merge sort algorithm. What would be the number of expected swaps/exchanges which would take place?
probability discrete-mathematics algorithms permutations sorting
asked Apr 18 '15 at 21:25
vineel13
134
134
closed as off-topic by Jendrik Stelzner, Xander Henderson, max_zorn, user91500, amWhy Aug 25 at 11:32
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." â Jendrik Stelzner, Xander Henderson, max_zorn, user91500, amWhy
closed as off-topic by Jendrik Stelzner, Xander Henderson, max_zorn, user91500, amWhy Aug 25 at 11:32
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." â Jendrik Stelzner, Xander Henderson, max_zorn, user91500, amWhy
@Newb Wouldn't that only give an answer up to multiplication by a constant? I think OP wants an exact answer in terms of $n$ ...
â Zubin Mukerjee
Apr 18 '15 at 21:27
add a comment |Â
@Newb Wouldn't that only give an answer up to multiplication by a constant? I think OP wants an exact answer in terms of $n$ ...
â Zubin Mukerjee
Apr 18 '15 at 21:27
@Newb Wouldn't that only give an answer up to multiplication by a constant? I think OP wants an exact answer in terms of $n$ ...
â Zubin Mukerjee
Apr 18 '15 at 21:27
@Newb Wouldn't that only give an answer up to multiplication by a constant? I think OP wants an exact answer in terms of $n$ ...
â Zubin Mukerjee
Apr 18 '15 at 21:27
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Let me Google that for you ... http://en.wikipedia.org/wiki/Merge_sort#Analysis
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Let me Google that for you ... http://en.wikipedia.org/wiki/Merge_sort#Analysis
add a comment |Â
up vote
0
down vote
Let me Google that for you ... http://en.wikipedia.org/wiki/Merge_sort#Analysis
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Let me Google that for you ... http://en.wikipedia.org/wiki/Merge_sort#Analysis
Let me Google that for you ... http://en.wikipedia.org/wiki/Merge_sort#Analysis
answered Apr 18 '15 at 22:09
Greg Martin
34.1k23060
34.1k23060
add a comment |Â
add a comment |Â
@Newb Wouldn't that only give an answer up to multiplication by a constant? I think OP wants an exact answer in terms of $n$ ...
â Zubin Mukerjee
Apr 18 '15 at 21:27