How to prove that a random sort algorithm converges?
- From: "James" <jamestansc@xxxxxxxxxxxx>
- Date: 16 May 2006 18:41:47 -0700
Supposed I want to sort four numbers {5, 2, 4, 3}
I randomly select a pair of two numbers at adjacient poisitions, say i
and i+1, and I swap their position if the value at position i is
greater than the value at position i+1 (e.g., 5 > 2 so swap their
positions).
If I do this (random selection and ordering) long enough, I would
expect that
the numbers are sorted.
My question is: how do I prove that this algorithm converges?
.
- Follow-Ups:
- Re: How to prove that a random sort algorithm converges?
- From: Richard Henry
- Re: How to prove that a random sort algorithm converges?
- From: Chip Eastham
- Re: How to prove that a random sort algorithm converges?
- From: quasi
- Re: How to prove that a random sort algorithm converges?
- From: Dave Seaman
- Re: How to prove that a random sort algorithm converges?
- From: Tim Peters
- Re: How to prove that a random sort algorithm converges?
- From: Johnny
- Re: How to prove that a random sort algorithm converges?
- Prev by Date: Re: Hyper-sphere partitioning question
- Next by Date: Re: k-algebra homomorphism
- Previous by thread: question for people who know number field sieve well
- Next by thread: Re: How to prove that a random sort algorithm converges?
- Index(es):
Relevant Pages
|