GYO algorithm: Difference between revisions

From HandWiki
Jslovo (talk | contribs)
add
 
Corlink (talk | contribs)
fixing
 
Line 36: Line 36:
* {{Cite web |last=Koutris |first=Paris |title=Lecture 4: Acyclic Conjunctive Queries |url=https://pages.cs.wisc.edu/~paris/cs784-s19/lectures/lecture4.pdf}}
* {{Cite web |last=Koutris |first=Paris |title=Lecture 4: Acyclic Conjunctive Queries |url=https://pages.cs.wisc.edu/~paris/cs784-s19/lectures/lecture4.pdf}}
* {{Cite book |last=Arenas |first=Marcelo |url=https://github.com/2b118add-dff5-4a47-b78e-21d8e7eb97ae |title=Database Theory (Preliminary Version) |last2=Barceló |first2=Pablo |last3=Libkin |first3=Leonid |last4=Martens |first4=Wim |last5=Pieris |first5=Andreas |date=August 19, 2022|chapter=Chapter 18}}
* {{Cite book |last=Arenas |first=Marcelo |url=https://github.com/2b118add-dff5-4a47-b78e-21d8e7eb97ae |title=Database Theory (Preliminary Version) |last2=Barceló |first2=Pablo |last3=Libkin |first3=Leonid |last4=Martens |first4=Wim |last5=Pieris |first5=Andreas |date=August 19, 2022|chapter=Chapter 18}}
* {{Cite web
|last1=Tziavelis
|first1=Giorgos
|last2=Gatterbauer
|first2=Wolfgang
|last3=Riedewald
|first3=Mirek
|title=Toward Responsive DBMS: Optimal Join Algorithms, Enumeration, Factorization, Ranking, and Dynamic Programming
|url=https://doi.org/10.1109/ICDE53745.2022.00299
|website=ICDE 2022 Tutorial
|year=2022
}} Part 3: Acyclic queries & Enumeration. [https://northeastern-datalab.github.io/responsive-dbms-tutorial/slides/Responsive-DBMS-tutorial-part-3-AcyclicQueries-Enumeration.pdf Slides], [https://www.youtube.com/watch?list=PL_72ERGKF6DTInW_P3a9zTYPSNLwbqOAx&v=toi7ysuyRkw 20-min video], [https://northeastern-datalab.github.io/responsive-dbms-tutorial/ Tutorial page].


== Notes ==
== Notes ==
Line 43: Line 55:
[[Category:Database algorithms]]
[[Category:Database algorithms]]
[[Category:Graph algorithms]]
[[Category:Graph algorithms]]
== See also ==
* [[Yannakakis algorithm]]


{{Sourceattribution|GYO algorithm}}
{{Sourceattribution|GYO algorithm}}

Latest revision as of 10:52, 14 April 2026

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 H=(V,E) 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 H is an ear if one of the following two conditions holds:

  • e is isolated, i.e., for every other hyperedge e, we have ee=;
  • e is almost covered by another hyperedge, i.e., there exists another hyperedge f such that all vertices in ef occur only in e.

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-empty hypergraph that has no ears, then the original hypergraph was not α-acyclic:

References

Notes

  1. Yu, C.T.; Ozsoyoglu, M.Z. (1979). "An algorithm for tree-query membership of a distributed query". COMPSAC 79. Proceedings. Computer Software and the IEEE Computer Society's Third International Applications Conference, 1979. pp. 306–312. doi:10.1109/CMPSAC.1979.762509. https://doi.org/10.1109/CMPSAC.1979.762509. 
  2. Brault-Baron, Johann (2014-03-27). "Hypergraph Acyclicity Revisited". arXiv:1403.7076 [math.CO]. See Theorem 6 for the existence of an ear

See also