Re: How to prove that a random sort algorithm converges?
- From: quasi <quasi@xxxxxxxx>
- Date: Wed, 17 May 2006 21:35:03 -0400
On 17 May 2006 17:43:26 -0700, "James" <jamestansc@xxxxxxxxxxxx>
wrote:
Thanks to all who contributed in one way or another.
Although I will need sometime to digest your suggestions, there are a
few things I learn at the moment:
(1) There are more than one way to prove the algorithm.
(2) It appears that saying "the algorithm converges is not precise
enough". We need to define what is the convergence criterion.
(3) It also appears that saying "the algorithm converges with
probability 1" is better than saying "the algorithm will converge".
Anyway, what is the difference? Is this an "almost sure" so to speak?
(4) Although the algorithm may look silly on the first sight, but it is
much hard to show its runtime complexity as compared to a proper bubble
sort. Is there a way to find the upper bound?
The upper bound is infinity. Just because the probability of
eventually reaching a sorted state is 1, that doesn't mean that there
is an upper bound.
However, for a given starting permutation x, let
E(x) = the expected number of swaps required to sort x.
Questions:
(1) Compute E(x).
(2) Presumably E(x) measures, in some sense, how far from sorted x is.
What feature of x determines E(x)?
(3) In particular, which permutations x maximize E(x)?
(4) What is the average value E_bar of E(x), averaged over all
permutations x? If E_bar can't be computed exactly, approximate it
using a simulation.
quasi
.
- Follow-Ups:
- References:
- Re: How to prove that a random sort algorithm converges?
- From: Tim Peters
- Re: How to prove that a random sort algorithm converges?
- From: James
- Re: How to prove that a random sort algorithm converges?
- Prev by Date: Re: Mathematical Fraud?
- Next by Date: Re: Difference between an "independent set" and a "maximal independent set"
- Previous by thread: Re: How to prove that a random sort algorithm converges?
- Next by thread: Re: How to prove that a random sort algorithm converges?
- Index(es):
Relevant Pages
|