TCLOSE gives incorrect result

This forum is to report technical problems with Rel.
Post Reply
HughDarwen
Posts: 121
Joined: Sat May 24, 2008 4:49 pm

TCLOSE gives incorrect result

Post by HughDarwen »

I tried
tclose(relation{tuple{x 1, y 2}, tuple{x 2, y 3}, tuple {x 3, y 4}})
and got
RELATION {x INTEGER, y INTEGER} {
TUPLE {x 1, y 2},
TUPLE {x 2, y 3},
TUPLE {x 3, y 4}
}

I think I should have got
RELATION {x INTEGER, y INTEGER} {
TUPLE {x 1, y 2},
TUPLE {x 2, y 3},
TUPLE {x 2, y 3},
TUPLE {x 1, y 4},
TUPLE {x 2, y 4},
TUPLE {x 3, y 4}
}

Hugh
Dave
Site Admin
Posts: 368
Joined: Sun Nov 27, 2005 7:19 pm

Re: TCLOSE gives incorrect result

Post by Dave »

As noted under "Limitations" at http://dbappbuilder.sourceforge.net/Rel.html, TCLOSE is not implemented yet. Sorry. :( The input relation is passed, unchanged, to the output.

I've been trying, almost since the start of Rel, to persuade a student to tackle the implementation for a final-year undergraduate dissertation. Exploring different transitive closure algorithms and comparing their speed and memory consumption, plus perhaps investigating applications for TCLOSE, would make an excellent project. Unfortunately, I've not yet managed to convince a student to do it. At some point, I'll probably wind up implementing it myself.
Post Reply