unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@giblet.glug.org>
Cc: guile-user@gnu.org
Subject: Re: sorting by a partial order
Date: Tue, 29 Oct 2002 19:23:03 -0800	[thread overview]
Message-ID: <E186jRf-0003pY-00@giblet> (raw)
In-Reply-To: <m3of9drnle.fsf@multivac.cwru.edu> (prj@po.cwru.edu)

   From: prj@po.cwru.edu (Paul Jarc)
   Date: Tue, 29 Oct 2002 15:33:59 -0500

   I have a two-place predicate that defines a partial order (i.e., it is
   possible that neither is A less than B nor is B less than A).

this use of "partial order" is different from what i've read about in
the sorting literature.  a "poset" (partial order set) is not defined by
a predicate if the number of "places" in that predicate is less than the
number of items in the set, even though the set may indeed be in partial
order.  i guess i'm confused about the word "defines" here.

   I want to sort a sequence of items according to that predicate, so
   that if A occurs before B in the result, then B is not less than A
   according to the predicate.

ok.

   * Can sort, stable-sort, sort-list, etc., deal with a partial order
     for the less procedure, or must it be a full ordering?

here i am again confused about using "partial order" to describe the
predicate.

   * How do these procedures behave if, by mistake, the ordering
     predicate (consistently) returns contradictory results?  (A is less
     than B, and B is less than A.)

there are some shuffling algorithms that use this technique.
"consistently contradictory" sounds like a self-referential oxymoron.
(kudos to the witty prof! :-)

   * My predicate is actually not quite a partial order because it is
     not transitive.  Is there any existing code for constructing the
     transitive closure of a relation?

(perhaps not) coincidentally, i'm looking at such code now, in lr0.scm.
it has the following citation:

 ;; This is the digraph algorithm from "Efficient Construction of
 ;; LALR(1) Lookahead Sets" by F. DeRemer and T. Pennello, in ACM
 ;; TOPLS Vol 4 No 4, October 1982.  They credit J. Eve and R. Kurki
 ;; Suonio, "On Computing the transitive closure of a relation."
 ;; Acta Inf. 8 1977.

there are more recent research efforts, too.  efficient parsing seems to
still be a hot research topic (insert gratuitous xml slam here).

thi


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2002-10-30  3:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-29 20:33 sorting by a partial order Paul Jarc
2002-10-30  3:23 ` Thien-Thi Nguyen [this message]
2002-10-30  6:34   ` Keith Wright
2002-10-30  7:27     ` Thien-Thi Nguyen
2002-10-30  7:43       ` Thien-Thi Nguyen
2002-10-30 17:12     ` Paul Jarc
2002-10-31 10:22       ` rm
2002-10-31 17:41         ` Paul Jarc
2002-11-06 13:12       ` Mikael Djurfeldt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E186jRf-0003pY-00@giblet \
    --to=ttn@giblet.glug.org \
    --cc=guile-user@gnu.org \
    --cc=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).