GYO algorithm
The GYO algorithm[1] is an algorithm that applies to hypergraphs. The algorithm takes as input a hypergraph and determines if the hypergraph is α-acyclic. If so, it computes a decomposition of the hypergraph.
The algorithm was proposed in 1979 by Graham and independently by Yu and Özsoyoğlu, hence its name.
Definition
A hypergraph is a generalization of a graph. Formally, a hypergraph [math]\displaystyle{ H = (V, E) }[/math] consists of a set of vertices V, and of a set E of hyperedges, each of which is a subset of the vertices V. Given a hypergraph, we can define its primal graph as the undirected graph defined on the same set of vertices, in which we put an edge between any two vertices which occur together in some hyperedge.
A hypergraph H is α-acyclic if it satisfies two conditions: being chordal and being conformal. More precisely, we say that H is chordal if its primal graph is a chordal graph. We say that H is conformal if, for every clique of the primal graph, there is a hyperedge of H containing all the vertices of the clique.
The GYO algorithm takes as input a hypergraph and determines if it is α-acyclic in this sense.
Principle of the algorithm
The algorithm iteratively removes the so-called ears of the hypergraph, until the hypergraph is fully decomposed.
Formally, we say that a hyperedge e of a hypergraph [math]\displaystyle{ H }[/math] is an ear if one of the following two conditions holds:
- [math]\displaystyle{ e }[/math] is isolated, i.e., for every other hyperedge [math]\displaystyle{ e' }[/math], we have [math]\displaystyle{ e \cap e' = \emptyset }[/math];
- [math]\displaystyle{ e }[/math] is almost covered by another hyperedge, i.e., there exists another hyperedge [math]\displaystyle{ f }[/math] such that all vertices in [math]\displaystyle{ e \setminus f }[/math] occur only in [math]\displaystyle{ e }[/math].
In particular, every edge that is a subset of another edge is an ear.
The GYO algorithm then proceeds as follows:
- Find an ear e in H
- Remove e and remove all vertices of H that are only in e.
If the algorithm successfully eliminates all vertices, then the hypergraph is α-acylic. Otherwise, if the algorithm gets to a non-emtpy hypergraph that has no ears, then the original hypergraph was not α-acyclic:
Assume first the GYO algorithm ends on the empty hypergraph, let [math]\displaystyle{ e_1,\ldots,e_m }[/math] be the sequence of ears that it has found, and let [math]\displaystyle{ H_0,\ldots,H_m }[/math] the sequence of hypergraphs obtained (in particular [math]\displaystyle{ H_0 = H }[/math] and [math]\displaystyle{ H_m }[/math] is the empty hypergraph). It is clear that [math]\displaystyle{ H_m }[/math], the empty hypergraph, is [math]\displaystyle{ \alpha }[/math]-acyclic. One can then check that, if [math]\displaystyle{ H_n }[/math] is [math]\displaystyle{ \alpha }[/math]-acyclic then [math]\displaystyle{ H_{n-1} }[/math] is also [math]\displaystyle{ \alpha }[/math]-acyclic. This implies that [math]\displaystyle{ H_0 }[/math] is indeed [math]\displaystyle{ \alpha }[/math]-acyclic.
For the other direction, assuming that [math]\displaystyle{ H }[/math] is [math]\displaystyle{ \alpha }[/math]-acyclic, one can show that [math]\displaystyle{ H }[/math] has an ear [math]\displaystyle{ e }[/math].[2] Since removing this ear yields an hypergraph that is still acyclic, we can continue this process until the hypergraph becomes empty.
Running time
The algorithm can be made to work in linear time.
References
- Abiteboul, Serge; Hull, Richard; Vianu, Victor (1994-12-02) (in English). Foundations of Databases: The Logical Level. Reading, Mass.: Pearson. ISBN 978-0-201-53771-0. http://webdam.inria.fr/Alice/pdfs/all.pdf. See Algorithm 6.4.4.
Notes
- ↑ "An algorithm for tree-query membership of a distributed query | IEEE Conference Publication | IEEE Xplore". https://ieeexplore.ieee.org/abstract/document/762509.
- ↑ Brault-Baron, Johann (2014-03-27), Hypergraph Acyclicity Revisited, doi:10.48550/arXiv.1403.7076, http://arxiv.org/abs/1403.7076, retrieved 2024-01-18. See Theorem 6 for the existence of an ear
Original source: https://en.wikipedia.org/wiki/GYO algorithm.
Read more |