Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!godot.cc.duq.edu!newsgate.duke.edu!news.mathworks.com!newsfeed.internetmci.com!uunet!inXS.uu.net!allegra!akalice!NewsWatcher!user
From: pereira@research.att.com (Fernando Pereira)
Subject: Re: Tries
X-Nntp-Posting-Host: pereira-x.research.att.com
Message-ID: <pereira-2006962115520001@pereira-x.research.att.com>
Sender: usenet@research.att.com (netnews <9149-80593> 0112740)
Organization: AT&T Research
References: <4q54ru$k1u@mulga.cs.mu.OZ.AU>
Date: Thu, 20 Jun 1996 20:15:39 GMT
Lines: 19

In article <4q54ru$k1u@mulga.cs.mu.OZ.AU>, lee@munta.cs.mu.OZ.AU (Lee
Naish) wrote:

> There were a couple of articles about implementing tries in Prolog
> recently.  Unfortunately the squillions of gigabytes of disk space our
> department has are not on the news server and the articles have been
> deleted (I did save parts of the same discussion from 1992 however:-).
> [...]
I missed the original article, so I'm following up Lee's follow up. For
real-life text processing applications, standard tries are far too big and
take too long to build. For example, the naive construction of a trie for
all the suffixes of a text of length N requires O(N^2) time and space.
Compressed tries are much better. In a compressed trie, non-branching
branches are compressed into a single tree edge labeled with the
appropriate sequence of elements. A compressed trie for all the suffixes
of a text takes O(N) space. The naive trie construction algorithm takes
O(N^2) time, but there are O(N) algorithms (eg. McCreight's). Challenge:
McCreight's algorithm uses imperative data structures. Does it have an
O(N) single-assignment version?
