Sorting with only a partial order definition
Toby Dickenson
tdickenson at devmail.geminidataloggers.co.uk
Thu Oct 27 06:32:32 EDT 2005
On Thursday 27 October 2005 11:08, Lasse Vågsæther Karlsen wrote:
> What I was wondering about is if there is an algorithm that would do
> what I want? Ie. help me pick the nodes so as to minimize the number of
> edges.
To rephrase your question, you want a sorting algorithm that minimises the
number of comparisons (because a comparison involves asking a human), and
which takes advantage of any pre-existing rough ordering.
You need timsort - the algorithm behind python lists sort() method.
--
Toby Dickenson
More information about the Python-list
mailing list