Article View: comp.lang.prolog
Article #3463Re: An example from "Knowledge Systems & Prolog"
From: Micha Meier
Date: Thu, 07 Jul 1988 09:20
Date: Thu, 07 Jul 1988 09:20
17 lines
1198 bytes
1198 bytes
In article <149@quintus.UUCP> ok@quintus (Richard A. O'Keefe) writes: >This is actually a very interesting problem. It crops up in all sorts of >guises. I currently have an algorithm which does at most N(N-1) calls to >subsumes/2 and reduces to at most 2(N-1) when subsumes/2 happens to be >total. If anyone knows of a better algorithm I would be _very_ interested >to hear of it. I actually have no better algorithm, but I've implemented a predicate compare_instances(Order, Term1, Term2) which is similar to compare/3, and this makes it possible to get the relation between two terms using only one call (which makes only one pass through the terms). This obsoletes any sorting of the initial list. I'd be interested as well in an algorithm that performs better than the blind one. --Micha
Technical Details
Message-ID:
<560@ecrcvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!unido!ecrcvax!michaReferences:
<149@quintus.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!unido!ecrcvax!micha From: micha@ecrcvax.UUCP (Micha Meier) Newsgroups: comp.lang.prolog Subject: Re: An example from "Knowledge Systems & Prolog" Message-ID: <560@ecrcvax.UUCP> Date: 7 Jul 88 09:20:15 GMT References: <149@quintus.UUCP> Reply-To: micha@ecrcvax.UUCP (Micha Meier) Organization: ECRC, Munich 81, West Germany Lines: 17