Algorithm Search⌘K

Definitionresearch

Fractional hypertree width

Also called fractional hypertree decomposition.

The width of a tree decomposition whose bags are covered by fractional edge covers; bounded width gives polynomial time join evaluation.

Fractional hypertree width is a width measure of a hypergraph that is never larger than hypertree width and is often much smaller. It uses a tree decomposition, as hypertree width does, but it covers each bag by a fractional edge cover, a weighting of the edges, instead of a set of edges. Grohe and Marx (2006, journal version 2014) defined it. If a conjunctive query has a decomposition of fractional width ww, then by the AGM bound each bag has at most NwN^w partial answers on a database with NN tuples per relation, and the query can be evaluated in polynomial time.

Definition

Let H=(V,E)H = (V, E) be a hypergraph and B⊆VB \subseteq V.

Fractional edge cover. A fractional edge cover of BB is a map γ:E→[0,∞)\gamma : E \to [0, \infty) with ∑e∋vγ(e)≥1\sum_{e \ni v} \gamma(e) \ge 1 for each v∈Bv \in B. Its weight is ∑e∈Eγ(e)\sum_{e \in E} \gamma(e). The fractional edge cover number ρH∗(B)\rho^*_H(B) is the smallest weight of a fractional edge cover of BB. It is the value of a linear program, so it can be computed in polynomial time, and by linear programming duality it equals the largest weight of a fractional independent set of BB.

Definition (Grohe and Marx 2006). A fractional hypertree decomposition of HH is a triple (T,χ,γ)(T, \chi, \gamma), where (T,χ)(T, \chi) is a tree decomposition of HH and γp\gamma_p is a fractional edge cover of the bag χ(p)\chi(p) for each node pp of TT. So:

  1. for each edge e∈Ee \in E there is a node pp with e⊆χ(p)e \subseteq \chi(p);
  2. for each vertex v∈Vv \in V the set {p:v∈χ(p)}\{ p : v \in \chi(p) \} induces a connected subtree of TT;
  3. for each node pp and each v∈χ(p)v \in \chi(p), ∑e∋vγp(e)≥1\sum_{e \ni v} \gamma_p(e) \ge 1.

Its width is max⁡p∑eγp(e)\max_p \sum_e \gamma_p(e). The fractional hypertree width fhw(H)\mathrm{fhw}(H) is the smallest width of a fractional hypertree decomposition. Equivalently,

fhw(H)=min⁡(T,χ)  max⁡p  ρH∗(χ(p)),\mathrm{fhw}(H) = \min_{(T, \chi)} \; \max_{p} \; \rho^*_H(\chi(p)),

over all tree decompositions (T,χ)(T, \chi) of HH. A decomposition with finitely many nodes is enough, so the minimum exists.

Comparisons (theorems). A set of kk edges that covers a bag is a fractional cover of weight kk. So

fhw(H)≤ghw(H)≤hw(H),\mathrm{fhw}(H) \le \mathrm{ghw}(H) \le \mathrm{hw}(H),

where ghw\mathrm{ghw} is the generalized hypertree width. One bag with all vertices gives fhw(H)≤ρH∗(V)\mathrm{fhw}(H) \le \rho^*_H(V). Grohe and Marx showed that there are classes of hypergraphs of bounded fractional hypertree width and unbounded hypertree width, so the first inequality can be far from equality.

Evaluation (theorem). Let QQ be a conjunctive query whose hypergraph has a fractional hypertree decomposition of width ww, given as part of the input, and let each relation have at most NN tuples. For each node pp, let RpR_p be the join of the projections πe∩χ(p)(Re)\pi_{e \cap \chi(p)}(R_e) over all edges ee that meet χ(p)\chi(p). The cover γp\gamma_p, restricted to these projections, gives ∣Rp∣≤∏eNγp(e)≤Nw|R_p| \le \prod_e N^{\gamma_p(e)} \le N^w by the AGM bound, and a worst-case optimal join such as Generic Join computes RpR_p in about that time. The relations RpR_p form an acyclic query along TT with the same answers as QQ, and the Yannakakis algorithm finishes in time polynomial in NwN^w, the size of QQ and the size of the output. This is combined complexity, and it is polynomial for each fixed ww.

The bound NwN^w is on each bag, not on the answer. The path query Q(x,y,z): ⁣−R(x,y),S(y,z)Q(x, y, z) \mathbin{:\!-} R(x, y), S(y, z) is acyclic, so fhw=1\mathrm{fhw} = 1, but with R={(i,0):1≤i≤N}R = \{(i, 0) : 1 \le i \le N\} and S={(0,j):1≤j≤N}S = \{(0, j) : 1 \le j \le N\} the answer has N2N^2 tuples.

Computing the width (theorems). Deciding fhw(H)≤2\mathrm{fhw}(H) \le 2 is NP-complete (Fischl, Gottlob and Pichler 2018). For each fixed ww, Marx (2010) finds in polynomial time a fractional hypertree decomposition of width O(w3)O(w^3) for each hypergraph with fhw(H)≤w\mathrm{fhw}(H) \le w. This approximation is enough for polynomial evaluation of queries of bounded fractional hypertree width when no decomposition is given.

Examples and non-examples

  • Acyclic hypergraphs. A join tree with γp(ep)=1\gamma_p(e_p) = 1 has width 1, so fhw=1\mathrm{fhw} = 1. Each bag has at least one vertex that needs weight 1, so the width of a hypergraph with a nonempty edge is never less than 1.
  • The triangle. The edges ABAB, BCBC, CACA. One bag {A,B,C}\{A, B, C\} with weight 12\tfrac12 on each edge covers each vertex with weight 1, so fhw≤32\mathrm{fhw} \le \tfrac32. Any tree decomposition has a bag with all three vertices, since they form a clique of the primal graph, and each edge covers only two of them, so a fractional cover needs weight at least 32\tfrac32. So fhw=32\mathrm{fhw} = \tfrac32, while ghw=hw=2\mathrm{ghw} = \mathrm{hw} = 2. On a database with NN tuples per relation, the triangle query has at most N3/2N^{3/2} answers.
  • Complete graphs. For KnK_n read as a hypergraph with binary edges, some bag has all nn vertices, and weight 1n−1\tfrac{1}{n-1} on each of the (n2)\binom{n}{2} edges covers them. Each edge covers 2 vertices, so fhw(Kn)=n2\mathrm{fhw}(K_n) = \tfrac{n}{2}, while ghw(Kn)=⌈n/2⌉\mathrm{ghw}(K_n) = \lceil n/2 \rceil.
  • Longer cycles gain nothing. Let CnC_n, n≥4n \ge 4, be the cycle of binary edges, of hypertree width 2 (see hypertree width). The treewidth of a cycle is 2, so each tree decomposition has a bag with at least three vertices. Two of them are not adjacent, so no edge holds both, and each one needs weight 1 from its own edges. So each such bag needs weight 2, and fhw(Cn)=2\mathrm{fhw}(C_n) = 2. Among the cycles, only the triangle gains from fractional weights.
  • Non-example: one cover of the whole query. ρH∗(V)\rho^*_H(V) is only an upper bound. For the path ABAB, BCBC, CDCD, DEDE, vertex AA needs weight 1 on ABAB, vertex EE needs weight 1 on DEDE, and vertex CC needs weight 1 on BCBC and CDCD together, so ρH∗(V)=3\rho^*_H(V) = 3. But fhw=1\mathrm{fhw} = 1, since the path is acyclic.
  • AGM bound. The AGM bound says that a join with a fractional edge cover of weight ww over all its variables has at most NwN^w tuples. Fractional hypertree width applies the bound to each bag instead of to the whole query.
  • Hypertree width. Hypertree width uses integral covers and the special condition. It is at least the fractional hypertree width.
  • Worst-case optimal joins. Generic Join and Leapfrog Triejoin meet the AGM bound and so compute each bag in time close to Nρ∗N^{\rho^*}.
  • Fractional matchings. By duality, ρH∗(B)\rho^*_H(B) equals the largest weight of a fractional independent set of BB, the vertex version of a fractional matching.
  • Treewidth. For graphs with binary edges, the cover number of a bag of bb vertices is at least b/2b / 2 and at most bb, so fractional hypertree width and treewidth are within a factor of about 2. For hypergraphs with large edges the gap can be unbounded.

References

  1. Martin Grohe and Daniel Marx, Constraint solving via fractional edge covers, ACM Transactions on Algorithms 11(1), article 4 (2014); first in SODA 2006, 289 to 298, the definition of fractional hypertree width, the polynomial-time evaluation for bounded width when a decomposition is given, and classes where it is much smaller than hypertree width
  2. Daniel Marx, Approximating fractional hypertree width, ACM Transactions on Algorithms 6(2), article 29 (2010); first in SODA 2009, 902 to 911, for fixed w, a decomposition of width O(w^3) in polynomial time for each hypergraph of fractional hypertree width at most w
  3. 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 fractional hypertree width is at most 2 is NP-complete
  4. Albert Atserias, Martin Grohe and Daniel Marx, Size bounds and query plans for relational joins, SIAM Journal on Computing 42(4), 1737 to 1767 (2013), the bound on the size of a join by a fractional edge cover, used for each bag
  5. Georg Gottlob, Nicola Leone and Francesco Scarcello, Hypertree decompositions and tractable queries, Journal of Computer and System Sciences 64(3), 579 to 627 (2002), hypertree decompositions, which fractional hypertree decompositions generalize

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.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/TQRKBW/text.yaml