Re: Sorting with only a partial order definition

2005-10-27 Thread Toby Dickenson
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

Re: Sorting with only a partial order definition

2005-10-27 Thread Paul Rubin
Lasse Vågsæther Karlsen <[EMAIL PROTECTED]> writes: > In that application we talked about presenting the user with two and > two images and he just had to click on the image that came first. The > problem with this was to try to present the "right" images to the user > so that he had to minimize th

Re: Sorting with only a partial order definition

2005-10-27 Thread Lasse Vågsæther Karlsen
Lasse Vågsæther Karlsen wrote: > Paul Rubin wrote: > >> Lasse Vågsæther Karlsen <[EMAIL PROTECTED]> writes: >> >>> I have a list of items and a "rule" for ordering them. Ok, managed to implement the algorithm. Might not be the optimal solution (memory and speed-wise) but it worked and doesn't t

Re: Sorting with only a partial order definition

2005-10-27 Thread Fredrik Lundh
Bryan Olson wrote: > The usual tools to deal with partial orderings are directed acyclic graphs, > and "topological sorting". Try Googling the terms along with "Python". here's a rather powerful timbot implementation: http://mail.python.org/pipermail/python-list/1999-July/006625.html

Re: Sorting with only a partial order definition

2005-10-27 Thread Lasse Vågsæther Karlsen
Paul Rubin wrote: > Lasse Vågsæther Karlsen <[EMAIL PROTECTED]> writes: > >>I have a list of items and a "rule" for ordering them. >> >>Unfortunately, the rule is not complete so it won't define the correct >>order for any two items in that list. >> >>In other words, if I pick two random items fro

Re: Sorting with only a partial order definition

2005-10-27 Thread Paul Rubin
Lasse Vågsæther Karlsen <[EMAIL PROTECTED]> writes: > I have a list of items and a "rule" for ordering them. > > Unfortunately, the rule is not complete so it won't define the correct > order for any two items in that list. > > In other words, if I pick two random items from the list I may or may

Re: Sorting with only a partial order definition

2005-10-27 Thread Bryan Olson
Lasse Vågsæther Karlsen wrote: > I have a list of items and a "rule" for ordering them. > > Unfortunately, the rule is not complete so it won't define the correct > order for any two items in that list. This is called a "partial ordering". [...] > If there isn't anything built in, does anyon

Sorting with only a partial order definition

2005-10-27 Thread Lasse Vågsæther Karlsen
I have a list of items and a "rule" for ordering them. Unfortunately, the rule is not complete so it won't define the correct order for any two items in that list. In other words, if I pick two random items from the list I may or may not have a rule that dictates the order of those two items. T