* [Caml-list] Poset variant of union-find datastructure
@ 2011-07-27 20:20 Guillaume Yziquel
2011-07-28 8:53 ` Christophe Raffalli
0 siblings, 1 reply; 4+ messages in thread
From: Guillaume Yziquel @ 2011-07-27 20:20 UTC (permalink / raw)
To: caml-list
Hi.
I'm wondering if people on this list may have any insight as to how
implement a "poset-find" datastructure much like a union-find
datastructure.
A typical union find signature can be found here:
http://www.enseignement.polytechnique.fr/informatique/INF564/html/unionFind.mli.html
The core of the signature I'm interested in is:
type 'a point
val fresh : 'a -> 'a point
val find : 'a point -> 'a
val union : 'a point -> 'a point -> unit
val equivalent : 'a point -> 'a point -> bool
and I'd like a similar signature like:
type 'a point
type rel : G | Geq | Eq | Leq | L
val fresh : 'a -> 'a point
val find : 'a point -> 'a
val relate : rel -> 'a point -> 'a point -> unit
val relation : 'a point -> 'a point -> rel option
Has anybody given thought to this kind of datastructure, or is there any
prior work? Or is there really no better alternative than a graph? What
worries me about a graph is that I do not really perceive an efficient way
to query the order between two 'a points.
--
Guillaume Yziquel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Poset variant of union-find datastructure
2011-07-27 20:20 [Caml-list] Poset variant of union-find datastructure Guillaume Yziquel
@ 2011-07-28 8:53 ` Christophe Raffalli
2011-07-28 17:03 ` Guillaume Yziquel
0 siblings, 1 reply; 4+ messages in thread
From: Christophe Raffalli @ 2011-07-28 8:53 UTC (permalink / raw)
To: caml-list
Le 27/07/2011 22:20, Guillaume Yziquel a écrit :
> Hi.
>
> I'm wondering if people on this list may have any insight as to how
> implement a "poset-find" datastructure much like a union-find
> datastructure.
>
> A typical union find signature can be found here:
>
> http://www.enseignement.polytechnique.fr/informatique/INF564/html/unionFind.mli.html
>
> The core of the signature I'm interested in is:
>
> type 'a point
> val fresh : 'a -> 'a point
> val find : 'a point -> 'a
> val union : 'a point -> 'a point -> unit
> val equivalent : 'a point -> 'a point -> bool
>
> and I'd like a similar signature like:
>
> type 'a point
> type rel : G | Geq | Eq | Leq | L
> val fresh : 'a -> 'a point
> val find : 'a point -> 'a
> val relate : rel -> 'a point -> 'a point -> unit
> val relation : 'a point -> 'a point -> rel option
>
> Has anybody given thought to this kind of datastructure, or is there any
> prior work? Or is there really no better alternative than a graph? What
> worries me about a graph is that I do not really perceive an efficient way
> to query the order between two 'a points.
>
Hello,
I only see the graph solution (unfortunately) ... With variants:
- just a graph, querying the relation requiring to traverse the graph
- computing the transitive closure of the graph (relate taking more time),
but querying being much faster.
- computing both the transitive closure and the transitive reduction of
the grap
which reduce a bit the time for relate (less edges to follow). But not
changing the
worst case complexity, I think.
I would be very happy too if there were a more efficient solution
(logarithmic complexity both for relation and relate ?)
Cheers,
Christophe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Poset variant of union-find datastructure
2011-07-28 8:53 ` Christophe Raffalli
@ 2011-07-28 17:03 ` Guillaume Yziquel
0 siblings, 0 replies; 4+ messages in thread
From: Guillaume Yziquel @ 2011-07-28 17:03 UTC (permalink / raw)
To: Christophe Raffalli; +Cc: caml-list
Le Thursday 28 Jul 2011 à 10:53:37 (+0200), Christophe Raffalli a écrit :
> Le 27/07/2011 22:20, Guillaume Yziquel a écrit :
> > Hi.
> >
> > I'm wondering if people on this list may have any insight as to how
> > implement a "poset-find" datastructure much like a union-find
> > datastructure.
> >
> > A typical union find signature can be found here:
> >
> > http://www.enseignement.polytechnique.fr/informatique/INF564/html/unionFind.mli.html
>
> Hello,
>
> I only see the graph solution (unfortunately) ... With variants:
>
> I would be very happy too if there were a more efficient solution
> (logarithmic complexity both for relation and relate ?)
The most relevant paper I could find on the topic is the following:
http://www.siam.org/proceedings/soda/2009/SODA09_044_daskalakisc.pdf
> Cheers,
> Christophe
Best regards,
--
Guillaume Yziquel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Poset variant of union-find datastructure
[not found] <fa.4YXCBZTjiruOkOWERgIhmlS84TY@ifi.uio.no>
@ 2011-07-29 15:50 ` Radu Grigore
0 siblings, 0 replies; 4+ messages in thread
From: Radu Grigore @ 2011-07-29 15:50 UTC (permalink / raw)
To: fa.caml; +Cc: caml-list
On Wednesday, July 27, 2011 9:22:16 PM UTC+1, Guillaume Yziquel wrote:
> I'm wondering if people on this list may have any insight as to how
> implement a "poset-find" datastructure much like a union-find
> datastructure.
What you want is known as "dynamic transitive closure" or, more precisely, "incremental transitive closure." See, for example,
http://scholar.google.co.uk/scholar?cluster=2214623839872244490
as a starting point.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-29 15:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 20:20 [Caml-list] Poset variant of union-find datastructure Guillaume Yziquel
2011-07-28 8:53 ` Christophe Raffalli
2011-07-28 17:03 ` Guillaume Yziquel
[not found] <fa.4YXCBZTjiruOkOWERgIhmlS84TY@ifi.uio.no>
2011-07-29 15:50 ` Radu Grigore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox