Definitionadvanced
Hypertree width
Also called generalized hypertree width.
A width measure of the hypergraph of a query; conjunctive queries of bounded hypertree width can be evaluated in polynomial time.
Hypertree width measures how far a hypergraph is from being acyclic. It is defined by a hypertree decomposition, a tree decomposition whose bags are each covered by a few edges of the hypergraph, and the width is the largest number of covering edges at one node. Gottlob, Leone and Scarcello (2002) defined it. The acyclic hypergraphs are exactly those of hypertree width 1. For each fixed , one can decide in polynomial time whether the width is at most and find a decomposition, and a conjunctive query whose hypergraph has width at most can be evaluated in polynomial time. Generalized hypertree width drops one condition of the definition. It can only be smaller, but deciding it is NP-complete already for width 2.
Definition
Let be a hypergraph. For a set of edges write for the set of vertices of its edges.
Definition (Gottlob, Leone and Scarcello 2002). A hypertree decomposition of is a triple , where is a rooted tree and each node of has a bag and a set of edges , such that:
- for each edge there is a node with ;
- for each vertex the set induces a connected subtree of ;
- for each node , ;
- for each node , , where is the union of the bags in the subtree of rooted at .
Conditions 1 and 2 say that is a tree decomposition of . Condition 3 says that the edges of cover the bag. Condition 4 is the special condition: a vertex of a covering edge that is left out of the bag must not come back lower in the tree. The width of the decomposition is . The hypertree width is the smallest width of a hypertree decomposition of .
Generalized hypertree width. A generalized hypertree decomposition has to meet only conditions 1, 2 and 3. Its smallest width is the generalized hypertree width . It is a different measure, so the alias on this page names a close relative, not the same number. Each hypertree decomposition is a generalized one, so . Adler, Gottlob and Grohe (2007) showed that hypertree width agrees, up to a constant factor, with several other hypergraph invariants.
Facts.
- Width 1 (theorem). if and only if is acyclic and has at least one edge (Gottlob, Leone and Scarcello). A join tree, with and , is a hypertree decomposition of width 1.
- Recognition (theorem). For each fixed , deciding and computing a decomposition of width at most takes polynomial time. The problem is in the class LOGCFL (Gottlob, Leone and Scarcello).
- Generalized width is hard (theorem). Deciding is NP-complete (Gottlob, Miklos and Schwentick 2009), and so is deciding (Fischl, Gottlob and Pichler 2018). So without the special condition the test for a fixed small width is already NP-hard.
- Evaluation (theorem). Let be a conjunctive query whose hypergraph has a hypertree decomposition of width , and let each relation of the database have at most tuples. At each node , join the at most relations of and project on , which gives at most tuples. The new relations form an acyclic query along , and the Yannakakis algorithm finishes. The time is polynomial in , the size of the query and the size of the output. This is combined complexity, and the same holds for generalized decompositions once one is given.
Examples and non-examples
- Acyclic hypergraphs. The path , , has width 1, from its join tree.
- The triangle. The edges , , are cyclic, so the width is at least 2. One node with and is a hypertree decomposition of width 2. So .
- Cycles. Let , for , have the vertices and the edges , with . Take a path of nodes , with
rooted at . Each edge lies in a bag: in , in , and in . Vertex is in all bags, and is in and only. The covering edges add only outside the bag, and is only in the root bag, so condition 4 holds. So for every , while the cycle is not acyclic.
- One big edge. A hypergraph with the single edge has width 1 for every size of . Its primal graph is a complete graph, of treewidth . So hypertree width can be much smaller than treewidth.
- Treewidth bounds generalized width. If every vertex is in some edge, then , where is the treewidth of the primal graph. Take a tree decomposition of the primal graph with bags of at most vertices, and cover each vertex of a bag by one edge that contains it. Each edge of is a clique of the primal graph, so some bag contains it.
- Unbounded width: grids. For a graph, read as a hypergraph with binary edges, each edge covers 2 vertices, so a bag of vertices needs at least edges. Hence , and an grid, of treewidth , has unbounded width as grows.
Related definitions
- Fractional hypertree width. Replace the number of covering edges by the weight of a fractional edge cover of the bag. This gives fractional hypertree width, which is at most the generalized hypertree width and can be much smaller.
- Treewidth. For graphs, read as hypergraphs with binary edges, the bounds above give , so treewidth and generalized hypertree width are within a factor of 2 of each other. For hypergraphs with large edges they can be far apart, as the single edge shows.
- Acyclicity and GYO. Width 1 is acyclicity, tested by the GYO reduction.
- Constraint satisfaction. A constraint satisfaction problem whose constraint hypergraph has bounded hypertree width is solvable in polynomial time by the same method as query evaluation.
References
- Georg Gottlob, Nicola Leone and Francesco Scarcello, Hypertree decompositions and tractable queries, Journal of Computer and System Sciences 64(3), 579 to 627 (2002), the definition of hypertree decompositions and hypertree width, width 1 for exactly the acyclic hypergraphs, and the polynomial test and evaluation for fixed width
- Georg Gottlob, Zoltan Miklos and Thomas Schwentick, Generalized hypertree decompositions, NP-hardness and tractable variants, Journal of the ACM 56(6), article 30 (2009), deciding whether the generalized hypertree width is at most 3 is NP-complete
- Wolfgang Fischl, Georg Gottlob and Reinhard Pichler, General and fractional hypertree decompositions, hard and easy cases, Proceedings of the 37th ACM Symposium on Principles of Database Systems (PODS), 17 to 32 (2018), deciding whether the generalized hypertree width is at most 2 is NP-complete
- Isolde Adler, Georg Gottlob and Martin Grohe, Hypertree width and related hypergraph invariants, European Journal of Combinatorics 28(8), 2167 to 2181 (2007), hypertree width is equal, up to a constant factor, to several other hypergraph invariants
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 6RYT0Z Edit this page History Report an error Markdown