From python-list Thu Oct 27 10:32:32 2005 From: Toby Dickenson Date: Thu, 27 Oct 2005 10:32:32 +0000 To: python-list Subject: Re: Sorting with only a partial order definition Message-Id: <200510271132.32831.tdickenson () devmail ! geminidataloggers ! co ! uk> X-MARC-Message: https://marc.info/?l=python-list&m=113040919329774 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 -- http://mail.python.org/mailman/listinfo/python-list