Doesn't cut just stop the DFS early? So the average and worst case work of the prolog program is still O(size of the transitive closure), but a "goal directed" PR program only does O(size of the answer), which may be much, much less work. This is a consequence of prolog's top-down vs. PR's bottom-up evaluation. We are given a leaf *me*, so prolog still has to search to find the leaf, whereas the PR does not. Cheers, Gary
attached mail follows:
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:34 GMT